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/runtime_resources.rs
|
||||
// version: 37
|
||||
// version: 38
|
||||
|
||||
use sha2::Digest; // rust-rules: trait-import
|
||||
|
||||
@@ -455,11 +455,8 @@ fn source_inventory_health_projection(
|
||||
std::result::Result::Err(error) => return std::result::Result::Err(error),
|
||||
}
|
||||
};
|
||||
return std::result::Result::Ok(
|
||||
aggregate
|
||||
.with_continuity_health(continuity_frontier_slot, continuity_has_open_gaps, future_target_coverage)
|
||||
.with_failed_source_losses_reconciled(failed_source_losses_reconciled),
|
||||
);
|
||||
let aggregate = aggregate.with_continuity_health(continuity_frontier_slot, continuity_has_open_gaps, future_target_coverage);
|
||||
return std::result::Result::Ok(aggregate.with_failed_source_losses_reconciled(failed_source_losses_reconciled));
|
||||
}
|
||||
|
||||
impl RawTransactionIngestSourceInventoryPublisher {
|
||||
|
||||
@@ -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