mirror of
https://github.com/minio/minio.git
synced 2025-01-12 15:33:22 -05:00
Signal stop-rebalance to all rebalancing pools (#16438)
This commit is contained in:
parent
5c1a4ba5f9
commit
71c95ad0d0
@ -353,6 +353,7 @@ func (z *erasureServerPools) rebalanceBuckets(ctx context.Context, poolIdx int)
|
||||
z.rebalMu.Lock()
|
||||
z.rebalMeta.PoolStats[poolIdx].Info.Status = rebalStopped
|
||||
z.rebalMeta.PoolStats[poolIdx].Info.EndTime = now
|
||||
z.rebalMeta.cancel = nil // remove the already used context.CancelFunc
|
||||
z.rebalMu.Unlock()
|
||||
|
||||
rebalDone = true
|
||||
|
@ -649,6 +649,15 @@ func (sys *NotificationSys) StopRebalance(ctx context.Context) {
|
||||
logger.LogIf(logger.SetReqInfo(ctx, reqInfo), nErr.Err)
|
||||
}
|
||||
}
|
||||
|
||||
objAPI := newObjectLayerFn()
|
||||
if objAPI == nil {
|
||||
logger.LogIf(ctx, errServerNotInitialized)
|
||||
return
|
||||
}
|
||||
if pools, ok := objAPI.(*erasureServerPools); ok {
|
||||
pools.StopRebalance()
|
||||
}
|
||||
}
|
||||
|
||||
// LoadRebalanceMeta notifies all peers to load rebalance.bin from object layer.
|
||||
|
Loading…
Reference in New Issue
Block a user