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: fix lease "freezing" on unhealthy cluster #7023

Merged
merged 3 commits into from
Dec 16, 2016

Conversation

heyitsanthony
Copy link
Contributor

No description provided.

mkReqs(1)
clus.Members[1].Stop(t)
mkReqs(2)
time.Sleep(time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q. Why do we wait here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise the leader resumes too fast; couldn't trigger the failure without it

@fanminshi
Copy link
Member

what was the original issue that this pr is trying to fix?

@heyitsanthony
Copy link
Contributor Author

@fanminshi

  1. error wasn't coded as Unavailable so it was causing the lease keep alive loop to terminate.
  2. if Grant received a non-halting error, it would try to reset the keepalive loop stream, which would cancel outstanding keepalives.

@xiang90
Copy link
Contributor

xiang90 commented Dec 16, 2016

lgtm

probably worth to add the explanation #7023 (comment) to the commit message.

Lack of GRPC code was causing this to look like a halting error to the client.
@@ -574,3 +576,54 @@ func TestLeaseKeepAliveLoopExit(t *testing.T) {
t.Fatalf("expected %T, got %v(%T)", clientv3.ErrKeepAliveHalted{}, err, err)
}
}

func TestV3LeaseFailureOverlap(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be nice to add some explanation to why we need this test in the file. so the future reader might have a context.

Other than that LGTM.

Anthony Romano added 2 commits December 16, 2016 10:36
@heyitsanthony heyitsanthony merged commit 531c306 into etcd-io:master Dec 16, 2016
@heyitsanthony heyitsanthony deleted the lease-freeze branch December 16, 2016 19:38
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.

4 participants