lightspeed/cluster/durable_backend
Durable backend conformance contracts for M49.
Types
Durable backend class.
pub type BackendClass {
SqlQuorum
KvConsensus
LogReplicated
ObjectManifest
}
Constructors
-
SqlQuorum -
KvConsensus -
LogReplicated -
ObjectManifest
One durable backend contract.
pub type BackendContract {
BackendContract(
name: String,
class: BackendClass,
durable_store: String,
takeover_requires_fencing: Bool,
recovery_requires_replay: Bool,
continuity_slo_ms: Int,
max_data_loss_events: Int,
supported_pressures: List(PressureProfile),
artifact: CertificationArtifact,
)
}
Constructors
-
BackendContract( name: String, class: BackendClass, durable_store: String, takeover_requires_fencing: Bool, recovery_requires_replay: Bool, continuity_slo_ms: Int, max_data_loss_events: Int, supported_pressures: List(PressureProfile), artifact: CertificationArtifact, )
Budget-check result.
pub type BudgetResult {
BudgetResult(
backend: String,
pressure: PressureProfile,
passed: Bool,
reason: String,
)
}
Constructors
-
BudgetResult( backend: String, pressure: PressureProfile, passed: Bool, reason: String, )
Backend certification artifacts.
pub type CertificationArtifact {
CertificationArtifact(
tuning_guide: String,
certification_report: String,
evidence_manifest: String,
)
}
Constructors
-
CertificationArtifact( tuning_guide: String, certification_report: String, evidence_manifest: String, )
One failover observation under dependency pressure.
pub type Observation {
Observation(
backend: String,
pressure: PressureProfile,
takeover_ms: Int,
recovery_ms: Int,
fence_rejections: Int,
data_loss_events: Int,
continuity_met: Bool,
)
}
Constructors
-
Observation( backend: String, pressure: PressureProfile, takeover_ms: Int, recovery_ms: Int, fence_rejections: Int, data_loss_events: Int, continuity_met: Bool, )
External dependency pressure profile.
pub type PressureProfile {
Nominal
DependencyDegraded
DependencyPartitioned
}
Constructors
-
Nominal -
DependencyDegraded -
DependencyPartitioned
SLO budget by pressure profile.
pub type SloBudget {
SloBudget(
pressure: PressureProfile,
max_takeover_ms: Int,
max_recovery_ms: Int,
max_data_loss_events: Int,
)
}
Constructors
-
SloBudget( pressure: PressureProfile, max_takeover_ms: Int, max_recovery_ms: Int, max_data_loss_events: Int, )
Values
pub fn artifact(
backend: BackendContract,
) -> CertificationArtifact
Backend artifact accessor.
pub fn artifact_signature(
artifact: CertificationArtifact,
) -> String
Stable artifact signature.
pub fn backend_class_label(class: BackendClass) -> String
Stable backend-class label.
pub fn backend_matrix_certified() -> Bool
Deterministic M49 backend-matrix certification invariant.
pub fn backend_signature(backend: BackendContract) -> String
Stable backend signature.
pub fn budget_failures(results: List(BudgetResult)) -> Int
Count failing budget checks.
pub fn budget_result_signature(result: BudgetResult) -> String
Stable budget-result signature.
pub fn default_slo_budgets() -> List(SloBudget)
Deterministic M49 pressure budgets.
pub fn evaluate_slo_budget(
observations: List(Observation),
budgets: List(SloBudget),
) -> List(BudgetResult)
Evaluate one pressure-matrix run against one SLO budget profile.
pub fn matrix_signature() -> String
Stable matrix signature across expanded backends.
pub fn observation_signature(observation: Observation) -> String
Stable pressure observation signature.
pub fn run_pressure_matrix() -> List(Observation)
Run deterministic pressure matrix across all expanded backends.
pub fn takeover_fencing_recovery_certified() -> Bool
Deterministic takeover/fencing/recovery semantics certification.