do not use dataDir to reference inline data use versionID (#11942)

versionID is the one that needs to be preserved and as
well as overwritten in case of replication, transition
etc - dataDir is an ephemeral entity that changes
during overwrites - make sure that versionID is used
to save the object content.

this would break things if you are already running
the latest master, please wipe your current content
and re-do your setup after this change.
This commit is contained in:
Harshavardhana
2021-04-01 13:09:23 -07:00
committed by GitHub
parent f966fbc4a3
commit 204c610d84
6 changed files with 69 additions and 116 deletions

View File

@@ -702,9 +702,10 @@ func (z *xlMetaV2) AddVersion(fi FileInfo) error {
ventry.ObjectV2.MetaUser[k] = v
}
}
// If asked to save data.
if len(fi.Data) > 0 || fi.Size == 0 {
z.data.replace(dd.String(), fi.Data)
z.data.replace(fi.VersionID, fi.Data)
}
}