mirror of
https://github.com/minio/minio.git
synced 2025-02-02 17:35:58 -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
|
||||
// we backup existing xl.meta -> xl.meta.bkp - this is done to
|
||||
// ensure for some reason we didn't get enough quorum we can
|
||||
// revert this back to original xl.meta and preserve the older dataDir.
|
||||
if notInline && res.OldDataDir != "" {
|
||||
// If we have oldDataDir then we must preserve current xl.meta
|
||||
// as backup, in-case needing renames().
|
||||
if res.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 legacyPreserved {
|
||||
|
Loading…
x
Reference in New Issue
Block a user