Skip to content
Snippets Groups Projects
Commit ee49c51a authored by Serge Petrenko's avatar Serge Petrenko Committed by Serge Petrenko
Browse files

relay: send heartbeats on top of replication stream

There was a problem with the leader's relay continuing to ping the
remote followers even when the leader's tx thread is hung. This tricked
the followers into thinking the leader is alive and well, even though it
couldn't serve any new requests.

The problem was partially fixed by commit 56571d83 ("raft: make
followers notice leader hang"): that commit made relay thread stop
sending heartbeats in case tx thread is unresponsive.

Up to now we didn't differentiate between heartbeats and data rows: the
receipt of both was considered a sign the master is alive. So if some
replicas are not up to date with the master, they will continue thinking
it's alive until they are fully synced and notice there are no more
heartbeats from it.

In order to fix this, stop treating all data as heartbeats and start
sending heartbeats on top of an active replication stream.

Closes #7515

NO_DOC=bugfix
parent 89a60d82
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment