Skip to content

Commit

Permalink
fix misspell
Browse files Browse the repository at this point in the history
  • Loading branch information
youyuanwu committed Nov 12, 2024
1 parent b34232d commit 3f9113a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions crates/libs/core/src/runtime/stateful.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use mssf_com::FabricRuntime::IFabricStatefulServicePartition;
use crate::sync::CancellationToken;
use crate::types::{LoadMetric, LoadMetricListRef, ReplicaRole};

use crate::types::{Epoch, OpenMode, ReplicaInformation, ReplicaSetConfig, ReplicaSetQuarumMode};
use crate::types::{Epoch, OpenMode, ReplicaInformation, ReplicaSetConfig, ReplicaSetQuorumMode};

/// Represents a stateful service factory that is responsible for creating replicas
/// of a specific type of stateful service. Stateful service factories are registered with
Expand Down Expand Up @@ -135,7 +135,7 @@ pub trait LocalPrimaryReplicator: Replicator {
) -> crate::Result<()>;
async fn wait_for_catch_up_quorum(
&self,
catchupmode: ReplicaSetQuarumMode,
catchupmode: ReplicaSetQuorumMode,
cancellation_token: CancellationToken,
) -> crate::Result<()>;
fn update_current_replica_set_configuration(
Expand Down
4 changes: 2 additions & 2 deletions crates/libs/core/src/runtime/stateful_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use crate::{
use super::stateful::{
PrimaryReplicator, Replicator, StatefulServicePartition, StatefulServiceReplica,
};
use crate::types::{Epoch, OpenMode, ReplicaInformation, ReplicaSetConfig, ReplicaSetQuarumMode};
use crate::types::{Epoch, OpenMode, ReplicaInformation, ReplicaSetConfig, ReplicaSetQuorumMode};

pub struct StatefulServiceReplicaProxy {
com_impl: IFabricStatefulServiceReplica,
Expand Down Expand Up @@ -259,7 +259,7 @@ impl PrimaryReplicator for PrimaryReplicatorProxy {
}
async fn wait_for_catch_up_quorum(
&self,
catchupmode: ReplicaSetQuarumMode,
catchupmode: ReplicaSetQuorumMode,
cancellation_token: CancellationToken,
) -> crate::Result<()> {
info!("PrimaryReplicatorProxy::wait_for_catch_up_quorum: catchupmode {catchupmode:?}");
Expand Down
22 changes: 11 additions & 11 deletions crates/libs/core/src/types/runtime/stateful.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,29 +260,29 @@ impl ReplicaInformation {

// FABRIC_REPLICA_SET_QUORUM_MODE
#[derive(Debug, Clone, PartialEq)]
pub enum ReplicaSetQuarumMode {
pub enum ReplicaSetQuorumMode {
All,
Invalid,
Write,
}

impl From<FABRIC_REPLICA_SET_QUORUM_MODE> for ReplicaSetQuarumMode {
impl From<FABRIC_REPLICA_SET_QUORUM_MODE> for ReplicaSetQuorumMode {
fn from(r: FABRIC_REPLICA_SET_QUORUM_MODE) -> Self {
match r {
FABRIC_REPLICA_SET_QUORUM_ALL => ReplicaSetQuarumMode::All,
FABRIC_REPLICA_SET_QUORUM_INVALID => ReplicaSetQuarumMode::Invalid,
FABRIC_REPLICA_SET_WRITE_QUORUM => ReplicaSetQuarumMode::Write,
_ => ReplicaSetQuarumMode::Invalid,
FABRIC_REPLICA_SET_QUORUM_ALL => ReplicaSetQuorumMode::All,
FABRIC_REPLICA_SET_QUORUM_INVALID => ReplicaSetQuorumMode::Invalid,
FABRIC_REPLICA_SET_WRITE_QUORUM => ReplicaSetQuorumMode::Write,
_ => ReplicaSetQuorumMode::Invalid,
}
}
}

impl From<ReplicaSetQuarumMode> for FABRIC_REPLICA_SET_QUORUM_MODE {
fn from(val: ReplicaSetQuarumMode) -> Self {
impl From<ReplicaSetQuorumMode> for FABRIC_REPLICA_SET_QUORUM_MODE {
fn from(val: ReplicaSetQuorumMode) -> Self {
match val {
ReplicaSetQuarumMode::All => FABRIC_REPLICA_SET_QUORUM_ALL,
ReplicaSetQuarumMode::Invalid => FABRIC_REPLICA_SET_QUORUM_INVALID,
ReplicaSetQuarumMode::Write => FABRIC_REPLICA_SET_WRITE_QUORUM,
ReplicaSetQuorumMode::All => FABRIC_REPLICA_SET_QUORUM_ALL,
ReplicaSetQuorumMode::Invalid => FABRIC_REPLICA_SET_QUORUM_INVALID,
ReplicaSetQuorumMode::Write => FABRIC_REPLICA_SET_WRITE_QUORUM,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/samples/echomain-stateful2/src/statefulstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use mssf_core::{
},
},
types::{
Epoch, OpenMode, ReplicaInformation, ReplicaRole, ReplicaSetConfig, ReplicaSetQuarumMode,
Epoch, OpenMode, ReplicaInformation, ReplicaRole, ReplicaSetConfig, ReplicaSetQuorumMode,
},
};
use mssf_core::{Error, HSTRING};
Expand Down Expand Up @@ -122,7 +122,7 @@ impl PrimaryReplicator for AppFabricReplicator {

async fn wait_for_catch_up_quorum(
&self,
_catchupmode: ReplicaSetQuarumMode,
_catchupmode: ReplicaSetQuorumMode,
_: CancellationToken,
) -> mssf_core::Result<()> {
info!("AppFabricReplicator2::PrimaryReplicator::wait_for_catch_up_quorum");
Expand Down

0 comments on commit 3f9113a

Please sign in to comment.