raft: make followers notice leader hang
It's possible to hang an instance by some non-yielding request. The simplest example is `while true do end`. A more true to life one would be a `select{}` from a large space, or `pairs` iteration over a space without yields. Any such request makes the instance unresponsive - it can serve neither reads nor writes. At the same time, the instance appears alive to other cluster members: relay thread used to communicate with others is not hung and continues to send heartbeats every replication_timeout. The problem is the most severe with Raft leader elections: followers believe the leader is fine and do not start elections despite leader being unable to serve reads or writes. Closes #7512 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-7512-raft-leader-hang.md 5 additions, 0 deletionschangelogs/unreleased/gh-7512-raft-leader-hang.md
- src/box/relay.cc 36 additions, 11 deletionssrc/box/relay.cc
- test/replication-luatest/gh_7512_raft_leader_hang_test.lua 67 additions, 0 deletionstest/replication-luatest/gh_7512_raft_leader_hang_test.lua
Loading