consistent_hashing 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/consistent_hashing.rb +1 -1
- data/lib/consistent_hashing/version.rb +1 -1
- data/test/test_mem_cache.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
data/lib/consistent_hashing.rb
CHANGED
@@ -75,7 +75,7 @@ module ConsistentHashing
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def create_anchors_for_server(server)
|
78
|
-
[*0
|
78
|
+
[* 0...(anchors_per_server * server.weight) ].map do |i|
|
79
79
|
Anchor.new(hash_to_unit_circle("#{server.address}:#{i}"), server)
|
80
80
|
end
|
81
81
|
end
|
data/test/test_mem_cache.rb
CHANGED
@@ -529,7 +529,7 @@ class TestMemCache < Test::Unit::TestCase
|
|
529
529
|
@cache.servers = []
|
530
530
|
@cache.add_server(server)
|
531
531
|
|
532
|
-
expected = {"localhost:11211"=>{"pid"=>
|
532
|
+
expected = {"localhost:11211"=>{"pid"=>20188, "total_items"=>32}}
|
533
533
|
assert_equal expected, @cache.stats
|
534
534
|
|
535
535
|
assert_equal "stats\r\n", socket.written.string
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: consistent_hashing
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.1.1
|
7
|
+
date: 2007-10-04 00:00:00 -07:00
|
8
8
|
summary: An implementation of consistent hashing, and a subclass of MemCache (from the memcache-client gem) that uses it.
|
9
9
|
require_paths:
|
10
10
|
- lib
|