소스 검색

Fixed a bug in HashRing::remove()

Daniele Alessandri 16 년 전
부모
커밋
1a8f832d6c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/Predis.php

+ 1 - 1
lib/Predis.php

@@ -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;