Skip to content

Commit

Permalink
refactor: disable dedup
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
  • Loading branch information
bsbds committed Aug 19, 2024
1 parent 3044f94 commit 243f704
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crates/curp/src/server/raw_curp/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(unused)]
//! READ THIS BEFORE YOU START WRITING CODE FOR THIS MODULE
//! To avoid deadlock, let's make some rules:
//! 1. To group similar functions, I divide Curp impl into three scope: one for utils(don't grab lock here), one for tick, one for handlers
Expand Down Expand Up @@ -639,7 +640,6 @@ impl<C: Command, RC: RoleChange> RawCurp<C, RC> {
if self.lst.get_transferee().is_some() {
return Err(CurpError::LeaderTransfer("leader transferring".to_owned()));
}
self.deduplicate(propose_id, None)?;
let mut log_w = self.log.write();
let entry = log_w.push(st_r.term, propose_id, EntryData::Shutdown);
debug!("{} gets new log[{}]", self.id(), entry.index);
Expand Down Expand Up @@ -673,7 +673,6 @@ impl<C: Command, RC: RoleChange> RawCurp<C, RC> {
}
self.check_new_config(&conf_changes)?;

self.deduplicate(propose_id, None)?;
let mut log_w = self.log.write();
let entry = log_w.push(st_r.term, propose_id, conf_changes.clone());
debug!("{} gets new log[{}]", self.id(), entry.index);
Expand Down

0 comments on commit 243f704

Please sign in to comment.