mirror of
https://github.com/minio/minio.git
synced 2025-01-24 05:03:16 -05:00
fix: list operations resuming when hitting different node (#19494)
The rest of the peer clients were not consistent across nodes. So, meta cache requests would not go to the same server if a continuation happens on a different node.
This commit is contained in:
parent
87299eba10
commit
e7baf78ee8
@ -1104,24 +1104,13 @@ func (sys *NotificationSys) ServerInfo(metrics bool) []madmin.ServerProperties {
|
||||
return reply
|
||||
}
|
||||
|
||||
// returns all the peers that are currently online.
|
||||
func (sys *NotificationSys) getOnlinePeers() []*peerRESTClient {
|
||||
var peerClients []*peerRESTClient
|
||||
for _, peerClient := range sys.allPeerClients {
|
||||
if peerClient != nil && peerClient.IsOnline() {
|
||||
peerClients = append(peerClients, peerClient)
|
||||
}
|
||||
}
|
||||
return peerClients
|
||||
}
|
||||
|
||||
// restClientFromHash will return a deterministic peerRESTClient based on s.
|
||||
// Will return nil if client is local.
|
||||
func (sys *NotificationSys) restClientFromHash(s string) (client *peerRESTClient) {
|
||||
if len(sys.peerClients) == 0 {
|
||||
return nil
|
||||
}
|
||||
peerClients := sys.getOnlinePeers()
|
||||
peerClients := sys.allPeerClients
|
||||
if len(peerClients) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user