v0.3.14-pre.009-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-worker-raw-transaction-ingest-lib/src/snapshot.rs
|
||||
// version: 6
|
||||
// version: 7
|
||||
|
||||
/// Runtime-neutral boxed future resolving to one newer concrete RAW transaction ingest Worker snapshot.
|
||||
pub type RawTransactionIngestSnapshotFuture<'a> =
|
||||
@@ -863,6 +863,9 @@ fn health_for_state(
|
||||
snapshot: &crate::RawTransactionIngestSnapshot,
|
||||
) -> ksp_worker_api::WorkerHealth {
|
||||
if state == ksp_worker_api::WorkerState::Running && snapshot.continuity_policy_observed {
|
||||
let source_total = snapshot.source_total;
|
||||
let source_active = snapshot.source_active;
|
||||
let source_failed = snapshot.source_failed;
|
||||
if snapshot.source_reconnecting > 0
|
||||
|| snapshot.continuity_has_open_gaps
|
||||
|| snapshot.continuity_frontier_slot != snapshot.processing_frontier_slot
|
||||
@@ -870,14 +873,14 @@ fn health_for_state(
|
||||
{
|
||||
return ksp_worker_api::WorkerHealth::Unhealthy;
|
||||
}
|
||||
if snapshot.source_total > 0 && snapshot.source_active == snapshot.source_total {
|
||||
if source_total > 0 && source_active == source_total {
|
||||
return ksp_worker_api::WorkerHealth::Healthy;
|
||||
}
|
||||
if snapshot.source_total > 0
|
||||
&& snapshot.source_active < snapshot.source_total
|
||||
&& snapshot.source_failed > 0
|
||||
if source_total > 0
|
||||
&& source_active < source_total
|
||||
&& source_failed > 0
|
||||
&& snapshot.failed_source_losses_reconciled
|
||||
&& snapshot.source_failed == snapshot.source_total - snapshot.source_active
|
||||
&& source_failed == source_total - source_active
|
||||
{
|
||||
return ksp_worker_api::WorkerHealth::Degraded;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user