mirror of https://github.com/minio/minio.git
fix: skip free version ID and marker in metadata equality (#16093)
This commit is contained in:
parent
6aea950d74
commit
58ec835af0
|
@ -610,7 +610,19 @@ func (j xlMetaV2Object) ToFileInfo(volume, path string) (FileInfo, error) {
|
||||||
|
|
||||||
fi.Metadata[k] = v
|
fi.Metadata[k] = v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tierFVIDKey := ReservedMetadataPrefixLower + tierFVID
|
||||||
|
tierFVMarkerKey := ReservedMetadataPrefixLower + tierFVMarker
|
||||||
for k, v := range j.MetaSys {
|
for k, v := range j.MetaSys {
|
||||||
|
// Make sure we skip free-version-id, similar to AddVersion()
|
||||||
|
if len(k) > len(ReservedMetadataPrefixLower) && strings.EqualFold(k[:len(ReservedMetadataPrefixLower)], ReservedMetadataPrefixLower) {
|
||||||
|
// Skip tierFVID, tierFVMarker keys; it's used
|
||||||
|
// only for creating free-version.
|
||||||
|
switch k {
|
||||||
|
case tierFVIDKey, tierFVMarkerKey:
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
switch {
|
switch {
|
||||||
case strings.HasPrefix(strings.ToLower(k), ReservedMetadataPrefixLower), equals(k, VersionPurgeStatusKey):
|
case strings.HasPrefix(strings.ToLower(k), ReservedMetadataPrefixLower), equals(k, VersionPurgeStatusKey):
|
||||||
fi.Metadata[k] = string(v)
|
fi.Metadata[k] = string(v)
|
||||||
|
|
Loading…
Reference in New Issue