upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-10 01:01:32 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-10 01:01:32 +0000
commit9369a2885f5a3f9e38c0a3f9fa3af6260513c8e4 (patch)
tree86410707ced8d7c1b13a82916fe144311fc45899
parente6c4524dd1c15ea6d948c8c5630a9e9de392d989 (diff)
fix: downgrade EOSE unknown subscription warning to trace
Live subscriptions (limit:0, no auto-close) are not tracked in PendingBatch because they stay open indefinitely for new events. When they receive EOSE (immediately, since no historic events), handle_eose can't find them in outstanding_subs. This is expected behavior, not an error. Changed log level from warn to trace to reduce noise. Observed in production logs: sync_live() subscriptions with limit:0 complete immediately and trigger this path. Issue: work/active-issues/eose-unknown-subscription.md
-rw-r--r--src/sync/mod.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sync/mod.rs b/src/sync/mod.rs
index 2efcbd7..412cd16 100644
--- a/src/sync/mod.rs
+++ b/src/sync/mod.rs
@@ -676,10 +676,14 @@ impl SyncManager {
676 .position(|b| b.outstanding_subs.contains(&sub_id)); 676 .position(|b| b.outstanding_subs.contains(&sub_id));
677 677
678 let Some(batch_idx) = batch_index else { 678 let Some(batch_idx) = batch_index else {
679 tracing::warn!( 679 // Live subscriptions (limit:0, no auto-close) are not tracked in PendingBatch.
680 // They complete immediately with EOSE (no historic events) and stay open for new events.
681 // Observed in production: sync_live() subscriptions trigger this path (expected).
682 // Also possible: duplicate/late EOSE from relay after batch already completed.
683 tracing::trace!(
680 relay = %relay_url, 684 relay = %relay_url,
681 sub_id = %sub_id, 685 sub_id = %sub_id,
682 "EOSE received for unknown subscription" 686 "EOSE received for subscription not tracked in batch (live subscription or late EOSE)"
683 ); 687 );
684 return; 688 return;
685 }; 689 };