heal legacy objects when versioning is enabled after upgrade (#13671)

legacy objects in 'xl.json' after upgrade, should have
following sequence of events - bucket should have versioning
enabled and the object should have been overwritten with
another version of an object.

this situation was not handled, which would lead to older
objects to stay perpetually with "legacy" dataDir, however
these objects were readable by all means - there weren't
converted to newer format.

This PR fixes this situation properly.
This commit is contained in:
Harshavardhana
2021-11-17 15:49:12 -08:00
committed by GitHub
parent 9c5d9ae376
commit 886262e58a
3 changed files with 19 additions and 3 deletions

View File

@@ -199,7 +199,9 @@ func (m *xlMetaV1Object) ToFileInfo(volume, path string) (FileInfo, error) {
Erasure: m.Erasure,
VersionID: m.VersionID,
DataDir: m.DataDir,
XLV1: true,
}
return fi, nil
}