Remove extra sleep in exclusive lease helper
What does this MR do?
This MR fixes #216050 (closed), by re-writing the loop logic so that the loop is basically:
until held?
raise if too_many_attempts?
sleep unless first_attempt?
try_obtain
end
The subtle complexities of the loop logic and the attempt to code this as a concise count-down led to the intial problems in managing state.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
/copy_metadata #216050 (closed)
Edited by Alex Kalderimis