mirror of
https://github.com/pgsty/minio.git
synced 2026-11-11 01:55:30 +03:00
fix(ilm): constrain restored-copy cleanup to verified tiered versions
Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
@@ -1498,6 +1498,11 @@ func (x *xlMetaV2) DeleteVersion(fi FileInfo) (string, error) {
|
||||
}
|
||||
switch {
|
||||
case fi.ExpireRestored:
|
||||
// Only a completed transition has a remote copy. Trust the selected
|
||||
// stored version, not the transition status supplied by the caller.
|
||||
if string(ver.ObjectV2.MetaSys[metaTierStatus]) != lifecycle.TransitionComplete {
|
||||
return "", nil
|
||||
}
|
||||
ver.ObjectV2.RemoveRestoreHdrs()
|
||||
err = x.setIdx(i, *ver)
|
||||
case fi.TransitionStatus == lifecycle.TransitionComplete:
|
||||
|
||||
Reference in New Issue
Block a user