Skip to content
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

Merged
merged 3 commits into from
Oct 19, 2017

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Oct 19, 2017

Separate out from #8710.
c.f. #8691.

@gyuho gyuho requested a review from xiang90 October 19, 2017 21:53
@@ -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.
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@xiang90
Copy link
Contributor

xiang90 commented Oct 19, 2017

lgtm

@gyuho gyuho merged commit ad78825 into etcd-io:master Oct 19, 2017
@gyuho gyuho deleted the qqq branch October 19, 2017 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants