mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix possible crashes on deleteMarker replication (#11308)
Delete marker can have `metaSys` set to nil, that can lead to crashes after the delete marker has been healed. Additionally also fix isObjectDangling check for transitioned objects, that do not have parts should be treated similar to Delete marker.
This commit is contained in:
@@ -182,10 +182,6 @@ func (m *xlMetaV1Object) ToFileInfo(volume, path string) (FileInfo, error) {
|
||||
if !m.valid() {
|
||||
return FileInfo{}, errFileCorrupt
|
||||
}
|
||||
var transitionStatus string
|
||||
if st, ok := m.Meta[ReservedMetadataPrefixLower+"transition-status"]; ok {
|
||||
transitionStatus = st
|
||||
}
|
||||
fi := FileInfo{
|
||||
Volume: volume,
|
||||
Name: path,
|
||||
@@ -197,8 +193,8 @@ func (m *xlMetaV1Object) ToFileInfo(volume, path string) (FileInfo, error) {
|
||||
VersionID: m.VersionID,
|
||||
DataDir: m.DataDir,
|
||||
}
|
||||
if transitionStatus != "" {
|
||||
fi.TransitionStatus = transitionStatus
|
||||
if st, ok := m.Meta[ReservedMetadataPrefixLower+"transition-status"]; ok {
|
||||
fi.TransitionStatus = st
|
||||
}
|
||||
return fi, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user