mirror of
https://github.com/minio/minio.git
synced 2026-02-04 18:00:15 -05:00
fix: remove unnecessary replication checks (#21569)
This commit is contained in:
@@ -394,9 +394,9 @@ func (er erasureObjects) newMultipartUpload(ctx context.Context, bucket string,
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// if object doesn't exist and not a replication request return error for If-Match conditional requests
|
// if object doesn't exist return error for If-Match conditional requests
|
||||||
// If-None-Match should be allowed to proceed for non-existent objects
|
// If-None-Match should be allowed to proceed for non-existent objects
|
||||||
if err != nil && !opts.ReplicationRequest && opts.HasIfMatch && (isErrObjectNotFound(err) || isErrVersionNotFound(err)) {
|
if err != nil && opts.HasIfMatch && (isErrObjectNotFound(err) || isErrVersionNotFound(err)) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1118,9 +1118,9 @@ func (er erasureObjects) CompleteMultipartUpload(ctx context.Context, bucket str
|
|||||||
return ObjectInfo{}, err
|
return ObjectInfo{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// if object doesn't exist and not a replication request return error for If-Match conditional requests
|
// if object doesn't exist return error for If-Match conditional requests
|
||||||
// If-None-Match should be allowed to proceed for non-existent objects
|
// If-None-Match should be allowed to proceed for non-existent objects
|
||||||
if err != nil && !opts.ReplicationRequest && opts.HasIfMatch && (isErrObjectNotFound(err) || isErrVersionNotFound(err)) {
|
if err != nil && opts.HasIfMatch && (isErrObjectNotFound(err) || isErrVersionNotFound(err)) {
|
||||||
return ObjectInfo{}, err
|
return ObjectInfo{}, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1278,9 +1278,9 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
|
|||||||
return objInfo, err
|
return objInfo, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// if object doesn't exist and not a replication request return error for If-Match conditional requests
|
// if object doesn't exist return error for If-Match conditional requests
|
||||||
// If-None-Match should be allowed to proceed for non-existent objects
|
// If-None-Match should be allowed to proceed for non-existent objects
|
||||||
if err != nil && !opts.ReplicationRequest && opts.HasIfMatch && (isErrObjectNotFound(err) || isErrVersionNotFound(err)) {
|
if err != nil && opts.HasIfMatch && (isErrObjectNotFound(err) || isErrVersionNotFound(err)) {
|
||||||
return objInfo, err
|
return objInfo, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -420,9 +420,6 @@ func putOptsFromHeaders(ctx context.Context, hdr http.Header, metadata map[strin
|
|||||||
MTime: mtime,
|
MTime: mtime,
|
||||||
PreserveETag: etag,
|
PreserveETag: etag,
|
||||||
}
|
}
|
||||||
if _, ok := hdr[xhttp.MinIOSourceReplicationRequest]; ok {
|
|
||||||
op.ReplicationRequest = true
|
|
||||||
}
|
|
||||||
return op, nil
|
return op, nil
|
||||||
}
|
}
|
||||||
// default case of passing encryption headers and UserDefined metadata to backend
|
// default case of passing encryption headers and UserDefined metadata to backend
|
||||||
|
|||||||
Reference in New Issue
Block a user