Skip to content

Fix non-atomic write in ShardBackupMetadata.store() that can destroy backup metadata#4444

Open
markrmiller wants to merge 1 commit into
apache:mainfrom
markrmiller:pick-4be7cb19
Open

Fix non-atomic write in ShardBackupMetadata.store() that can destroy backup metadata#4444
markrmiller wants to merge 1 commit into
apache:mainfrom
markrmiller:pick-4be7cb19

Conversation

@markrmiller
Copy link
Copy Markdown
Member

https://issues.apache.org/jira/browse/SOLR-18249

The store() method deletes the existing metadata file before writing the replacement. If the write fails (disk full, network error, crash), both old and new metadata are lost, making the backup point permanently unrestorable. Removes the delete-before-write and relies on createOutput to overwrite, so the old file persists if the new write fails.

…metadata

The store() method deleted the existing metadata file before writing the
replacement. If the write failed (disk full, network error, crash), both
old and new metadata were lost, making the backup point permanently
unrestorable. Removed the delete-before-write and rely on createOutput to
overwrite, so the old file persists if the new write fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the tests label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant