Repository navigation
Backup: fail a backup whose bulkdump did not complete - #13936
Merged
saintstack merged 1 commit intoAug 24, 2026
Merged
Conversation
The bulkdump branch of the backup task treated a dump that never finished as a warning. It set timeoutOccurred, skipped the keyspace snapshot, and let the backup report success -- producing a backup with no bulkDumpJobId, which no bulkload restore can use. Nothing surfaced until a restore aborted with BulkLoadRestoreNoBulkDumpJobId, hours later and pointing at the wrong end of the system. A backup asked to produce bulkdump data and unable to do so has not succeeded, so fail it where that is known. This closes an asymmetry rather than adding a rule. verifyBulkDumpDatasetCompleteness already fails the backup for the same class of problem -- data promised but not present -- but it sits inside the `completed` branch, so a timeout was the one route that skipped every check and still reported success. The enclosing handler already logs BulkDumpTaskError and restores bulkDump mode before rethrowing, so the failure needs no special cleanup here. BulkDumpTaskTimeout keeps its name and gains a Reason; only its severity changes. The condition it reports is still exactly a timeout -- monitorBulkDumpJobCompletion returns false only on that branch -- so renaming it would break trace searches and dashboards for no gain. The `if (completed)` guard below is now redundant. It is left in place so the change reads as one block rather than a fifty-line reindentation. Behaviour change worth noting for reviewers: a backup that previously "succeeded" while silently degrading will now fail. The three BackupS3Blob tests set their own budgets -- bulkdump_job_timeout = 1200 for the plain variant, 5400 for MultiRange and WithChaos -- so a test whose budget is too small for its shard count will now fail loudly instead of leaving an unrestorable backup behind. That is the intent, but those budgets should be re-checked when this lands.
saintstack
force-pushed
the
fix-bulkdump-timeout-fails-backup
branch
from
August 22, 2026 21:13
46f739d to
3ebee84
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
neethuhaneesha
approved these changes
Aug 23, 2026
| // never ran on this route -- a timeout was the one way to skip every check and still report | ||
| // success. Mode restoration needs no handling here; the catch below already does it on the | ||
| // error path. | ||
| if (!completed) { |
Contributor
There was a problem hiding this comment.
I am just curios to know, if it is not completed, is there no retry mechanism?
Contributor
Result of foundationdb-pr-clang-ide on Linux RHEL 9
|
akankshamahajan15
approved these changes
Aug 24, 2026
Contributor
Result of foundationdb-pr-macos-m1 on macOS 14.x
|
Contributor
Result of foundationdb-pr-clang-arm on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-clang on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-macos on macOS 14.x
|
Contributor
Result of foundationdb-pr on Linux RHEL 9
|
Contributor
Result of foundationdb-pr-cluster-tests on Linux RHEL 9
|
saintstack
added a commit
that referenced
this pull request
Aug 26, 2026
…13945) BULKDUMP_JOB_TIMEOUT and BULKLOAD_JOB_TIMEOUT are spent against total elapsed time, so both monitors abort jobs that are advancing normally. Their own comments concede the premise is wrong -- "24 hours - large DBs may take days" annotating a 24 hour budget -- because neither duration is a function of health. A dump advances one bounded slice per scheduling round: the storage server returns after SS_BULKDUMP_BATCH_COUNT_MAX_PER_REQUEST batches and the remainder is re-dispatched on a later round, so a range that begins life as a single shard needs far more rounds than the budget allows. A restore's duration likewise tracks the data it moves. Measured on a narrow-fleet simulation where the first location read returns one shard for the whole key space: seven seeds abort a dump that is demonstrably progressing -- 47 ranges persisted Complete, the frontier advancing across re-dispatch rounds -- and report a backup failure for it. Since #13936 that failure is no longer silent, which is what made this visible. Time out on absence of progress instead, keeping the knobs as the no-progress window so a genuinely wedged job is still caught. The restore monitor already computes the task counters it needs for its own status display. The dump monitor has no such counter, so it samples getBulkDumpCompleteTaskCount at a tenth of the window -- that call walks the job's metadata and cannot run at poll frequency -- and treats a failed sample as carrying no information, neither failing the backup nor extending its deadline. Seven previously failing seeds now complete the dump; twenty paired seeds show no regression.
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.
Problem
monitorBulkDumpJobCompletionreturning false was treated as a warning:A timed-out dump therefore skipped the completeness check and the keyspace snapshot, and the backup still
reported success. The artifact has no
bulkDumpJobId, so no bulkload restore can use it. First loud symptomis
SevError BulkLoadRestoreNoBulkDumpJobIdat restore time, hours later, pointing at the wrong subsystem.Fix
Fail the backup at the point of detection.
This closes an asymmetry rather than adding a rule:
verifyBulkDumpDatasetCompletenessalready fails thebackup for the same class of problem — data promised, not present — but it sits inside the
completedbranch, so timeout was the one route that skipped every check and still succeeded.
BulkDumpTaskErrorand restoresbulkDumpmodebefore rethrowing.
BulkDumpTaskTimeoutkeeps its name and gains aReason; only severity changes. The condition is stillexactly a timeout, so renaming would break trace searches for no gain.
if (completed)guard is left in place to keep the change one readable block ratherthan a fifty-line reindentation.
Behaviour change
Backups that previously succeeded while silently degrading now fail. The three
BackupS3Blobtests settheir own budgets —
bulkdump_job_timeout= 1200 plain, 5400 MultiRange and WithChaos — so any test whosebudget is too small for its shard count will now fail loudly instead of leaving an unrestorable backup.
Those budgets are worth re-checking as this lands, and Joshua's wider seed spread is where an undersized one
would show up.
Testing
All three restore suites, two seeds each, all pass with
BulkDumpTaskWroteSnapshotpresent and no timeout —the new path stays dormant on healthy runs:
The failure path was observed before this change under
min_shard_bytes1000x below default (one manifestper shard, thousands of dump tasks): the dump exceeded the plain variant's 1200s budget, the backup reported
success with no snapshot, and the following restore aborted with
BulkLoadRestoreNoBulkDumpJobId.Rebased onto current
mainnow that #13924 has merged; this PR contains one commit.