Repository navigation
feat(hotblocks): let a stream request ask for the new query engine - #125
Merged
Merged
Conversation
mo4islona
force-pushed
the
feat/hotblocks-query-engine-header
branch
from
October 23, 2026 21:39
3dfaa78 to
4592f5a
Compare
…B request bound Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mo4islona
force-pushed
the
feat/hotblocks-query-engine-header
branch
from
October 23, 2026 23:14
5237d42 to
af78746
Compare
The shadow compares the new engine's answers but never serves them. With `x-sqd-query-engine: dynamic` the new engine alone parses and answers a stream request, with no shadow; without the header nothing changes. The service reads only the block bounds from the body, so a request may use what the legacy parser refuses, such as value sets. The plan compiles in an admitted task before the query waits for the head, so a request the engine refuses is refused at once. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
mo4islona
force-pushed
the
feat/hotblocks-query-engine-header
branch
2 times, most recently
from
October 23, 2026 23:41
d3a0f45 to
7b45c4e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shadow compares the new query engine's answers with the legacy ones but never serves them. This lets a caller ask for the new engine on a stream request, including requests only the new engine understands, such as value sets.
x-sqd-query-engineonPOST /datasets/{id}/streamand/finalized-stream:legacydynamicMALFORMED_REQUESTdynamicis the name the network's query message already gives the new engine (QUERY_ENGINE_DYNAMIC). Adynamicrequest to a dataset kind with no loaded catalog is a 400UNSUPPORTED_QUERY. Nothing routes a query to the new engine on its own: only the header does.How it works:
dynamicthe legacy parser never sees the body. The service readsfromBlock,toBlockandparentBlockHashitself, since it needs them to wait for the head and find the first chunk; the kind comes from the dataset. The new engine parses and checks the rest,typeincluded.compilein the query task metrics) before the query waits for the head, as a legacy query is validated before it: a large request never holds a runtime thread, a busy service refuses it before any parsing, and a request the engine refuses is a 400 at once rather than a 204 when the wait runs out.RunningQuerykeeps each chunk's bounds itself, so both engines read the same blocks, and an answer cut at the weight budget resumes from the cut.previousBlocks, a missing table or column isITEM_UNAVAILABLE, a validation kind isMALFORMED_REQUEST, anything else is a 500.hotblocks_http_statusandhotblocks_http_seconds_to_first_byteget anenginelabel (legacy,dynamic,invalid) on the two stream routes, to compare error rates and latency per engine.tests/metadatastays as it is.spec/13-interface-binding.md.Tests (
tests/query_engine_header.rs,query/range.rs):parentBlockHashgives the same 409 from both engines;dynamicit answers what the same values give as a list;type, is a 400, also with afromBlockabove the head; with no query capacity it is a 503 instead, so it is compiled only after admission;🤖 Generated with Claude Code