From 9fba1c89475f9649129bb1f793f1a3f154cdfc51 Mon Sep 17 00:00:00 2001 From: Georgy Moshkin <gmoshkin@picodata.io> Date: Tue, 26 Jul 2022 18:39:29 +0300 Subject: [PATCH] chore: elaborate on the comment in Node::campaign --- src/traft/node.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/traft/node.rs b/src/traft/node.rs index 4c7ba9517b..592297db00 100644 --- a/src/traft/node.rs +++ b/src/traft/node.rs @@ -197,8 +197,10 @@ impl Node { pub fn campaign(&self) -> Result<(), Error> { self.raw_operation(|raw_node| raw_node.campaign().map_err(Into::into))?; - // even though we don't expect a response, we still should let the - // main_loop do an iteration + // Even though we don't expect a response, we still should let the + // main_loop do an iteration. Without rescheduling, the Ready state + // wouldn't be processed, the Status wouldn't be updated, and some + // assertions may fail (e.g. in `postjoin()` in `main.rs`). fiber::reschedule(); Ok(()) } -- GitLab