Fix replication slowness (#10632)

- Increase channel buffer length
- Avoid blocking wait on replicaCh
master
Poorna Krishnamoorthy 4 years ago committed by GitHub
parent 9dda9fb903
commit 7fbfdceba3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      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:
}
}
}()

Loading…
Cancel
Save