Fixed a bug in HashRing::remove()

This commit is contained in:
Daniele Alessandri
2009-11-11 14:14:02 +01:00
parent 4fecc17bfd
commit 1a8f832d6c
+1 -1
View File
@@ -692,7 +692,7 @@ class HashRing {
public function remove($node) {
$nodeHash = (string) $node;
for ($i = 0; $i < $this->_replicas; $i++) {
$key = crc32($nodeHash . '_' . $i);
$key = crc32($nodeHash . ':' . $i);
unset($this->_ring[$key]);
$this->_ringKeys = array_filter($this->_ringKeys, function($rk) use($key) {
return $rk !== $key;