Repository navigation
Keep confirmed backup uploads and remove abandoned local files - #14652
Draft
mengxu-oai wants to merge 1 commit into
Draft
mengxu-oai wants to merge 1 commit into
mengxu-oai wants to merge 1 commit into
Conversation
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.
A backup worker can write one tagged log batch to several destinations. If one finish fails, the worker currently opens fresh files for every destination, including files that already acknowledged the batch or still have a finish in flight. A failed or abandoned local writer can also leave its private
.tempor.temp.partfile on disk. This brings the corresponding changes from #14463 tomain.The worker retains each destination's finish result across retries. It releases a failed writer before opening its replacement and advances the saved versions once all active destinations acknowledge. Local writers keep the outstanding I/O alive until cleanup can safely remove their unique temporary paths. A failed publish leaves the prior destination intact.
This applies directly to
main. #14435 also changes local file creation. If either PR rebases after the other lands, preserve both this cleanup and #14435's asynchronous parent-directory creation and atomic rename.Validation
271828,/backup/containers/localdir/reported 25 passed and zero failed in both native and Sim2 modes. The forced rename-failure case exercises its assertions only on native filesystems. Both modes exercised abandoned files and independent encryption keys./BackupWorker/MutationLogUpload/cases passed both natively and in Sim2. The recipient test covers an acknowledged finish, a pending finish, two lost acknowledgements, a stopped backup and a newly started backup.mainimplementations, nativeFailedRenameCleanupfound a leftover.tempfile,AbandonedWriteCleanupfound a leftover private file, andChangingRecipientscompleted while the original destination's finish was still pending. All three passed with the fix.