Merge pull request #264 from xiangli-cmu/0.2

refactor remove extra print parameter
This commit is contained in:
Xiang Li 2013-10-21 12:38:01 -07:00
commit e8a7230a1d
4 changed files with 6 additions and 6 deletions

View File

@ -46,7 +46,7 @@ func (r *Registry) Register(name string, peerVersion string, peerURL string, url
key := path.Join(RegistryKey, name)
value := fmt.Sprintf("raft=%s&etcd=%s&raftVersion=%s", peerURL, url, peerVersion)
_, err := r.store.Create(key, value, false, store.Permanent, commitIndex, term)
log.Debugf("Register: %s (%v)", name, err)
log.Debugf("Register: %s", name)
return err
}
@ -60,7 +60,7 @@ func (r *Registry) Unregister(name string, commitIndex uint64, term uint64) erro
// Remove the key from the store.
_, err := r.store.Delete(path.Join(RegistryKey, name), false, commitIndex, term)
log.Debugf("Unregister: %s (%v)", name, err)
log.Debugf("Unregister: %s", name)
return err
}

View File

@ -16,8 +16,8 @@ type CompareAndSwapCommand struct {
Key string `json:"key"`
Value string `json:"value"`
ExpireTime time.Time `json:"expireTime"`
PrevValue string `json: prevValue`
PrevIndex uint64 `json: prevIndex`
PrevValue string `json:"prevValue"`
PrevIndex uint64 `json:"prevIndex"`
}
// The name of the testAndSet command in the log

View File

@ -41,7 +41,7 @@ type Stats struct {
// Number of create requests
CreateSuccess uint64 `json:"createSuccess"`
CreateFail uint64 `json:createFail`
CreateFail uint64 `json:"createFail"`
// Number of testAndSet requests
CompareAndSwapSuccess uint64 `json:"compareAndSwapSuccess"`

View File

@ -9,7 +9,7 @@ func TestWatcher(t *testing.T) {
wh := s.WatcherHub
c, err := wh.watch("/foo", true, 1)
if err != nil {
t.Fatal("%v", err)
t.Fatalf("%v", err)
}
select {