mirror of
https://github.com/minio/minio.git
synced 2024-12-25 22:55:54 -05:00
upon RenameData() quorum error delete any partial success (#18586)
there is potential for danglingWrites when quorum failed, where only some drives took a successful write, generally this is left to the healing routine to pick it up. However it is better that we delete it right away to avoid potential for quorum issues on version signature when there are many versions of an object.
This commit is contained in:
parent
e7c144eeac
commit
8fdfcfb562
@ -1036,6 +1036,17 @@ func renameData(ctx context.Context, disks []StorageAPI, srcBucket, srcEntry str
|
||||
var versionsDisparity bool
|
||||
|
||||
err := reduceWriteQuorumErrs(ctx, errs, objectOpIgnoredErrs, writeQuorum)
|
||||
if err != nil {
|
||||
for index, nerr := range errs {
|
||||
// When we are going to return error, attempt to delete success
|
||||
// on some of the drives, if we cannot we do not have to notify
|
||||
// caller this dangling object will be now scheduled to be removed
|
||||
// via active healing.
|
||||
if nerr == nil {
|
||||
disks[index].DeleteVersion(ctx, dstBucket, dstEntry, metadata[index], false)
|
||||
}
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
versions := reduceCommonVersions(diskVersions, writeQuorum)
|
||||
for index, dversions := range diskVersions {
|
||||
|
@ -97,7 +97,7 @@ func (m *mrfState) healRoutine() {
|
||||
// let recently failed networks to reconnect
|
||||
// making MRF wait for 1s before retrying,
|
||||
// i.e 4 reconnect attempts.
|
||||
time.Sleep(1 * time.Second)
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
|
||||
// wait on timer per heal
|
||||
|
Loading…
Reference in New Issue
Block a user