Repository navigation
Fix WriteFileOperation::undo() incorrectly deleting pre-existing metadata files - #99129
Merged
tiandiwonder merged 1 commit intoMar 11, 2026
Merged
Conversation
Contributor
Contributor
LLVM Coverage Report
PR changed lines: PR changed-lines coverage: 100.00% (59/59) |
tuanpach
reviewed
Mar 10, 2026
Michicosun
approved these changes
Mar 10, 2026
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 #94142
CI reports:
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Note
Medium Risk
Touches transactional metadata write/undo logic for object-storage disks; a bug here could cause metadata loss or incorrect rollback behavior, but the change is narrowly scoped and covered by a new regression test.
Overview
Fixes a rollback bug in object-storage metadata transactions where
WriteFileOperation::undo()could delete a pre-existing file ifexecute()failed after opening it but before capturingprev_data.The operation now tracks whether the file was observed to exist (
file_existed) and only deletes on undo when the file was newly created, plus a newwrite_file_operation_fail_on_readfailpoint and a regression test (AppendFileTxReadFailDoesNotDeleteFile) to ensure a failed append transaction does not remove the original file.Written by Cursor Bugbot for commit 0be09f0. This will update automatically on new commits. Configure here.
Version info
26.3.1.569