From 2d40433bc1219c845481f6311d7a13477d1c1f5c Mon Sep 17 00:00:00 2001 From: Poorna Date: Mon, 29 Jul 2024 15:14:52 -0700 Subject: [PATCH] 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. --- cmd/bucket-replication.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index 6a211762a..4153b9098 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -1299,7 +1299,7 @@ func (ri ReplicateObjectInfo) replicateObject(ctx context.Context, objectAPI Obj HeaderSize: headerSize, } newCtx := ctx - if globalBucketMonitor.IsThrottled(bucket, tgt.ARN) { + if globalBucketMonitor.IsThrottled(bucket, tgt.ARN) && objInfo.Size < minLargeObjSize { var cancel context.CancelFunc newCtx, cancel = context.WithTimeout(ctx, throttleDeadline) defer cancel() @@ -1574,7 +1574,7 @@ applyAction: HeaderSize: headerSize, } newCtx := ctx - if globalBucketMonitor.IsThrottled(bucket, tgt.ARN) { + if globalBucketMonitor.IsThrottled(bucket, tgt.ARN) && objInfo.Size < minLargeObjSize { var cancel context.CancelFunc newCtx, cancel = context.WithTimeout(ctx, throttleDeadline) defer cancel()