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

consultopo: Enforce a connection heartbeat for Watch(). #5673

Merged
merged 1 commit into from Jan 9, 2020

Conversation

enisoc
Copy link
Member

@enisoc enisoc commented Jan 9, 2020

We've gotten reports from Vitess users who use the consultopo plugin that watches sometimes remain stalled following a network partition, even after the process regains contact with the topo server.

This change should help us detect when a consultopo watch connection has silently died while waiting for a long poll response. I haven't thought of a good way to test this since this kind of zombie TCP connection should only happen if even the "connection closed" signal cannot be delivered (like in a network partition, as opposed to a process crash).

cc @rafael

We've gotten reports from Vitess users who use the consultopo plugin
that watches sometimes remain stalled following a network partition,
even after the process regains contact with the topo server.

This change should help us detect when a consultopo watch connection has
silently died while waiting for a long poll response. I haven't thought
of a good way to test this since this kind of zombie TCP connection
should only happen if even the "connection closed" signal cannot be
delivered (like in a network partition, as opposed to a process crash).

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

LGTM

@enisoc enisoc merged commit 35a689b into vitessio:master Jan 9, 2020
@enisoc enisoc deleted the consultopo-watch-heartbeat branch January 9, 2020 21:53
@rafael
Copy link
Member

rafael commented Jan 9, 2020

Cool! Thanks @enisoc. I'll keep an eye, see if this covers all the cases we have been running into it to.

ajm188 pushed a commit to tinyspeck/vitess that referenced this pull request Mar 11, 2020
We've gotten reports from Vitess users who use the consultopo plugin
that watches sometimes remain stalled following a network partition,
even after the process regains contact with the topo server.

This change should help us detect when a consultopo watch connection has
silently died while waiting for a long poll response. I haven't thought
of a good way to test this since this kind of zombie TCP connection
should only happen if even the "connection closed" signal cannot be
delivered (like in a network partition, as opposed to a process crash).

Signed-off-by: Anthony Yeh <enisoc@planetscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants