Closed
Bug 305126
Opened 19 years ago
Closed 19 years ago
Fix table locks after the removal of derive_groups
Categories
(Bugzilla :: User Accounts, defect, P3)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.22
People
(Reporter: mkanat, Assigned: bugreport)
References
Details
Attachments
(1 file, 2 obsolete files)
|
5.48 KB,
patch
|
LpSolit
:
review+
|
Details | Diff | Splinter Review |
With the check-in of bug 304583, we will no longer need to lock tables in a few places for derive_groups. At the least, we removed DERIVE_GROUPS_TABLES_ALREADY_LOCKED from Flag.pm and whine.pl, so those will no longer need those table locks (at least, not WRITE locks).
| Reporter | ||
Updated•19 years ago
|
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.22
Comment 1•19 years ago
|
||
Also add missing tables where appropriate. For instance, User::groups() now accesses the 'group_group_map' table, which wasn't used before, breaking table locks which involve user objects, such as votes. :(
| Assignee | ||
Comment 2•19 years ago
|
||
The other option would be to force creation of a user object to fetch the necessary group information right then. How often does anyone create a user object and then not subsequently need any group information?
Comment 3•19 years ago
|
||
Does comment 1 make this one at least critical, or is this another bug? (http://landfill.bugzilla.org/bugzilla-tip/votes.cgi?action=show_user crashes if you have voted on at least one bug.)
| Reporter | ||
Comment 4•19 years ago
|
||
Yeah, this is a bug, per comment 3.
Severity: enhancement → major
Summary: Remove all table locks that existed only for derive_groups → Fix table locks after the removal of derive_groups
| Assignee | ||
Comment 5•19 years ago
|
||
I checked everything that does a read lock on user_group_map to make sure it does a read lock on group_group_map as well.
Assignee: user-accounts → bugreport
Status: NEW → ASSIGNED
Attachment #193782 -
Flags: review?(LpSolit)
Comment 6•19 years ago
|
||
Comment on attachment 193782 [details] [diff] [review] Patch - add group_group_map to locks in post_bug and votes User::derive_groups() used the following locks: 'profiles WRITE', 'user_group_map WRITE', 'group_group_map READ', 'groups READ' Now User::groups() uses the same tables, but all READ. So 'profiles' and 'user_group_map' should be locked as READ now, because User::derive_regexp_groups() is the single function to write into tables and is never called directly when creating a user object.
Attachment #193782 -
Flags: review?(LpSolit) → review-
Comment 7•19 years ago
|
||
Also, please fix the comment in attachment.cgi, line 1178 about rederiving groups.
| Assignee | ||
Comment 8•19 years ago
|
||
Attachment #193782 -
Attachment is obsolete: true
Attachment #193908 -
Flags: review?(LpSolit)
Comment 9•19 years ago
|
||
Comment on attachment 193908 [details] [diff] [review] v2 The only reason I deny review is because of the confusing comments in process_bug.cgi, lines 623 + 1273. Also, at lines 1269 and 1278, I think the profiles and user_group_map tables should now be locked as READ, assuming the comment is correct. Maybe a nit for you, but I think it's important to clarify this point. Handling user privs is already hard enough. ;)
Attachment #193908 -
Flags: review?(LpSolit) → review-
| Assignee | ||
Comment 10•19 years ago
|
||
Attachment #193908 -
Attachment is obsolete: true
Attachment #194232 -
Flags: review?(LpSolit)
Comment 11•19 years ago
|
||
Comment on attachment 194232 [details] [diff] [review] v3 r=LpSolit
Attachment #194232 -
Flags: review?(LpSolit) → review+
Updated•19 years ago
|
Flags: approval?
Updated•19 years ago
|
Flags: approval? → approval+
| Assignee | ||
Comment 12•19 years ago
|
||
Checking in attachment.cgi; /cvsroot/mozilla/webtools/bugzilla/attachment.cgi,v <-- attachment.cgi new revision: 1.95; previous revision: 1.94 done Checking in post_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v <-- post_bug.cgi new revision: 1.126; previous revision: 1.125 done Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.281; previous revision: 1.280 done Checking in votes.cgi; /cvsroot/mozilla/webtools/bugzilla/votes.cgi,v <-- votes.cgi new revision: 1.32; previous revision: 1.31 done Checking in whine.pl; /cvsroot/mozilla/webtools/bugzilla/whine.pl,v <-- whine.pl new revision: 1.15; previous revision: 1.14 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•