Clear locks only if not in emergency mode

This commit is contained in:
Ingo Oppermann 2023-06-22 15:12:44 +02:00
parent a4d59a04b5
commit db00144cab
No known key found for this signature in database
GPG Key ID: 2AB32426E9DD229E

View File

@ -293,7 +293,10 @@ func (c *cluster) establishLeadership(ctx context.Context, emergency bool) error
c.cancelLeaderShip = cancel
go c.synchronizeAndRebalance(ctx, c.syncInterval, emergency)
go c.clearLocks(ctx, time.Minute)
if !emergency {
go c.clearLocks(ctx, time.Minute)
}
return nil
}