From 7fbfdceba3ba2f348a44078b6f5fb3a20722d1e9 Mon Sep 17 00:00:00 2001 From: Poorna Krishnamoorthy Date: Mon, 5 Oct 2020 14:45:42 -0700 Subject: [PATCH] Fix replication slowness (#10632) - Increase channel buffer length - Avoid blocking wait on replicaCh --- cmd/bucket-replication.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/bucket-replication.go b/cmd/bucket-replication.go index e0c96df01..dcd3262b9 100644 --- a/cmd/bucket-replication.go +++ b/cmd/bucket-replication.go @@ -310,7 +310,7 @@ func newReplicationState() *replicationState { globalReplicationConcurrent = 1 } rs := &replicationState{ - replicaCh: make(chan ObjectInfo, globalReplicationConcurrent*2), + replicaCh: make(chan ObjectInfo, 10000), } go func() { <-GlobalContext.Done() @@ -332,6 +332,7 @@ func (r *replicationState) addWorker(ctx context.Context, objectAPI ObjectLayer) return } replicateObject(ctx, oi, objectAPI) + default: } } }()