mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
make sure to set Versioned field to ensure rename2 is not called (#18141)
without this the rename2() can rename the previous dataDir causing issues for different versions of the object, only latest version is preserved due to this bug. Added healing code to ensure recovery of such content.
This commit is contained in:
@@ -496,13 +496,16 @@ func (er erasureObjects) deleteIfDangling(ctx context.Context, bucket, object st
|
||||
m, ok := isObjectDangling(metaArr, errs, dataErrs)
|
||||
if ok {
|
||||
tags := make(map[string]interface{}, 4)
|
||||
tags["size"] = m.Size
|
||||
tags["set"] = er.setIndex
|
||||
tags["pool"] = er.poolIndex
|
||||
tags["merrs"] = errors.Join(errs...)
|
||||
tags["derrs"] = errors.Join(dataErrs...)
|
||||
tags["mtime"] = m.ModTime.Format(http.TimeFormat)
|
||||
tags["parity"] = m.Erasure.ParityBlocks
|
||||
if m.IsValid() {
|
||||
tags["size"] = m.Size
|
||||
tags["mtime"] = m.ModTime.Format(http.TimeFormat)
|
||||
tags["parity"] = m.Erasure.ParityBlocks
|
||||
}
|
||||
|
||||
if cok {
|
||||
tags["caller"] = fmt.Sprintf("%s:%d", file, line)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user