mirror of
https://github.com/predis/predis.git
synced 2026-09-05 07:16:44 +00:00
Fixed a bug in HashRing::remove()
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user