mirror of https://github.com/minio/minio.git
fix: avoid removing healed parts on dstDataPath (#12795)
destination path and old path will be similar when healing occurs, this can lead to healed parts being again purged leading to always an inconsistent state on an object which might further cause reduction in quorum eventually.
This commit is contained in:
parent
a3f7d575e0
commit
0c666379fe
|
@ -2054,6 +2054,12 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, f
|
|||
// Purge the destination path as we are not preserving anything
|
||||
// versioned object was not requested.
|
||||
oldDstDataPath = pathJoin(dstVolumeDir, dstPath, ofi.DataDir)
|
||||
// if old destination path is same as new destination path
|
||||
// there is nothing to purge, this is true in case of healing
|
||||
// avoid setting oldDstDataPath at that point.
|
||||
if oldDstDataPath == dstDataPath {
|
||||
oldDstDataPath = ""
|
||||
}
|
||||
xlMeta.data.remove(nullVersionID, ofi.DataDir)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue