mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Mixed mode improvements.
1. When in mixed mode and only running the global account we now will check the account for JS. 2. Added code to decrease the cluster set size if we guessed wrong in mixed mode setup. Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -912,7 +912,7 @@ func (s *Server) remoteServerShutdown(sub *subscription, _ *client, subject, rep
|
||||
}
|
||||
// Additional processing here.
|
||||
node := string(getHash(si.Name))
|
||||
s.nodeToInfo.Store(node, nodeInfo{si.Name, si.Cluster, si.ID, true})
|
||||
s.nodeToInfo.Store(node, nodeInfo{si.Name, si.Cluster, si.ID, true, true})
|
||||
}
|
||||
|
||||
// remoteServerUpdate listens for statsz updates from other servers.
|
||||
@@ -930,7 +930,7 @@ func (s *Server) remoteServerUpdate(sub *subscription, _ *client, subject, reply
|
||||
s.sendStatsz(fmt.Sprintf(serverStatsSubj, s.info.ID))
|
||||
s.mu.Unlock()
|
||||
}
|
||||
s.nodeToInfo.Store(node, nodeInfo{si.Name, si.Cluster, si.ID, false})
|
||||
s.nodeToInfo.Store(node, nodeInfo{si.Name, si.Cluster, si.ID, false, si.JetStream})
|
||||
}
|
||||
|
||||
// updateRemoteServer is called when we have an update from a remote server.
|
||||
@@ -961,7 +961,7 @@ func (s *Server) processNewServer(ms *ServerInfo) {
|
||||
s.ensureGWsInterestOnlyForLeafNodes()
|
||||
// Add to our nodeToName
|
||||
node := string(getHash(ms.Name))
|
||||
s.nodeToInfo.Store(node, nodeInfo{ms.Name, ms.Cluster, ms.ID, false})
|
||||
s.nodeToInfo.Store(node, nodeInfo{ms.Name, ms.Cluster, ms.ID, false, ms.JetStream})
|
||||
}
|
||||
|
||||
// If GW is enabled on this server and there are any leaf node connections,
|
||||
|
||||
Reference in New Issue
Block a user