mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
replication: Init worker kill channel correctly (#12379)
Signed-off-by: Poorna Krishnamoorthy <poorna@minio.io>
This commit is contained in:
parent
4444ba13a4
commit
547bb7d0a1
@ -868,9 +868,12 @@ func NewReplicationPool(ctx context.Context, o ObjectLayer, opts replicationPool
|
||||
replicaCh: make(chan ReplicateObjectInfo, 100000),
|
||||
replicaDeleteCh: make(chan DeletedObjectVersionInfo, 100000),
|
||||
mrfReplicaCh: make(chan ReplicateObjectInfo, 100000),
|
||||
workerKillCh: make(chan struct{}, opts.Workers),
|
||||
mrfWorkerKillCh: make(chan struct{}, opts.FailedWorkers),
|
||||
ctx: ctx,
|
||||
objLayer: o,
|
||||
}
|
||||
|
||||
pool.ResizeWorkers(opts.Workers)
|
||||
pool.ResizeFailedWorkers(opts.FailedWorkers)
|
||||
return pool
|
||||
@ -888,6 +891,8 @@ func (p *ReplicationPool) AddMRFWorker() {
|
||||
return
|
||||
}
|
||||
replicateObject(p.ctx, oi, p.objLayer)
|
||||
case <-p.mrfWorkerKillCh:
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user