docs: serving during source stalls - #38754
Conversation
Document which query shapes Materialize can keep serving while an upstream source is stalled, by isolation level, plus the patterns that keep serving available through an upstream outage: * maintain cross-source queries as indexed/materialized views and read them directly (single-collection reads serve stale), and * the frontier-alignment workaround: a pre-created materialized view over the same inputs holds their read frontiers together so ad hoc slow-path queries can still pick a valid timestamp. Also expands the stalled-source subsection of the serving troubleshooting page with a pointer to the new page. Every behavior claim was verified empirically on v26.36.0 with two independent stall methods (ingestion cluster at replication factor 0, and stopping the upstream Kafka broker), including the negative cases: an aligner created after the stall does not help, reads of stalled data in explicit transactions block (healthy-only transactions keep serving), and SUBSCRIBE over a stalled+live join blocks like the equivalent SELECT. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| latency in general, since point lookups on the index are served directly from | ||
| memory. | ||
|
|
||
| ## Keep ad hoc queries serving: align frontiers with a maintained object |
There was a problem hiding this comment.
@antiguru how do you feel about this section? It sorta feels like hacking retain history together; I think it is a neat trick but I'm not sure if we should recommend it to users!
Rephrases the frontier-overlap explanation with a concrete two-source example and pulls the read/write frontier definitions into a note, renames the query-shape section to mention isolation level, and collapses "Explicit transactions" into a one-line "Don't use transactions" callout per review. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H5FCMmD7mTXkmcc85p245z
|
Pushed c898920 addressing the open review comments:
Left the "align frontiers with a maintained object" thread open — that's a product question for @antiguru, not something to resolve on my own. Generated by Claude Code |
|
Review of the page. The headline is the stall taxonomy; the rest are smaller corrections. Which kind of stall this page is aboutThree different failure modes share the word "stall", and the page silently assumes one of them. A reader who arrives with a different one in mind will read the whole page as wrong.
The intro should define which sense it means, and say explicitly that a source that has written an error into its collection is a different failure mode that none of these patterns recover. Without that, the behavior matrix reads as a promise the product cannot keep for case 3. Transactions block more broadly than the table saysThe matrix row is "read of stalled data inside an explicit transaction". The actual scope is wider. Inside a transaction the timestamp is determined over the whole timedomain, which is every object in every schema referenced by the first statement, plus The frontier-alignment sectionOn the open product question: the instinct in that thread is right, this is hand-rolled retain history. Since retain history is not generally available, it is not an alternative we can point at instead, so the call is whether to ship the trick or drop the section. Two corrections that apply either way:
|
Co-authored-by: Moritz Hoffmann <antiguru@gmail.com>
Motivation
A customer asked whether a stalled upstream source has to stop Materialize from serving reads. The answer ("often no, and there are patterns that keep serving available") was worked out empirically on a Slack thread and in a repro environment, but is not documented anywhere. This adds a page to the Serve results section covering the behavior and the recommended patterns.
Changes
serve-results/source-stalls.md("Serving during source stalls"):EXPLAIN, holds back compaction, does not rescue reads of stalled data in explicit transactions),SUBSCRIBEscope,if-released v26.29, matchingisolation-level.md),statement_timeoutcaveat andEXPLAIN TIMESTAMPas the diagnostic.serve-results/troubleshooting.md: the "Stalled source" subsection now summarizes the block-vs-serve rule and links to the new page.Verification
Every behavior claim in the page was verified empirically against Materialize v26.36.0 (Docker), with two independent stall methods producing identical results: scaling the ingestion cluster to zero replicas, and stopping the upstream Kafka broker. This includes the full 8 query shapes x 4 isolation settings matrix and the negative cases: an aligner MV created after the stall does not help, transactions reading only healthy objects keep serving while reads of stalled data inside transactions block, and
SUBSCRIBEover a stalled+live join blocks like the equivalentSELECT.Docs build (
hugo --gc) passes with no warnings;bin/format-docsapplied; the repo'sdocs-pre-pr-review-claude.shreview was run and its findings addressed.🤖 Generated with Claude Code