Closed Bug 305522 Opened 19 years ago Closed 17 years ago

Stop perl modules from starting or ending transactions

Categories

(Bugzilla :: Bugzilla-General, enhancement)

2.21
enhancement
Not set
normal

Tracking

()

VERIFIED WONTFIX

People

(Reporter: Wurblzap, Unassigned)

Details

Module subroutines locking tables cannot be called as part of a wider lock. The
(recently gotten rid of) derive_groups hack sporting a tables_already_locked
parameter is not a good example imho. Callsites should take all responsibility
for locking.

For bonus points, we could have a test making sure we don't call bz_lock_tables
outside of .cgi files (with the exception of Bugzilla/DB.pm and Bugzilla/DB/*).
No longer blocks: 267240
I'm a little iffy on this idea... mostly because my *real* goal is just to
entirely eliminate table locking, as much as possible, and replace it with
transactions.
Severity: normal → enhancement
We should start aiming a little lower, don't you think?

If we start moving locking outside of modules, we'll end up with LOCK TABLE calls close to what will turn into START TRANSACTION, and UNLOCK TABLES calls will be near to where COMMIT (or ROLLBACK) will be called. So the changes are along the way.
Morphing, now that we have transactions.
Summary: Stop perl modules from locking tables → Stop perl modules from starting or ending transactions
And actually, there's no reason to prevent modules from starting or ending transactions, since we coded our transaction code in such a way that this doesn't matter.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.