From 21fc61ac51eedb776906e32faa77e584903c9bfd Mon Sep 17 00:00:00 2001 From: Dvir Volk Date: Tue, 8 Jul 2014 12:15:05 +0300 Subject: [PATCH] changed default number of replicas in http pool hash ring to 50, and fixed hash ring benchmark --- consistenthash/consistenthash_test.go | 2 +- http.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/consistenthash/consistenthash_test.go b/consistenthash/consistenthash_test.go index f2b82d5..1a37fd7 100644 --- a/consistenthash/consistenthash_test.go +++ b/consistenthash/consistenthash_test.go @@ -93,7 +93,7 @@ func BenchmarkGet512(b *testing.B) { benchmarkGet(b, 512) } func benchmarkGet(b *testing.B, shards int) { - hash := New(shards, nil) + hash := New(50, nil) var buckets []string for i := 0; i < shards; i++ { diff --git a/http.go b/http.go index 13b148e..ac23865 100644 --- a/http.go +++ b/http.go @@ -33,7 +33,7 @@ import ( const defaultBasePath = "/_groupcache/" // TODO: make this configurable as well. -const defaultReplicas = 3 +const defaultReplicas = 50 // HTTPPool implements PeerPicker for a pool of HTTP peers. type HTTPPool struct {