-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
clientv3: remove redundant retries in Lease, set FailFast=true #8718
Conversation
Signed-off-by: Gyu-Ho Lee <[email protected]>
clientv3/retry.go
Outdated
@@ -168,7 +168,7 @@ type retryLeaseClient struct { | |||
readRetry retryRPCFunc | |||
} | |||
|
|||
// RetryLeaseClient implements a LeaseClient that uses the client's FailFast retry policy. | |||
// RetryLeaseClient implements a LeaseClient. |
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.
then why do we need the leaseClient at line167?
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.
can we rename the readRetry to repeatableRetry? leaseGrant is not really read.
we will have a retrypolicy: repeatable defined in the future.
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.
It has to call rlc.LeaseClient
where LeaseClient
is pb.LeaseClient
?
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.
i mean why it is embedded. it is that way so users can call to it directly. but now everything should call through the func we define on retryleaseclient.
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.
can we hide the raw client by not embedding it?
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.
Right, since retryleaseclient implements the interface, no need to embed. Changed it unexported.
Signed-off-by: Gyu-Ho Lee <[email protected]>
Signed-off-by: Gyu-Ho Lee <[email protected]>
lgtm |
Separate out from #8710.
c.f. #8691.