Skip to content

Send SessionInit before streaming quickload decode#843

Merged
sduchesneau merged 2 commits into
developfrom
quickload-send-sessioninit
Jul 14, 2026
Merged

Send SessionInit before streaming quickload decode#843
sduchesneau merged 2 commits into
developfrom
quickload-send-sessioninit

Conversation

@sduchesneau

Copy link
Copy Markdown
Contributor

What

Split QuickLoad into QuickLoadOpen (cheap: confirm quicksave files exist/readable) + QuickLoadFinish (slow: stream-decode into stores). The tier1 linear resume path now emits SessionInit (trace id) and starts keepalives between open and finish.

Why

A large or cold/remote quicksave store could stream-decode for a long time with zero output to the client, risking a gateway/client idle-timeout before the trace id ever arrived. The old quickload-success path additionally never emitted a SessionInit at all.

All SessionInit emission now funnels through sendSession with a once-guard (sessionInitSent), so a quickload that emits its linear session and then falls back to a full rebuild cannot produce a second, conflicting session.

Notes

  • Failure paths release readers (QuickLoadClose, idempotent) and bbolt backends (closeQuickloadStores); a corrupt/truncated quicksave falls through to a full rebuild exactly as a missing file would.
  • Wire format unchanged; quickload remains order-independent.

🤖 Generated with Claude Code

Split QuickLoad into Open (cheap existence check) and Finish (slow
streaming decode) so the linear resume path can emit SessionInit and
start keepalives before the decode. A large or remote quicksave could
otherwise stream for a long time with zero client output, risking a
gateway/client idle-timeout before the trace id ever arrived. The old
quickload-success path also never emitted a SessionInit at all.

All SessionInit emission funnels through sendSession with a once-guard,
so a quickload that emits its linear session and then falls back to a
full rebuild cannot produce a second, conflicting session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sduchesneau

sduchesneau commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

🔍 Vulnerabilities of ghcr.io/streamingfast/substreams:0a49aae

📦 Image Reference ghcr.io/streamingfast/substreams:0a49aae
digestsha256:de388376f4174914e4802d0f36dab7b982307448340ac69971350574f07d5413
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
platformlinux/amd64
size109 MB
packages354
📦 Base Image ubuntu:24.04
also known as
  • noble
  • noble-20260610
digestsha256:52df9b1ee71626e0088f7d400d5c6b5f7bb916f8f0c82b474289a4ece6cf3faf
vulnerabilitiescritical: 0 high: 0 medium: 14 low: 5

@sduchesneau sduchesneau merged commit 3a14dc8 into develop Jul 14, 2026
8 checks passed
@sduchesneau sduchesneau deleted the quickload-send-sessioninit branch July 14, 2026 19:13
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.

3 participants