Skip to content

Commit

Permalink
Add more logs for debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Yilun <[email protected]>
  • Loading branch information
yilunzhang committed Sep 14, 2018
1 parent 4994d77 commit 33436c1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/chord/vnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ func (vn *localVnode) checkNewSuccessor() error {
if err == nil {
break
}
nlog.Warn("Get predecessor error:", err)
// alive, err := trans.Ping(succ)
// if err == nil && alive {
// return errors.New("Successor alive but cannot return its predecessor")
Expand Down Expand Up @@ -232,9 +233,7 @@ func (vn *localVnode) notifySuccessor() error {
if s == nil || s.String() == vn.String() {
break
}
if vn.successors[idx+1] == nil || vn.successors[idx+1].String() != s.String() {
vn.successors[idx+1] = s
}
vn.successors[idx+1] = s
}
return nil
}
Expand Down

0 comments on commit 33436c1

Please sign in to comment.