memgraph/tests/feature_benchmark/ha
Matija Santl f85095c203 Fix Raft shutdown
Summary:
During the following scenario:
 - start a HA cluster with 3 machines
 - find the leader and start sending queries
 - SIGTERM the leader but leave other 2 machines untouched

The leader would be stuck in the shutdown phase.

This was happening because during the shutdown phase of the Bolt server, a
`graph_db_accessor` would try to commit a transaction after we've already shut
down Raft server.  Raft, although not running, is still thinking it's in the
Leader mode. Tx Engine calls the `SafeToCommit` method to Commit transactions,
and ends up in an infinite loop.

Since Raft was shut down it won't handle any of the incoming RPCs and won't
change it's mode.

The fix here is to shut down the Bolt server before Raft, so we don't have any
pending commits once Raft is shut down.

Reviewers: ipaljak

Reviewed By: ipaljak

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1853
2019-02-12 15:12:39 +01:00
..
benchmark.cpp Fix re-election in Raft 2019-01-22 14:51:24 +01:00
CMakeLists.txt Add HA benchmark 2019-01-15 13:32:04 +01:00
coordination.json Add HA benchmark 2019-01-15 13:32:04 +01:00
raft.json Add log compaction for Raft, pt. 2 2019-02-04 15:32:07 +01:00
runner.sh Fix Raft shutdown 2019-02-12 15:12:39 +01:00