Modify

Opened 12 years ago

Closed 10 years ago

#11127 closed enhancement (duplicate)

using of "db.commit()" make some problems

Reported by: ms1014 Owned by: Ryan J Ollos
Priority: normal Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Hello. I have to propose you to hear trac developers and to use @with_transaction instead db.commit() in plugin for trac 0.12. db.commit() is a cause of "Database is locked" error. Example of configuration:

Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux
------
Trac	0.12.3
Genshi	0.6
pysqlite	2.6.0
Python	2.7.3 (default, Jan 2 2013, 13:56:14) [GCC 4.7.2]
setuptools	0.6
SQLite	3.7.13
------
TracMasterTickets 	3.0.5dev
ddblocker 	N/A
Tracchildtickets 	2.5.2

I see this error, when I try to do UPDATE or DELETE in ITicketManupulator.validate_ticket or ITicketChangeListener.ticket_changed in my plugins. And it's gone when I had used @with_transaction in save() method in mastertickets/model.py. So I think commit() was a cause that bad interactions.

Thank you for your job. :)

Attachments (0)

Change History (4)

comment:1 Changed 11 years ago by Ryan J Ollos

The plugin was originally written for Trac 0.11 or even earlier, and it hasn't been upgraded for newer versions of the Trac API. The problem with modifying the code to use @with_transaction is that we'll have to change the database transaction again to use with in Trac 1.0. I'll keep 0.12 support in mind, but I've been strongly considering just supporting 1.0 and later in a future version in which the db transactions are changed.

comment:2 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

comment:3 Changed 11 years ago by Ryan J Ollos

Status: newassigned

comment:4 Changed 10 years ago by Ryan J Ollos

Resolution: duplicate
Status: assignedclosed

Closing as a duplicate of #12193. I'll port to the Trac 1.0 API in that ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.