mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
ignore preconditionFailed error in batch replication (#16615)
This commit is contained in:
parent
74887c7372
commit
15a75bd79b
@ -671,9 +671,12 @@ func (r *BatchJobReplicateV1) Start(ctx context.Context, api ObjectLayer, job Ba
|
|||||||
stopFn := globalBatchJobsMetrics.trace(batchReplicationMetricObject, job.ID, attempts, result)
|
stopFn := globalBatchJobsMetrics.trace(batchReplicationMetricObject, job.ID, attempts, result)
|
||||||
success := true
|
success := true
|
||||||
if err := r.ReplicateToTarget(ctx, api, c, result, retry); err != nil {
|
if err := r.ReplicateToTarget(ctx, api, c, result, retry); err != nil {
|
||||||
|
if miniogo.ToErrorResponse(err).Code == "PreconditionFailed" {
|
||||||
|
// pre-condition failed means we already have the object copied over.
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// object must be deleted concurrently, allow these failures but do not count them
|
||||||
if isErrVersionNotFound(err) || isErrObjectNotFound(err) {
|
if isErrVersionNotFound(err) || isErrObjectNotFound(err) {
|
||||||
// object must be deleted concurrently, allow
|
|
||||||
// these failures but do not count them
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
stopFn(err)
|
stopFn(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user