mirror of
https://github.com/pgsty/minio.git
synced 2026-11-12 02:25:34 +03:00
fix(restore): preserve versions across cleanup and failed reads
Reject replacement markers and legacy objects before restored-copy cleanup can mutate their type or data. Prevent restore lookups and failure cleanup from purging dangling versions, preserve Transition on metadata rereads, and return without writing when the initial restore read fails. Add real-disk regressions for stale null tasks, minority metadata, initial and cleanup read failures, and stored marker/legacy types. Keep ordinary dangling cleanup and marker purge as positive controls. Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
@@ -1371,6 +1371,9 @@ func (s *xlStorage) DeleteVersion(ctx context.Context, volume, path string, fi F
|
||||
}
|
||||
|
||||
if legacyJSON {
|
||||
if fi.ExpireRestored {
|
||||
return nil // Legacy objects cannot contain a completed transition.
|
||||
}
|
||||
// Delete the meta file, if there are no more versions the
|
||||
// top level parent is automatically removed.
|
||||
return s.deleteFile(volumeDir, pathJoin(volumeDir, path), true, false)
|
||||
|
||||
Reference in New Issue
Block a user