mirror of
https://github.com/pgsty/minio.git
synced 2026-12-03 12:26:39 +03:00
fix(storage): persist inline-data cleanup in CleanAbandonedData
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 commit is contained in:
+1
-1
@@ -3366,7 +3366,7 @@ func (s *xlStorage) CleanAbandonedData(ctx context.Context, volume string, path
|
||||
newBuf, err := xl.AppendTo(metaDataPoolGet())
|
||||
if err == nil {
|
||||
defer metaDataPoolPut(newBuf)
|
||||
return s.WriteAll(ctx, volume, pathJoin(path, xlStorageFormatFile), buf)
|
||||
return s.WriteAll(ctx, volume, pathJoin(path, xlStorageFormatFile), newBuf)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user