mirror of
https://github.com/pgsty/minio.git
synced 2026-11-04 14:52:02 +03:00
fix(pools): do not panic when a rebalance stop finds no rebalance metadata
Signed-off-by: Denis Babchuk <babchukdenis@icloud.com>
This commit is contained in:
committed by
Feng Ruohang
parent
d4e7716085
commit
525ab5fa40
@@ -826,6 +826,10 @@ func (z *erasureServerPools) saveRebalanceStats(ctx context.Context, poolIdx int
|
||||
// if not found, we store the memory metadata back
|
||||
// when rebalance status changed, will notify all nodes update status to memory, we can treat the memory metadata is the latest status
|
||||
if errors.Is(err, errConfigNotFound) {
|
||||
if z.rebalMeta == nil {
|
||||
// No rebalance has run, e.g. a rebalance stop without one.
|
||||
return errRebalanceNotStarted
|
||||
}
|
||||
r = z.rebalMeta
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user