Update hashring.go
This commit is contained in:
parent
5d542568fd
commit
013d76ce24
@ -82,6 +82,8 @@ func (h *HashRing) UpdateNode(nodeKey string, weight int) {
|
||||
}
|
||||
|
||||
func (h *HashRing) generate() {
|
||||
h.mu.Lock()
|
||||
defer h.mu.Unlock()
|
||||
var totalW int
|
||||
for _, w := range h.weights {
|
||||
totalW += w
|
||||
|
Loading…
Reference in New Issue
Block a user