Skip to content

Commit

Permalink
Change: Refactor Snpashot
Browse files Browse the repository at this point in the history
  • Loading branch information
zach-schoenberger committed Oct 19, 2023
1 parent 131b8fd commit c5740f3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions openraft/src/raft_state/membership_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ mod change_handler;
#[cfg(test)] mod membership_state_test;

pub(crate) use change_handler::ChangeHandler;
use tracing::info;

/// The state of membership configs a raft node needs to know.
///
Expand Down Expand Up @@ -86,7 +85,6 @@ where
pub(crate) fn commit(&mut self, committed_log_id: &Option<LogId<NID>>) {
if committed_log_id >= self.effective().log_id() {
debug_assert!(committed_log_id.index() >= self.effective().log_id().index());
info!("committed: {:?} effective: {:?}", self.committed, self.effective);
self.committed = self.effective.clone();
}
}
Expand Down Expand Up @@ -125,7 +123,6 @@ where
}

if c.log_id() > self.committed.log_id() {
info!("c.log_id: {:?} committed: {:?}", c.log_id(), self.committed.log_id());
self.committed = c
}

Expand Down Expand Up @@ -154,10 +151,6 @@ where

// Openraft allows at most only one non-committed membership config.
// If there is another new config, self.effective must have been committed.
info!(
"append: committed: {:?} effective: {:?}",
self.committed, self.effective
);
self.committed = self.effective.clone();
self.effective = m;
}
Expand Down

0 comments on commit c5740f3

Please sign in to comment.