Repository navigation
fix(subscriptions): keep retrying the unlock of a lock whose owner exited while the connection could not answer - #61
Conversation
PR SummaryMedium Risk Overview Tests are refactored with Reviewed by Cursor Bugbot for commit 52f163f. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Route owner termination through lock release lib/event_store/advisory_locks.ex, test/advisory_locks_test.exs |
The owner-termination handler now uses release_held_lock/2. Tests exercise pending unlocks while the pooled connection is held and verify that locks become available after it is released. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- TrogonStack/commanded_eventstore issue 43: Describes the owner-down unlock failure addressed by routing the lock through the retry path.
- TrogonStack/commanded_eventstore issue 47: Reports missing retry re-arming coverage; this change adds a test for owner termination while the connection is busy.
Possibly related PRs
- TrogonStack/commanded_eventstore#25: Adds the shared query and failed-unlock retry path used by this change.
- TrogonStack/commanded_eventstore#27: Covers advisory-lock session-loss handling, which is related to owner-termination recovery.
- TrogonStack/commanded_eventstore#24: Introduces session-aware locks and pending releases used by this change.
Suggested reviewers: slashdotdash, vheathen
Merge Risk: 
Minimal · up to e24ad
-
The change addresses the stranded-lock case, and no actionable merge-blocking risk remains after normal checks.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed -
Finishing Touches: 💡 1
-
📝 Generate docstrings: 💡
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit watched the lock hold tight,
While busy connections blocked its flight.
The owner left; the release stayed,
Till free connections cleared the way.
The lock sprang loose, and hopped away.
Comment @coderabbitai help to get the list of available commands.
52f163f to
9fa27e1
Compare
9fa27e1 to
5985b6e
Compare
66c1a63 to
4cb9729
Compare
…e the unlock cannot run Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…ited while the connection could not answer Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
4cb9729 to
e24ad0f
Compare
Uh oh!
There was an error while loading. Please reload this page.