0.3.15-pre.009-fix.003

This commit is contained in:
2026-09-14 21:06:32 +02:00
parent 8ae4d0effd
commit 9fd51c5a41
7 changed files with 383 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-worker-raw-transaction-ingest-lib/src/runtime.rs
// version: 18
// version: 19
type PersistencePort = std::sync::Arc<dyn crate::RawTransactionIngestPersistencePort + 'static>;
type PersistenceTasks = tokio::task::JoinSet<ksp_core_lib::Result<crate::RawTransactionIngestPersistenceOutcome>>;
@@ -196,7 +196,8 @@ async fn drain_admission_and_persistence(
snapshots: &mut crate::RawTransactionIngestSnapshotPublisher,
) -> std::option::Option<ksp_core_lib::ErrorCode> {
let mut fault = std::option::Option::None;
admission.close();
// Keep admission open while cooperative sources observe the stop signal and drop their senders.
// Closing the receiver here races with nested source-stop propagation.
loop {
while persistence.len() >= settings.persistence_concurrency() {
let joined = persistence.join_next().await;