mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 10:10:42 -07:00
Only adjust downward if we have a total >= original estimate
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -818,8 +818,9 @@ func (js *jetStream) monitorCluster() {
|
||||
continue
|
||||
}
|
||||
// If we are here we do not have a leader and we did not have a previous one, so cold start.
|
||||
// Check to see if we can adjust our cluster size.
|
||||
if js, total := s.trackedJetStreamServers(); js < total {
|
||||
// Check to see if we can adjust our cluster size down iff we are in mixed mode and we have
|
||||
// seen a total that is what our original estimate was.
|
||||
if js, total := s.trackedJetStreamServers(); js < total && total >= n.ClusterSize() {
|
||||
n.AdjustBootClusterSize(js)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user