From 84ea2f50669779d9b7f85071b39fca4c8fc55065 Mon Sep 17 00:00:00 2001 From: Harsh Soni Date: Mon, 24 Apr 2023 19:17:12 +0530 Subject: [PATCH] raft: fsm: add empty check for `max_read_id_with_quorum` Updated the empty() function in the struct fsm_output to include the max_read_id_with_quorum field when checking whether the fsm output is empty or not. The change was made in order maintain consistency with the codebase and adding completeness to the empty check. This change has no impact on other parts of the codebase. Closes #13656 --- raft/fsm.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/raft/fsm.hh b/raft/fsm.hh index ba226301d8..84498f7054 100644 --- a/raft/fsm.hh +++ b/raft/fsm.hh @@ -47,7 +47,7 @@ struct fsm_output { return !term_and_vote && log_entries.size() == 0 && messages.size() == 0 && committed.size() == 0 && !snp && snps_to_drop.empty() && - !configuration; + !configuration && !max_read_id_with_quorum; } }; @@ -654,4 +654,3 @@ void fsm::step(server_id from, Message&& msg) { } } // namespace raft -