mirror of
https://github.com/minio/minio.git
synced 2025-02-03 01:46:00 -05: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 {
|
||||
return res, err
|
||||
}
|
||||
select {
|
||||
case globalReplicationPool.resyncer.resyncCancelCh <- struct{}{}:
|
||||
case <-ctx.Done():
|
||||
}
|
||||
|
||||
globalSiteResyncMetrics.updateState(rs)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user