Closed
Bug 124587
Opened 22 years ago
Closed 22 years ago
lock the bugs table for writing when inserting a new bug
Categories
(Bugzilla :: Creating/Changing Bugs, defect, P1)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.16
People
(Reporter: myk, Assigned: myk)
Details
Attachments
(1 file, 1 obsolete file)
874 bytes,
patch
|
justdave
:
review+
justdave
:
review+
|
Details | Diff | Splinter Review |
bbbaetz makes a good point in bug 87006, comment 14. post_bug.cgi does not lock the bugs table before inserting a bug. For installations that use the shadow database, this could result in misordered (or perhaps even missing) shadow database records, because SendSQL first inserts the record into the bugs table and then inserts a record into the shadowlog table that will later create the bug in the shadow database. If two bugs are created at the same time, the four inserts could happen in the wrong order, switching bug numbers or overwriting one bug with the other (and potentially making everything off by one) in the shadow database.
Comment 1•22 years ago
|
||
As I discussed on IRC, I really hate the shadowdb ;) A patch for this should only lock if we're using the shadowdb. (I'm not sure if select or update takes higher priority. a write lock could swap the order round, leading to other perf problems, although the frequency of INSERT is probably not enough to be concerned) Also, we need to be careful. When adding ccs, for example, do you lock the cc table?. bugzilla's locking is a mess ATM, and cleaning it up is one of my 2.18 goals.
Assignee | ||
Comment 2•22 years ago
|
||
Comment 3•22 years ago
|
||
Comment on attachment 68718 [details] [diff] [review] patch v1: locks the tables OK. r=bbaetz. Not that I can test if this reduces the corruption risk, mind you.
Attachment #68718 -
Flags: review+
Comment 4•22 years ago
|
||
See my comments on bug 87006... I think syncshadowdb needs to obtain a lock before reading stuff from the shadowlog table, too.
Comment 5•22 years ago
|
||
dave: possibly, but see my comments in bug 124589. ;) Are we concerned about that in this late stage? Anyone who already uses the shadwowdb stuff knows how unreliable it is, and we're already planning to scrap it anyway.
Comment 6•22 years ago
|
||
Since this is marked critical, moving to 2.16.
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.16
Comment 7•22 years ago
|
||
Attachment #68718 -
Attachment is obsolete: true
Comment 8•22 years ago
|
||
Comment on attachment 80206 [details] [diff] [review] Myk's patch - no changes except applies to tip inheriting r=bbaetz from previous patch. adding r=justdave
Attachment #80206 -
Flags: review+
Comment 9•22 years ago
|
||
Someone appears to have checked this in. Gerv
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•