-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
etcdserver: forward member promote to leader #31
Conversation
57a06ba
to
12e26d2
Compare
12e26d2
to
83e3a65
Compare
@jpbetz PR updated. PTAL! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one comment, feel free to merge after having a look at it.
@@ -260,7 +260,11 @@ func (s *EtcdServer) LeaseRenew(ctx context.Context, id lease.LeaseID) (int64, e | |||
} | |||
} | |||
} | |||
return -1, ErrTimeout | |||
|
|||
if cctx.Err() == context.DeadlineExceeded { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to change the return logic in lease timetolive and renew
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cctx.Err() can be either due to timeout or cancellation. I think in the original code, user can cancel the context but the returned error is ErrTimeout.
minor things.LGTM |
83e3a65
to
9d6ad5b
Compare
This PR adds server side forwarding of member promote request.
cc @jpbetz @gyuho @WIZARD-CXY