Closed
Bug 918625
Opened 11 years ago
Closed 11 years ago
Implement a distributed mutex for bug modifications
Categories
(Firefox OS Graveyard :: Gaia::GithubBot, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jhford, Assigned: jhford)
References
Details
Attachments
(1 file)
Updating bugs (i.e. more than just comments) requires two non-atomic API calls. We need to fetch the bug to get the update token, then we post the new bug information.
We should have a shared mutex across the entire bot to ensure that no single bug is attempted to be worked on by two different api consumers.
Assignee | ||
Updated•11 years ago
|
Assignee | ||
Comment 1•11 years ago
|
||
This is a distributed lock. It's safe to double-unlock something, but double locking will fail (obviously).
I'm not sure if I like how the redisOpts stuff works, also I think my unit tests would be better if I stubbed out redis instead of using a real redis. I didn't do that because I couldn't figure out how to stub api methods without recreating a whole api object.
Attachment #811415 -
Flags: review?(jlal)
Comment 2•11 years ago
|
||
Comment on attachment 811415 [details] [review]
pull request
with nits see github
Attachment #811415 -
Flags: review?(jlal) → review+
Updated•11 years ago
|
Attachment mime type: text/plain → text/x-github-pull-request
Comment 3•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Assignee: nobody → jhford
You need to log in
before you can comment on or make changes to this bug.
Description
•