mirror of
https://github.com/minio/minio.git
synced 2025-01-12 07:23:23 -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),
|
replicaCh: make(chan ReplicateObjectInfo, 100000),
|
||||||
replicaDeleteCh: make(chan DeletedObjectVersionInfo, 100000),
|
replicaDeleteCh: make(chan DeletedObjectVersionInfo, 100000),
|
||||||
mrfReplicaCh: make(chan ReplicateObjectInfo, 100000),
|
mrfReplicaCh: make(chan ReplicateObjectInfo, 100000),
|
||||||
|
workerKillCh: make(chan struct{}, opts.Workers),
|
||||||
|
mrfWorkerKillCh: make(chan struct{}, opts.FailedWorkers),
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
objLayer: o,
|
objLayer: o,
|
||||||
}
|
}
|
||||||
|
|
||||||
pool.ResizeWorkers(opts.Workers)
|
pool.ResizeWorkers(opts.Workers)
|
||||||
pool.ResizeFailedWorkers(opts.FailedWorkers)
|
pool.ResizeFailedWorkers(opts.FailedWorkers)
|
||||||
return pool
|
return pool
|
||||||
@ -888,6 +891,8 @@ func (p *ReplicationPool) AddMRFWorker() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
replicateObject(p.ctx, oi, p.objLayer)
|
replicateObject(p.ctx, oi, p.objLayer)
|
||||||
|
case <-p.mrfWorkerKillCh:
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user