mirror of
https://github.com/minio/minio.git
synced 2025-01-24 21:23:15 -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
|
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.
|
// restClientFromHash will return a deterministic peerRESTClient based on s.
|
||||||
// Will return nil if client is local.
|
// Will return nil if client is local.
|
||||||
func (sys *NotificationSys) restClientFromHash(s string) (client *peerRESTClient) {
|
func (sys *NotificationSys) restClientFromHash(s string) (client *peerRESTClient) {
|
||||||
if len(sys.peerClients) == 0 {
|
if len(sys.peerClients) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
peerClients := sys.getOnlinePeers()
|
peerClients := sys.allPeerClients
|
||||||
if len(peerClients) == 0 {
|
if len(peerClients) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user