Repository navigation
fix(api): keep health responsive during lake reads (#1067) - #1077
Merged
Merged
Conversation
athvin
marked this pull request as ready for review
November 10, 2026 18:26
This was referenced Nov 10, 2026
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.
Closes #1067
What
Keep health and readiness responsive while dashboard requests wait on synchronous lake I/O.
Why
A synchronous DuckDB catalog wait inside an async handler stalls the executor, including literal liveness. The new local socket-boundary regression failed on the original metrics path with both probes timing out; the fix passes metrics, data-quality and runs without loosening probe deadlines.
Proof
Regression observed red (
metrics blocked health/readiness, both false) and then green for all three dashboard routes. Capacity/cancellation and worker-panic tests pass. Localmake checkand fullmake check-e2epass. CI run 42873390606 and all 15 exact-head required contexts pass at 8b22b09. The first local integration attempt hit an unrelated concurrent CSV fixture collision, tracked in #1078; the complete retry passed. Live acceptance passed; the 30-minute watch and ledger are closed.Risk & rollback
Dataset read-session concurrency is bounded to two per process; excess requests await capacity, so lake response latency may rise under load while unrelated requests remain responsive. Permits stay with running work after client cancellation. Tag metadata is fetched asynchronously before duplicate-group lake reads; unmerge writes remain after the read closure returns owned pairs. Revert the merge commit to restore the old execution placement.
Post-merge ledger
Closed by: Codex · session
01a1be1a-66a7-72f3-8e78-32c20c5e0da9onMac-87.lan· 2026-11-10T18:58:47.558166+00:00mainis green with this change on it —a7395900dd442d72e950bd505502b8ce642dc652; rust 42875375767, frontend 42875375699, infra 42875375594 and devcontainer 42875375688 all succeeded.images— 42875375968 succeeded; er-api built, unchanged er-web correctly reused.deployconverged — 42875998618 succeeded in dev/prod and logged the exact merge SHA. Production retired green at 18:36:13Z after three healthy minutes. Read-only live verification: service selects blue podweb-api-blue-784c6c8c96-z6f5x, both containers ready with zero restarts. Its API emitteder-server listeningat 2026-11-10T18:31:58.680572Z; web emittedReady in 0ms. The only warning was the expected initial web startup connection refusal at 18:31:59Z, before cutover; no subsequent readiness warnings observed.token_hashabsent from public task response); nightly coverage 42772861654 and mobile Safari 42772654562 also predate this branch. No new failure attributed to this change.er-server-control-plane/SKILL.mdnow requires the full synchronous session lifecycle inside bounded blocking work; cancellation holds capacity until the worker ends.Specific to this change
.tools/prod-1067-health.jsonl,/tmp/er-1067-browser-{after,final}.log,/tmp/er-1067-final-{pod,events}.jsonon Mac-87.lan.Context — plan, discoveries, measurements, files
Plan — completed
make checkandmake check-e2e. Preserve failure evidence and the final implementation rationale here.land-pr; observe a production dashboard navigation alongside public health, verify the new process, and close the post-merge ledger only with the results.Discoveries
with_dataset_lake, which creates, reads and drops the session withinlake_reads::run;er_obs::spawn_blocking_in_spanpreserves request trace context.7cad4ad9already has nightly failures: coverage42772861654 (DuckDB source extraction DirectoryNotEmpty), frontend42772654562 (mobile Safari marketing range keyboard assertion), kind42770567413 (probe assumes removed publictoken_hashfield). These precede this branch and must not be attributed to this diff. Logs retained in/tmp/er-baseline-<run>.logon the session host.Measurements
Production trace counters for the 18:35Z browser interval: 144 ended spans and 144 exported spans; no reported export-failure datapoint. This verifies the current process, not resolution of intermittent exporter issue Reproduce and fix intermittent per-boot span-export silence #987.
Post-deploy normal sign-in passed Chromium (18:36:27–38Z) and WebKit (18:36:39–47Z): metrics/data-quality/runs all HTTP 200, metrics 23 records, zero page errors. Concurrent reads took 4.0–6.3 seconds while independent public health stayed 200 (post-deploy maximum 0.478 seconds through 18:39Z).
Before deployment, Chromium and WebKit both completed document navigation to the demo dashboard, read 23 records, and reported zero page errors. Continuous independent public health sampling began at 18:23Z on 2026-11-10.
Local logs on Mac-87.lan:
/tmp/er-1067-make-check.logand/tmp/er-1067-e2e-retry.log, both exit 0; red/green readiness evidence in/tmp/er-1067-regression-{red,green}.log.Files