Repository navigation
Conversation
CleanAbandonedData removes abandoned inline data directories from the in-memory xl.meta (xl.data.remove), serializes the modified metadata into newBuf, but then writes the ORIGINAL buffer (buf) back to disk. As a result the inline-data cleanup never persisted and abandoned inline entries reappear on the next read. Write newBuf instead of buf so the cleaned metadata is what gets persisted to xl.meta. Signed-off-by: agonizerq <agonizerq@users.noreply.github.com>
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.
What
CleanAbandonedDataremoves abandoned inline data directories from the in-memoryxl.meta(xl.data.remove(...)), serializes the modified metadata intonewBuf, but then writes the original bufferbufback to disk:As a result the inline-data cleanup never persists: the abandoned inline entries remain in the stored
xl.metaand reappear on every subsequent read.Fix
Write
newBuf(the serialized, cleaned metadata) instead ofbuf:Scope / impact
CleanAbandonedData(reached via healing /mc admin heal). Single-drive deployments that never run heal are unaffected.Note
Identified by DeepSeek (AI-assisted code review) during an investigation into intermittent object corruption, and submitted from this account.
Signed-off-by: agonizerq agonizerq@users.noreply.github.com