Skip to content

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

Merged
enisoc merged 1 commit intovitessio:masterfrom
planetscale:consultopo-watch-heartbeat
Jan 9, 2020
Merged

consultopo: Enforce a connection heartbeat for Watch().#5673
enisoc merged 1 commit intovitessio:masterfrom
planetscale:consultopo-watch-heartbeat

Conversation

@enisoc
Copy link
Copy Markdown
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>
@enisoc enisoc requested a review from sougou as a code owner January 9, 2020 01:01
@enisoc enisoc requested a review from deepthi January 9, 2020 01:01
Copy link
Copy Markdown
Collaborator

@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
Copy Markdown
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.

3 participants