Repository navigation
fix(persistence): fail a bulk-submit manifest even when its error artifact cannot be written - #3363
Open
angela-helios wants to merge 2 commits into
Open
angela-helios wants to merge 2 commits into
angela-helios wants to merge 2 commits into
Conversation
…ifact cannot be written A manifest past its attempt cap, or one whose manifest could not be fetched, was failed only after its error artifact reached the output store. When that write failed the manifest stayed processing and was claimed again on every lease lapse, without limit. The error artifact is now best effort: a write failure is logged and the manifest is published as failed with no artifact. The abandoned message reports the configured cap instead of the claim count. Closes #3084
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This branch has not been deployed
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.
Closes #3084
Behaviour change to review
A bulk-submit manifest that fails before ingest (its manifest cannot be fetched, or it is past its attempt cap) is now marked
failedeven when its error artifact cannot be written to the output store. In that case the manifest has itserror_messagebut noerroroutput file, and the worker logs a warning. Before, the manifest stayedprocessingand was claimed again each time its lease lapsed.Summary
fail_before_ingesttreats the manifest-level error artifact as best effort. Ifwrite_manifest_errorfails, it logs awarnand publishes the terminalFailedstate with no artifact, instead of returning the error and leaving the manifestprocessing.max_attempts) in the abandoned message and log, rather thanlease.attempt - 1, so the message no longer grows with later claims.fail_before_ingestand gets the same behaviour.Tests
Two unit tests in
crates/persistence/src/core/bulk_submit_worker.rs(SQLite job store, a fault-injecting output store):test_a_manifest_past_its_attempt_cap_fails_when_its_error_artifact_cannot_be_written: cap of 2, three lapsed claims, then a run on attempt 4 with an output store that refuses to open the part, and again with one whose writes fail. Asserts the manifest isfailed, no file is published, the message is "manifest abandoned after 2 attempts", and the manifest is not claimable again.test_a_fetch_error_fails_the_manifest_when_its_error_artifact_cannot_be_written: the same output-store failure on the fetch-error path.Results:
cargo test -p helios-persistence --lib --features s3 -- bulk_submit_worker backends::s3 bulk_export_worker: 406 passed. That includes the two new tests.The
HFS_BULK_SUBMIT_MAX_ATTEMPTSrows incrates/rest/README.mdand thebulk-data-submitskill (both mirrors) now say the error artifact is written when the output store accepts it.These ran on a branch that also carried other pending fixes, so the suites were verified in combination, not on this branch alone.