mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
xl: Disable rename2 in decommissioning/rebalance (#18964)
Always disable rename2 optimization in decom/rebalance
This commit is contained in:
@@ -178,7 +178,10 @@ func shouldHealObjectOnDisk(erErr, dataErr error, meta FileInfo, latestMeta File
|
||||
return false
|
||||
}
|
||||
|
||||
const xMinIOHealing = ReservedMetadataPrefix + "healing"
|
||||
const (
|
||||
xMinIOHealing = ReservedMetadataPrefix + "healing"
|
||||
xMinIODataMov = ReservedMetadataPrefix + "data-mov"
|
||||
)
|
||||
|
||||
// SetHealing marks object (version) as being healed.
|
||||
// Note: this is to be used only from healObject
|
||||
@@ -196,6 +199,21 @@ func (fi FileInfo) Healing() bool {
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDataMov marks object (version) as being currently
|
||||
// in movement, such as decommissioning or rebalance.
|
||||
func (fi *FileInfo) SetDataMov() {
|
||||
if fi.Metadata == nil {
|
||||
fi.Metadata = make(map[string]string)
|
||||
}
|
||||
fi.Metadata[xMinIODataMov] = "true"
|
||||
}
|
||||
|
||||
// DataMov returns true if object is being in movement
|
||||
func (fi FileInfo) DataMov() bool {
|
||||
_, ok := fi.Metadata[xMinIODataMov]
|
||||
return ok
|
||||
}
|
||||
|
||||
// Heals an object by re-writing corrupt/missing erasure blocks.
|
||||
func (er *erasureObjects) healObject(ctx context.Context, bucket string, object string, versionID string, opts madmin.HealOpts) (result madmin.HealResultItem, err error) {
|
||||
dryRun := opts.DryRun
|
||||
|
||||
Reference in New Issue
Block a user