mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 15:21:02 +00:00
rename var
This commit is contained in:
parent
f82ce17c33
commit
25227787fc
1 changed files with 2 additions and 2 deletions
|
|
@ -228,12 +228,12 @@ func (c *Cluster) PartitionNodes(partitionID int) []*Node {
|
|||
}
|
||||
|
||||
// Determine primary owner node.
|
||||
node_index := c.Hasher.Hash(uint64(partitionID), len(c.Nodes))
|
||||
nodeIndex := c.Hasher.Hash(uint64(partitionID), len(c.Nodes))
|
||||
|
||||
// Collect nodes around the ring.
|
||||
nodes := make([]*Node, replicaN)
|
||||
for i := 0; i < replicaN; i++ {
|
||||
nodes[i] = c.Nodes[(node_index+i)%len(c.Nodes)]
|
||||
nodes[i] = c.Nodes[(nodeIndex+i)%len(c.Nodes)]
|
||||
}
|
||||
|
||||
return nodes
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue