Repository navigation
abandon-stuck: hand back the in-flight backlog with JobRegistry.abandonJob - #31
Merged
Merged
Conversation
…stry.abandonJob The worker now abandons a job it fails, but a backlog from before that change stays Acknowledged until the keeper's no-fault settle 48 h after each deadline. At maxConcurrentJobs of those the chain refuses the worker's session claims, and WorkerRegistry.removeSupportedModel refuses while any job for the model is still counted active, so the backlog blocks both recovery paths (g1 worker-4/5, 2026-10-19). `lightchain-worker abandon-stuck` finds this worker's jobs through JobSubmitted events in the last ABANDON_LOOKBACK_BLOCKS (default 150000), reads each state, and calls abandonJob for every one still Submitted or Acknowledged: consumer refunded, in-flight slot released. ABANDON_DRY_RUN=1 only lists. A failed abandon is reported and skipped, never fatal.
…REGISTRY_ADDRESS up front The four progress lines ignored fmt.Fprintf's result, which the CI lint (errcheck, new findings only) rejects. abandon-stuck also reads and writes the JobRegistry, so it takes loadAndValidateForSettlement like release does: a missing JOB_REGISTRY_ADDRESS fails at config load with a clear message instead of after the chain dial.
2 of 3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #30. The worker now abandons a job it fails, but the backlog from before that change stays Acknowledged until the keeper's 48 h no-fault settle; at the 100 cap the chain refuses the worker's claims, and
removeSupportedModelrefuses while any job for the model is still active, so the backlog blocks both recovery paths (g1 worker-4/5 today).lightchain-worker abandon-stuckfinds this worker's jobs via JobSubmitted events in the lastABANDON_LOOKBACK_BLOCKS(default 150000), reads each state, and callsabandonJobfor every one still Submitted/Acknowledged.ABANDON_DRY_RUN=1only lists. One failed abandon is reported and skipped.Three unit tests on a fake chain (window and worker filtering, dry run, one revert does not stop the sweep). Builds and vets for Linux; the cli test package only runs on Linux (release uses flock), so CI runs them.