Locking bugs temporarily?

Gervase Markham gerv at mozilla.org
Mon Feb 27 09:55:57 UTC 2012


On 24/02/12 16:47, David Marshall wrote:
> Fortunately, you can use MySQL as a source of mutual exclusion with the
> GET_LOCK function:

Interesting :-)

So the way to do it would be to change process.cgi and put a GET_LOCK
call before getting data about each bug, and a RELEASE_LOCK call after
updating it. Then, I could do the same in my extension. That way, only
one bit of code could be updating a bug at once. Is that the idea?

Do we currently have race conditions in process_bug? It grabs copies of
all the necessary bugs (around line 112), checks for mid-airs (around
line 150), but it only then opens a database transaction a bit later (on
line 543). Surely some other process could perhaps update the bug in
between, in which case some stale data might get written back to the bug?

Gerv
_______________________________________________
dev-apps-bugzilla mailing list
dev-apps-bugzilla at lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-apps-bugzilla



More information about the developers mailing list