mirror of
https://github.com/minio/minio.git
synced 2025-07-19 13:38:55 -04:00
site replication: cancel ongoing op properly (#17428)
This commit is contained in:
parent
6278679ffd
commit
a9082e4f79
@ -5169,6 +5169,10 @@ func (c *SiteReplicationSys) cancelResync(ctx context.Context, objAPI ObjectLaye
|
|||||||
if err := saveSiteResyncMetadata(ctx, rs, objAPI); err != nil {
|
if err := saveSiteResyncMetadata(ctx, rs, objAPI); err != nil {
|
||||||
return res, err
|
return res, err
|
||||||
}
|
}
|
||||||
|
select {
|
||||||
|
case globalReplicationPool.resyncer.resyncCancelCh <- struct{}{}:
|
||||||
|
case <-ctx.Done():
|
||||||
|
}
|
||||||
|
|
||||||
globalSiteResyncMetrics.updateState(rs)
|
globalSiteResyncMetrics.updateState(rs)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user