Closed prioux closed 1 year ago
Note for reviewers: the main difference is that in 4 methods, I wrapped a bit of code inside a 2.times block, then added a check after the block:
2.times do
(original old code indented by two more spaces)
end
if status check not expected
raise exception
end
The code in the 2.times
block is pretty much unchanged except at the end, instead of a status_transition!(blah)
we have a break if status_transition(blah)
(note the absence of the !
in the method name).
Consider reviewing this with spacing not significant.
Adds logic to try twice if a sync object gets newly created and picked up by multiple clients on the same server. Twice is enough because the second time the code will receive a completion status from whatever other process did permorm the operation.
This commit should get rid forever of all exceptions that appeared as:
CbrainTransitionException: Sync status was changed before lock was acquired.