Commit 019f74e
committed
recipe(lock): retry lock cleanup
If a non-blocking lock fails to acquire the lock, and then encounters
a KazooError (due to a suspended session), the _best_effort_cleanup method
will swallow the exception and control will return without the lock
contender node being deleted. If the session resumes (does not expire)
then we will have left a lock contender in place, which will eventually
become an orphaned, stuck lock once the original actor releases it.
To correct this, retry deleting the lock contender in all cases. Due
to the importance of this, we ignore the supplied timeout (in case the
aquire method was called with a timeout) and retry forever.
Closes: #7321 parent c5ab988 commit 019f74e
1 file changed
+13
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
325 | 330 | | |
326 | | - | |
327 | | - | |
| 331 | + | |
| 332 | + | |
328 | 333 | | |
329 | 334 | | |
330 | 335 | | |
| |||
0 commit comments