migrate bootstrap logic directly to websockets (#18855)

improve performance for startup sequences by 2x for 300+ nodes.
This commit is contained in:
Harshavardhana
2024-01-24 13:36:44 -08:00
committed by GitHub
parent c905d3fe21
commit e377bb949a
19 changed files with 568 additions and 269 deletions

View File

@@ -1036,9 +1036,8 @@ func isDirObject(object string) bool {
}
// Helper method to return total number of nodes in cluster
func totalNodeCount() uint64 {
peers, _ := globalEndpoints.peers()
totalNodesCount := uint64(len(peers))
func totalNodeCount() int {
totalNodesCount := len(globalEndpoints.Hostnames())
if totalNodesCount == 0 {
totalNodesCount = 1 // For standalone erasure coding
}