Skip to content

fix(schedule): make executor lock release single-owner and transactional - #617

Open
tokenjunkielabs wants to merge 5 commits into
Protocol-Guild:mainfrom
tokenjunkielabs:zz-sol-riftforge/payd-494-lock-lifecycle
Open

tokenjunkielabs wants to merge 5 commits into
Protocol-Guild:mainfrom
tokenjunkielabs:zz-sol-riftforge/payd-494-lock-lifecycle

Conversation

@tokenjunkielabs

Copy link
Copy Markdown

Fixes #494

Keeps each claimed schedule on the same PostgreSQL client from the atomic claim through execution bookkeeping and final unlock.

  • removes the duplicate finally unlock;
  • lets ScheduleService.updateAfterExecution reuse the executor-owned client instead of opening a nested connection/transaction;
  • records execution state and clears the claim in one transaction;
  • requires locked_by = $podId on the only unlock and aborts if ownership changed;
  • leaves failed/unrecorded claims in place for the existing stale-claim recovery instead of clearing another worker's lock.

No test command was run in this submission session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix schedule executor double-release of database lock

1 participant