mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #264 from xiangli-cmu/0.2
refactor remove extra print parameter
This commit is contained in:
commit
e8a7230a1d
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"`
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user