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: close open watch channel if substream is closing on reconnect #7504

Merged
merged 1 commit into from
Mar 15, 2017

Conversation

heyitsanthony
Copy link
Contributor

If substream is closing but outc is still open while reconnecting, then outc
would only be closed once the watch client would connect or once the watch
client is closed. This was leading to deadlocks in the proxy tests. Instead,
close immediately if the context is canceled.

Fixes #7503

If substream is closing but outc is still open while reconnecting, then outc
would only be closed once the watch client would connect or once the watch
client is closed. This was leading to deadlocks in the proxy tests. Instead,
close immediately if the context is canceled.

Fixes etcd-io#7503
@xiang90
Copy link
Contributor

xiang90 commented Mar 15, 2017

lgtm

@codecov-io
Copy link

Codecov Report

Merging #7504 into master will increase coverage by 0.19%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #7504      +/-   ##
==========================================
+ Coverage   70.14%   70.34%   +0.19%     
==========================================
  Files         320      320              
  Lines       26168    26178      +10     
==========================================
+ Hits        18356    18414      +58     
+ Misses       6359     6312      -47     
+ Partials     1453     1452       -1
Impacted Files Coverage Δ
clientv3/watch.go 90.67% <100%> (+1.11%)
pkg/transport/timeout_conn.go 60% <0%> (-20%)
etcdserver/util.go 94.28% <0%> (-5.72%)
pkg/adt/interval_tree.go 82.43% <0%> (-2.37%)
clientv3/lease.go 91.11% <0%> (-0.89%)
etcdserver/raft.go 87.18% <0%> (-0.54%)
etcdserver/server.go 78.76% <0%> (-0.28%)
proxy/grpcproxy/adapter/watch_client_adapter.go 94.11% <0%> (ø)
etcdserver/api/v3client/v3client.go 100% <0%> (ø)
etcdserver/api/v3rpc/lease.go 95.45% <0%> (ø)
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eed4a3f...a087325. Read the comment docs.

@heyitsanthony heyitsanthony merged commit 7a6b61c into etcd-io:master Mar 15, 2017
@heyitsanthony heyitsanthony deleted the fix-watch-wait branch March 15, 2017 15:57
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.

grpcproxy: TestWatchStressResumeClose times out
4 participants