remove replication throttle deadline for objects > 128MiB (#20184)

context deadline was introduced to avoid a slow transfer from blocking
replication queue(s) shared by other buckets that may not be under throttling.

This PR removes this context deadline for larger objects since they are 
anyway restricted to a limited set of workers. Otherwise, objects would 
get dequeued when the throttle limit is exceeded and cannot proceed 
within the deadline.
This commit is contained in:
Poorna 2024-07-29 15:14:52 -07:00 committed by GitHub
parent 3bc39db34e
commit 2d40433bc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1299,7 +1299,7 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj
HeaderSize: headerSize, HeaderSize: headerSize,
} }
newCtx := ctx newCtx := ctx
if globalBucketMonitor.IsThrottled(bucket, tgt.ARN) { if globalBucketMonitor.IsThrottled(bucket, tgt.ARN) && objInfo.Size < minLargeObjSize {
var cancel context.CancelFunc var cancel context.CancelFunc
newCtx, cancel = context.WithTimeout(ctx, throttleDeadline) newCtx, cancel = context.WithTimeout(ctx, throttleDeadline)
defer cancel() defer cancel()
@ -1574,7 +1574,7 @@ applyAction:
HeaderSize: headerSize, HeaderSize: headerSize,
} }
newCtx := ctx newCtx := ctx
if globalBucketMonitor.IsThrottled(bucket, tgt.ARN) { if globalBucketMonitor.IsThrottled(bucket, tgt.ARN) && objInfo.Size < minLargeObjSize {
var cancel context.CancelFunc var cancel context.CancelFunc
newCtx, cancel = context.WithTimeout(ctx, throttleDeadline) newCtx, cancel = context.WithTimeout(ctx, throttleDeadline)
defer cancel() defer cancel()