Skip to content

Disconnect clients when back-processing ends far behind - #939

Draft
sduchesneau wants to merge 1 commit into
developfrom
linear-handoff-reconnect
Draft

sduchesneau wants to merge 1 commit into
developfrom
linear-handoff-reconnect

Conversation

@sduchesneau

Copy link
Copy Markdown
Contributor

When a production-mode request back-processes for hours, the linear handoff block is fixed at the start and ends up far behind the chain, so tier1 processes the gap linearly.

After back-processing, tier1 now compares the handoff block with the last final block rounded down to a segment (capped by the stop block). If it is more than 2 segments behind, the client gets the usual Unavailable "endpoint is shutting down, please reconnect" error. Reconnecting from its cursor re-plans up to the new final block and back-processes the gap in parallel.

SUBSTREAMS_MAX_LINEAR_HANDOFF_LAG_SEGMENTS overrides the default of 2.

substreams gui does not reconnect on its own yet; that is on the gui-reconnect branch.

When back-processing takes hours, the linear handoff block falls far
behind the chain. Disconnecting makes the client's reconnection
back-process that gap in parallel instead of linearly on tier1.
@dfuse-bot

Copy link
Copy Markdown

🔍 Vulnerabilities of ghcr.io/streamingfast/substreams:49f3210

📦 Image Reference ghcr.io/streamingfast/substreams:49f3210
digestsha256:3a15e510233546a1b9a289634929f0a16d3c896fd6b4ed3797a7edf99969b2ea
vulnerabilitiescritical: 0 high: 0 medium: 0 low: 0
platformlinux/amd64
size122 MB
packages380
📦 Base Image ubuntu:24.04
also known as
  • noble
  • noble-20260911
digestsha256:496754492fb28b4d3049432f2ca787449331e23fb14f0dd3fffea86bf5a93eb4
vulnerabilitiescritical: 0 high: 0 medium: 7 low: 2

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.

2 participants