Skip to content

Commit d05fa31

Browse files
author
hero
committed
编写一致性hash
1 parent eb0d8f6 commit d05fa31

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Diff for: consistent_hash_code/consistent.go

-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ func NewConsistent() *Consistent {
2222
}
2323
}
2424

25-
func (c *Consistent) P() {
26-
fmt.Println("c.hashSortNodes", c.hashSortNodes)
27-
fmt.Println("c.circle", c.circle)
28-
fmt.Println("c.nodes", c.nodes)
29-
}
30-
3125
func (c *Consistent) Add(node string) error {
3226
if _, ok := c.nodes[node]; ok { //判断新加节点是否存在
3327
return fmt.Errorf("%s already existed", node)

0 commit comments

Comments
 (0)