Skip to content

Commit

Permalink
fixing merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
josehu07 committed Oct 9, 2023
1 parent 14ede9d commit 75725bb
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 27 deletions.
15 changes: 0 additions & 15 deletions src/protocols/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ mod rs_paxos;
use rs_paxos::{RSPaxosReplica, RSPaxosClient};
pub use rs_paxos::{ReplicaConfigRSPaxos, ClientConfigRSPaxos};

mod crossword;
use crossword::{CrosswordReplica, CrosswordClient};
pub use crossword::{ReplicaConfigCrossword, ClientConfigCrossword};

/// Enum of supported replication protocol types.
#[derive(Debug, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)]
pub enum SmrProtocol {
Expand All @@ -42,7 +38,6 @@ pub enum SmrProtocol {
MultiPaxos,
Raft,
RSPaxos,
Crossword,
}

/// Helper macro for saving boilder-plate `Box<dyn ..>` mapping in
Expand All @@ -63,7 +58,6 @@ impl SmrProtocol {
"MultiPaxos" => Some(Self::MultiPaxos),
"Raft" => Some(Self::Raft),
"RSPaxos" => Some(Self::RSPaxos),
"Crossword" => Some(Self::Crossword),
_ => None,
}
}
Expand Down Expand Up @@ -128,14 +122,6 @@ impl SmrProtocol {
.await
)
}
Self::Crossword => {
box_if_ok!(
CrosswordReplica::new_and_setup(
api_addr, p2p_addr, manager, config_str
)
.await
)
}
}
}

Expand Down Expand Up @@ -199,7 +185,6 @@ mod protocols_name_tests {
valid_name_test!(MultiPaxos);
valid_name_test!(Raft);
valid_name_test!(RSPaxos);
valid_name_test!(Crossword);
}

#[test]
Expand Down
3 changes: 0 additions & 3 deletions src/protocols/multipaxos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,6 @@ pub struct MultiPaxosReplica {
/// StorageHub module for the snapshot file.
snapshot_hub: StorageHub<SnapEntry>,

/// StorageHub module for the snapshot file.
snapshot_hub: StorageHub<SnapEntry>,

/// TransportHub module.
transport_hub: TransportHub<PeerMsg>,

Expand Down
9 changes: 0 additions & 9 deletions src/protocols/rs_paxos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,6 @@ pub struct RSPaxosReplica {
/// StorageHub module for the snapshot file.
snapshot_hub: StorageHub<SnapEntry>,

/// StorageHub module for the snapshot file.
snapshot_hub: StorageHub<SnapEntry>,

/// TransportHub module.
transport_hub: TransportHub<PeerMsg>,

Expand Down Expand Up @@ -355,9 +352,6 @@ pub struct RSPaxosReplica {
/// Current durable snapshot file offset.
snap_offset: usize,

/// Current durable snapshot file offset.
snap_offset: usize,

/// Fixed Reed-Solomon coder.
rs_coder: ReedSolomon,
}
Expand Down Expand Up @@ -1540,11 +1534,8 @@ impl RSPaxosReplica {
/// Chooses a random hb_hear_timeout from the min-max range and kicks off
/// the hb_hear_timer.
fn kickoff_hb_hear_timer(&mut self) -> Result<(), SummersetError> {
<<<<<<< HEAD
=======
self.hb_hear_timer.cancel()?;

>>>>>>> cb7f7384ce0f94e2d3bc15a486d794092f95f47d
let timeout_ms = thread_rng().gen_range(
self.config.hb_hear_timeout_min..=self.config.hb_hear_timeout_max,
);
Expand Down

0 comments on commit 75725bb

Please sign in to comment.