From e8519194befbdf207f01166f1738fd8f64b996fc Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 26 Jul 2013 13:41:32 -0700 Subject: [PATCH 1/4] Remove duplicated unnecessary file. It's in the groupcachepb sub-package. --- groupcache.pb.go | 65 ------------------------------------------------ 1 file changed, 65 deletions(-) delete mode 100644 groupcache.pb.go diff --git a/groupcache.pb.go b/groupcache.pb.go deleted file mode 100644 index db12197..0000000 --- a/groupcache.pb.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by protoc-gen-go. -// source: groupcache.proto -// DO NOT EDIT! - -package groupcache - -import proto "code.google.com/p/goprotobuf/proto" -import json "encoding/json" -import math "math" - -// Reference proto, json, and math imports to suppress error if they are not otherwise used. -var _ = proto.Marshal -var _ = &json.SyntaxError{} -var _ = math.Inf - -type GetRequest struct { - Group *string `protobuf:"bytes,1,req,name=group" json:"group,omitempty"` - Key *string `protobuf:"bytes,2,req,name=key" json:"key,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GetRequest) Reset() { *m = GetRequest{} } -func (m *GetRequest) String() string { return proto.CompactTextString(m) } -func (*GetRequest) ProtoMessage() {} - -func (m *GetRequest) GetGroup() string { - if m != nil && m.Group != nil { - return *m.Group - } - return "" -} - -func (m *GetRequest) GetKey() string { - if m != nil && m.Key != nil { - return *m.Key - } - return "" -} - -type GetResponse struct { - Value []byte `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` - MinuteQps *float64 `protobuf:"fixed64,2,opt,name=minute_qps" json:"minute_qps,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *GetResponse) Reset() { *m = GetResponse{} } -func (m *GetResponse) String() string { return proto.CompactTextString(m) } -func (*GetResponse) ProtoMessage() {} - -func (m *GetResponse) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *GetResponse) GetMinuteQps() float64 { - if m != nil && m.MinuteQps != nil { - return *m.MinuteQps - } - return 0 -} - -func init() { -} From 8b8b9d63cf222c8838785644f476920b88caab09 Mon Sep 17 00:00:00 2001 From: Steve Phillips Date: Fri, 26 Jul 2013 15:08:26 -0700 Subject: [PATCH 2/4] Fixed README typo: s/suppresion/suppression/ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 566857f..56e90c5 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ In a nutshell, a groupcache lookup of **Get("foo")** looks like: from peers, they block waiting for the load to finish and get the same answer). If not, RPC to the peer that's the owner and get the answer. If the RPC fails, just load it locally (still with - local dup suppresion). + local dup suppression). ## Users From e15e6b865b764ff857b190a248fff5887d258c92 Mon Sep 17 00:00:00 2001 From: Luit van Drongelen Date: Wed, 31 Jul 2013 00:28:33 +0200 Subject: [PATCH 3/4] fix RegisterPeerPicker panic string --- peers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peers.go b/peers.go index bfa0ab4..a74a79b 100644 --- a/peers.go +++ b/peers.go @@ -54,7 +54,7 @@ var ( // It is called once, when the first group is created. func RegisterPeerPicker(fn func() PeerPicker) { if portPicker != nil { - panic("RegisterInitPeers called more than once") + panic("RegisterPeerPicker called more than once") } portPicker = fn } From 8a39167b889ff0e89e162507f3167e76dee71a17 Mon Sep 17 00:00:00 2001 From: Luit van Drongelen Date: Wed, 31 Jul 2013 09:45:16 +0200 Subject: [PATCH 4/4] Weird use of brackets in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 56e90c5..70c29da 100644 --- a/README.md +++ b/README.md @@ -52,9 +52,9 @@ In a nutshell, a groupcache lookup of **Get("foo")** looks like: 3. Amongst all the peers in my set of N, am I the owner of the key "foo"? (e.g. does it consistent hash to 5?) If so, load it. If - other callers come in (via the same process or via RPC requests + other callers come in, via the same process or via RPC requests from peers, they block waiting for the load to finish and get the - same answer). If not, RPC to the peer that's the owner and get + same answer. If not, RPC to the peer that's the owner and get the answer. If the RPC fails, just load it locally (still with local dup suppression).