fix(prover-client): don't persist stale proving job results (racing epoch GC)#22688
Closed
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
Closed
fix(prover-client): don't persist stale proving job results (racing epoch GC)#22688AztecBot wants to merge 1 commit intomerge-train/spartanfrom
AztecBot wants to merge 1 commit intomerge-train/spartanfrom
Conversation
Collaborator
Author
|
Automatically closing this stale claudebox draft PR (no updates for 5+ days). Re-open if still needed. |
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.
Summary
Follow-up to #22508. That PR kept in-progress jobs from stale epochs alive, but
cleanupPass()still callsdeleteAllProvingJobsOlderThanEpoch(...), which closes and deletes the per-epoch LMDB store. When an agent then reports an error/result for such a stale in-progress job, the broker's rejected/fulfilled path callsdatabase.setProvingJobError/Result(...), whose batch-queue commit runsbatchWriteon the just-closed store — producingError: Store is closedand failing the newRetries > does not retry if job is staletest.Skip the DB persist when the job is already stale. The in-memory
resultsCache+ promise resolution still happen, so callers still observe{ status: 'rejected' | 'fulfilled', ... }. There's no point writing to a per-epoch store that is on the way out.Details
#reportProvingJobSuccessto close the symmetric path.Test plan
yarn workspace @aztec/prover-client test src/proving_broker/— all 7 files pass (145/145).proving_broker.test.tsx20 — all green../bootstrap.sh format/./bootstrap.sh lintclean.Failing CI run that motivated this fix: https://github.com/AztecProtocol/aztec-packages/actions/runs/24714302818
ClaudeBox log: https://claudebox.work/s/2bbcd00ade5c0a6a?run=1