Skip to main content

reddb_server/cluster/
mod.rs

1//! Shared cluster identity and membership model.
2
3pub mod archive_recovery;
4pub mod bootstrap_authority;
5pub mod commit_resolution;
6pub mod control_plane;
7pub mod cross_range;
8pub mod drain;
9pub mod hot_mirror_failover;
10pub mod identity;
11pub mod join;
12pub mod membership;
13pub mod move_range;
14pub mod ownership;
15pub mod ownership_force;
16pub mod ownership_lease;
17pub mod ownership_transition;
18pub mod placement;
19pub mod routing;
20pub mod slot;
21pub mod supervisor;
22pub mod topology;
23
24pub use archive_recovery::{
25    recover_archive_replica, ArchiveRecoveryError, ArchiveRecoveryMode, ArchiveRecoveryOutcome,
26    ArchiveRecoveryRequest, ArchiveRecoveryRpoEvidence, ArchivedRangeReplica,
27    RestoredArchiveReplica, SkippedDataEvidence,
28};
29pub use bootstrap_authority::{
30    authorize as authorize_cluster_bootstrap, authorize_vault_bootstrap, is_cluster_shaped,
31    plan_vault_bootstrap, AuthBootstrapInput, BootstrapDisposition, VaultBootstrapPlan,
32};
33pub use commit_resolution::{
34    is_local_ack, resolve_commit_policy, resolve_request_commit_policy, CollectionDataModel,
35    CommitPolicyResolution, CommitPolicyViolation, FailoverEligibility, GuardrailDisposition,
36    HaIntent, ResolutionSource,
37};
38pub use control_plane::{
39    ControlPlaneConsensus, ControlPlaneEntry, ControlPlaneError, ControlPlaneIndex,
40    ControlPlaneTerm, DurableVoteState, MembershipChange, OwnershipTransition,
41    SingleNodeControlPlane,
42};
43pub use cross_range::{
44    ConsistentReadLeg, ConsistentReadPlan, ConsistentReadReject, ExactClaimPlan, ExactClaimReject,
45    GlobalReadWatermark, KeyTarget, PinnedTarget, RangeParticipant, ReadFanout, ReadFanoutBudget,
46    ReadFanoutPolicy, ReadFanoutReject, ReadFanoutTrace, ReadLeg, ResolvedTarget,
47    WriteTransactionPlan, WriteTransactionReject, WriterParticipation,
48};
49pub use drain::{
50    drain_status, plan_drain, plan_force_remove, run_drain, run_force_remove, DrainBlock,
51    DrainBlockReason, DrainOutcome, DrainPlan, DrainStatus, DrainStep, ForceCapability,
52    ForceRemoveAudit, ForceRemoveOrder, ForceRemoveOrderError, ForceRemovePlan, ForceRemoveResult,
53    ForcedBlock, ForcedPromotion, OwnedHandoff, RemovalRejection, ReplicaEvacuation,
54};
55pub use hot_mirror_failover::{
56    execute_hot_mirror_failover, plan_hot_mirror_failover, HotMirrorEpochEvidence,
57    HotMirrorFailoverCandidate, HotMirrorFailoverError, HotMirrorFailoverEvidence,
58    HotMirrorFailoverPlan, HotMirrorInputs, HotMirrorRangeEvidence, WatermarkOutcome,
59};
60pub use identity::{
61    ClusterVoterIdentity, NodeIdentity, NodeIdentityError, ReplicationPeerIdentity,
62};
63pub use join::{ControlPlaneSnapshot, JoinGrant, JoinRejection, JoinRequest, SeedAuthority};
64pub use membership::{
65    AdmissionOutcome, BaselineAssessment, ClusterId, ClusterIdError, ClusterMember, MemberKind,
66    MemberState, MembershipCatalog, RESILIENT_DATA_MEMBER_BASELINE,
67};
68pub use move_range::{
69    classify_move, recover_interrupted_move, split_range, MoveError, MoveKind, MovePhase,
70    MoveRange, MoveRecovery, RangeSplit, SplitError, SplitPolicy, SplitSide,
71};
72pub use ownership::{
73    CatalogError, CatalogVersion, CollectionGroupAuthority, CollectionGroupId,
74    CollectionGroupIdError, CollectionId, CollectionIdError, HotMirrorCandidate,
75    HotMirrorPromotion, HotMirrorPromotionRefusal, OwnershipEpoch, PlacementAuthorityCatalog,
76    PlacementAuthorityError, PlacementAuthorityId, PlacementAuthorityIdError, PlacementMetadata,
77    RangeBound, RangeBounds, RangeBoundsError, RangeId, RangeOwnership, RangeRole,
78    RangeWriteReject, ReplicaRole, ShardKeyMode, ShardOwnershipCatalog, UpdateOutcome,
79};
80pub use ownership_force::{
81    force_transition, EmptyOperatorReason, ForceDenial, ForceFailure, ForceTransitionCapability,
82    ForcedTransitionAudit, ForcedTransitionDisposition, ForcedTransitionRequest, OperatorReason,
83};
84pub use ownership_lease::{
85    admit_durable_write, DurableWriteReject, FenceReason, LeaseFenceRejection, LeasedOwner,
86    OwnerWriteMode, OwnershipLease, RangeRequest, SupervisorTerm,
87};
88pub use ownership_transition::{
89    prepare, run_transition, validate_archive_recovery_source, ArchiveRecoveryEvidence,
90    ArchiveRecoveryRejection, CatchUpEvidence, CommitWatermark, InvalidCandidateReason,
91    PreparedTransition, TransitionError, TransitionKind, TransitionOutcome, TransitionRejection,
92    TransitionRequest,
93};
94pub use placement::{
95    AuthorityScopedPlannedMove, AuthorityScopedRebalancePlan, CollectionGroupPlacementAuthority,
96    HotspotRange, MemberCapacity, MoveReason, PlacementPolicy, PlacementSignals, PlacementWarning,
97    PlannedMove, PlannedReplicaReplacement, RangeLoad, RebalancePlan, WeightedPlacementPlanner,
98    NEUTRAL_OPERATOR_WEIGHT,
99};
100pub use routing::{
101    ForwardContext, ForwardCoordinator, ForwardError, ForwardMetadata, ForwardMetricsSnapshot,
102    ForwardOutcome, RedirectReason, RequestOperation, RouteDecision, RoutedRequest, RoutingHint,
103    RoutingPolicy, DEFAULT_FORWARD_IN_FLIGHT_LIMIT, DEFAULT_FORWARD_PER_HOP_BUDGET_MS,
104    DEFAULT_MAX_FORWARD_HOPS, DEFAULT_MAX_FORWARD_PAYLOAD,
105};
106pub use slot::{
107    hash_shard_key_to_range_key, hash_shard_key_to_slot, HashSlot, HashSlotError,
108    PRODUCTION_HASH_SLOT_COUNT,
109};
110pub use supervisor::{
111    BlockedFailover, BlockedReason, ClusterSignals, ClusterSupervisor, FailoverPlan, HealthClass,
112    HealthPolicy, HealthScore, MemberSignals, PlannedPromotion,
113};
114pub use topology::{
115    ClientTopology, HintOutcome, RefreshOutcome, TopologyAuthority, TopologyRange,
116    TopologySnapshot, TopologyUpdate,
117};