Skip to content

Fix multi-target fire-and-forget payload lifetime - #5297

Open
pcnudde wants to merge 1 commit into
NVIDIA:mainfrom
pcnudde:feat/specula-fire-forget-receivers
Open

Fix multi-target fire-and-forget payload lifetime#5297
pcnudde wants to merge 1 commit into
NVIDIA:mainfrom
pcnudde:feat/specula-fire-forget-receivers

Conversation

@pcnudde

@pcnudde pcnudde commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Fixes #5291.

A multi-target streamed fire-and-forget send could retire its downloadable payload after the first receiver finished, leaving later recipients unable to download it. Declare the distinct receiver count before encoding and avoid creating a source for an empty target list.

Keep completion count-based: receivers can enable pass-through locally, so routing targets are not necessarily the final consumers. Missing recipients retain the source until existing timeout handling settles them; this change does not add retries or exact recipient-identity verification.

Validation:

  • 119 focused Cell/downloader tests passed, including delayed/missing receivers and actual Adapter channel/topic forwarding.
  • Separate-process TCP with an 8 MiB NumPy payload and controlled receiver scheduling passed; this is not a claim of a spontaneous production incident.
  • ./runtest.sh -s passed for Python/style targets; the tool skipped notebook formatting because Jupyter extras were unavailable. No notebooks changed.
  • Full repository tests and TLS deployment validation were not run.

@pcnudde

pcnudde commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

/build

@greptile-apps

greptile-apps Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable regressions were identified.

Summary

  • Uses count-based completion so receiver-configured pass-through can finish under downstream consumer identities.
  • Returns an empty result and FUTURES mapping without allocating a downloadable source when there are no targets.
  • Adds regression coverage for delayed and missing receivers, duplicate and self targets, shared-context preservation, and actual Adapter channel/topic forwarding.
  • No actionable issues were identified. Tests were inspected but not executed during this review.

Diagram

sequenceDiagram
    participant S as Sender Cell
    participant D as Download source
    participant A as Consumer A
    participant B as Consumer B
    S->>S: Count distinct targets
    S->>D: Encode with receiver count 2
    S-->>A: Send payload references
    S-->>B: Send payload references
    A->>D: Download and complete
    Note over D: Retain payload for remaining consumer
    alt Second consumer completes
        B->>D: Download and complete
        D->>D: Release payload with completed outcome
    else Second consumer is missing
        D->>D: Existing timeout settles and releases payload
    end
Loading

Reviews (1) · Last reviewed commit: "Fix multi-target fire-and-forget payload..."

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.25%. Comparing base (83ec31a) to head (92e20e8).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5297      +/-   ##
==========================================
+ Coverage   66.87%   67.25%   +0.38%     
==========================================
  Files        1021     1021              
  Lines      106100   106129      +29     
==========================================
+ Hits        70951    71377     +426     
+ Misses      35149    34752     -397     
Flag Coverage Δ
unit-tests 67.25% <100.00%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Multi-target fire-and-forget retires downloadable payload after the first receiver

2 participants