mirror of
https://github.com/minio/minio.git
synced 2025-02-03 01:46:00 -05:00
support preserving renameData() on inlined content during overwrites (#19609)
extending #19548 to inlined-data as well.
This commit is contained in:
parent
fbfeb59658
commit
1d03bea965
@ -2760,11 +2760,9 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath string, f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When we are not inlined and there is no oldDataDir present
|
// If we have oldDataDir then we must preserve current xl.meta
|
||||||
// we backup existing xl.meta -> xl.meta.bkp - this is done to
|
// as backup, in-case needing renames().
|
||||||
// ensure for some reason we didn't get enough quorum we can
|
if res.OldDataDir != "" {
|
||||||
// revert this back to original xl.meta and preserve the older dataDir.
|
|
||||||
if notInline && res.OldDataDir != "" {
|
|
||||||
// preserve current xl.meta inside the oldDataDir.
|
// preserve current xl.meta inside the oldDataDir.
|
||||||
if err = s.writeAll(ctx, dstVolume, pathJoin(dstPath, res.OldDataDir, xlStorageFormatFileBackup), dstBuf, true, skipParent); err != nil {
|
if err = s.writeAll(ctx, dstVolume, pathJoin(dstPath, res.OldDataDir, xlStorageFormatFileBackup), dstBuf, true, skipParent); err != nil {
|
||||||
if legacyPreserved {
|
if legacyPreserved {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user