From e7baf78ee8f96689047195e0af627c414ef72bbc Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Fri, 12 Apr 2024 11:13:36 -0700 Subject: [PATCH] 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. --- cmd/notification.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/cmd/notification.go b/cmd/notification.go index 5f4a583cc..a6bb014a6 100644 --- a/cmd/notification.go +++ b/cmd/notification.go @@ -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 }