You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Resolve latency: ~2.1 s p50 at 520k records because the corpus is materialised per request #1429
Measured by #1365 on er-dev (2026-11-29). Org p3live, about 520k standardized person records, the web-api pod's default resources. 55 POST …/resolve calls after 5 warm-ups:
p50
p95
max
2092 ms
2199 ms
2309 ms
All 60 returned 200. Each scores one record, so the cost is per-request setup, not scoring. resolve_record registers the whole standardized corpus and runs materialize_concat over it on every call, then blocks the probe against all of it.
Done when a resolve at this corpus size has p95 under 300 ms, for example by blocking the probe against the corpus with its blocking-rule keys pushed into the lake scan instead of materialising the corpus per request. Record the before/after in the er-server-control-plane reference.
#1476 never kept a session, because the catalog check missed ducklake:postgres:. #1482 fixed that, and the tail spikes are gone, but each call still costs about 1.6 s of CPU on the 1-core pod. Single-threaded, the local 520k benchmark runs 260/282 ms, so the remainder is production-only.
#1493 (closing #1495) seeds the dictionaries once per session and logs a per-phase resolve timings event. The next er-dev pass will say where the time goes.
Progress on er-dev (p3live/default, about 520k records), measured by the project-2 session: 55 calls after 5 warm-ups per pass, through a port-forward to the 1-CPU web-api pod.
All times are ms. About 215 ms of each wall time sits outside the server's total_ms (HTTP, auth, the measurement's port-forward), so a 300 ms wall p95 needs the server under about 85 ms on one CPU. Next: read candidates only from the files that hold them (EFS reads), then the one-row standardization's planning cost.
The indexed candidate from #1512 built and its single-thread local benchmark measured 142 ms p50 and 155 ms p95. Its er-dev release then rolled back when the er-tenant-migrate post-upgrade job hit its deadline on Nov 30. The latest published er-dev wall p95 in the 55-call series is still 972 ms for #1506. The later 306 ms prefilter and 597 ms total for #1509 are server medians. The indexed build still needs a serving-revision check and a fresh 55-call er-dev measurement before this issue can close.
The rollout log includes a Started event for the migration container about 29 minutes before the diagnostics, followed by a controller deletion and DeadlineExceeded. Its final pod list was empty because the pod had been deleted. This establishes that the migration container ran. The retained output does not identify which migration operation consumed the time. On the next authorized deployment, retain the hook container logs while it is running so a repeat timeout can be attributed.
Both failed dev attempts created two tenant migration pods. Each Job had a 1,920-second active deadline, a retry limit of one and a 1,800-second application wait. Each controller recorded a second pod creation roughly two minutes after the first. Both Jobs finished with two failed pods.
On attempt 2, the final event listing places the retry container start 29 minutes before collection and its stop 51 seconds before collection. Allowing for the minute-rounded start, it ran for less than 29 minutes 10 seconds. Even if the retry had reached the application wait immediately, it could not have reported a full 30-minute timeout before the controller stopped it. The reason the first pod ended and the tenant or stage the retry was waiting for are still unknown.
On the next authorized er-dev deploy, capture both pod attempts from their creation and preserve the first container's exit reason and the retry's last completed migration stage. The indexed build still needs the 55-call er-dev measurement. First job and events · Retry job and events
Retained application evidence, verified December 1. In the er-dev container archive, the first pod in each attempt reported one migration enqueued at the same catalog revision, at 19:30:12.963 and 20:05:00.130 UTC on November 30. The retry pod from attempt 2 reported the same at 20:07:55.037. The connection-refused messages from the first pods came from the telemetry exporters. No terminal per-tenant result appeared in either first pod's retained application output. I found no matching application stream for the attempt-1 retry.
The archive is the 30-day CloudWatch group /er/dev/containers in us-east-2. For reproduction, use the CI migration pods named in the two Jobs and the CI dispatcher’s the job settled events at the UTC times below. Log retention and stream naming
The CI dispatcher logged zero lake_migrate records during the second deploy window. At 01:37:54.593 UTC on December 1 it recorded a full pipeline job ending in failure. Four distinct lake_migrate jobs then succeeded at 01:38:32.353, 01:38:44.461, 01:38:50.626 and 01:38:58.668, all within 65 seconds of that pipeline settling. The application lines prove enqueue completed. The ordering is consistent with migrations waiting behind the dataset writer. The hook logs omit the generated job IDs, and the dispatcher settlement lines omit dataset IDs, so those logs alone cannot establish the exact blocking job or match each settlement to a hook pod. The application did not report a breaking schema in the observed hook streams. Migration enqueue and wait · Writer admission rule
At 21:19 UTC the CI service still selected blue with one ready API replica. Its image digest matched the failed deploy's previous live API (c4ee52d7…), while the indexed candidate in both attempts was bc45282a…. The pending check is a dev-only CI release of the candidate and the existing 5 warm-up / 55 measured requests. Capture the active job and migration job IDs on the next authorized run so writer-queue time can be established directly.
The dev-only retry of the indexed build succeeded on 1 December. Attempt 3 started at 23:05:18 UTC, the inactive-colour upgrade completed at 23:07:24, and the preview API readiness and web health checks both returned HTTP 200. CI completed the traffic switch to green at 23:07:41. The production job retains its original 30 November execution time.
I verified the live ci/er-api service selected green, had a ready endpoint, and that its one-CPU API pod used the candidate image sha256:bc45282aa03b8da0b7fb1dfd01f798881dfeed8da84133348f5c602e7abc5c6e from f3cb5ede. This clears the deployment prerequisite. The 300 ms p95 gate still requires five warm-up requests and 55 measured resolve calls on p3live/default using the benchmark probe and an authorized viewer credential. Dev CI job and smoke checks · Indexed build
The indexed-release test fixture supplies a reproducible HTTP probe for the next pass. Use source crm, the test’s synthetic payload as record, and limit: 10. The earlier live reports do not include their request body. Identify the probe used when posting the measurements, and keep the recorded corpus size and serving revision alongside them.
Live er-dev measurement of the indexed build: the gate is still missed, and the remaining cost is server-side. Measured 2026-12-02 04:53–04:54 UTC.
Serving: ci/er-api selects green, which has one ready replica. The er-server container has a 1-CPU limit and runs image er-api@sha256:bc45282a…e7abc5c6e (f3cb5ede). Probe: the bundled resolve_latency_at_scale CRM record at f3cb5ede, limit: 10. Driver: 5 warm-ups and 55 timed sequential calls over a loopback kubectl port-forward. A temporary viewer key was used and has since been revoked.
p50
p95
max
Client wall, through port-forward
633 ms
916 ms
12,048 ms
Server request duration (from its own log)
411 ms
433 ms
—
All 60 calls returned 200 with decision auto_merge. Every call came from one snapshot (29533), which matched the post-run metrics.
The corpus is now 779,861 standardized records, not the ~520k in the issue.
A /healthz through the same port-forward takes 175 ms median, so most of the gap between the two rows is the tunnel. The 12 s outlier has no matching server-side trace.
First call: 3,409 ms server-side.
The server-side stages, measured over the same 55 calls, show where the time goes:
Stage
p50
p95
standardize_ms
227
253
prefilter_ms
138
160
predict_ms
23
—
prepare_ms + select_ms
~17
—
Standardizing one probe record costs more than half the request. Even with zero network cost the server alone is about 1.4× the 300 ms target. Next step: remove the per-request standardize setup cost, then re-measure.
#1515 is live on er-dev; the gate is still missed. Standardize is fixed; the prefilter now dominates. Measured 2026-12-02 06:36 and 06:38 UTC.
Serving: deploy 46825081522 logged deploying a1dd29d5, and ci/er-api now selects blue (er-api@sha256:6edf36df…, one 1-CPU replica). The driver, probe and corpus were the same as before: 779,861 records, snapshot 29533, verified after each pass. Each pass used a temporary viewer key, revoked afterwards.
Standardize: the staged rendering removed 199 ms per call, as predicted from the local repro.
Prefilter:the EFS file-cache claim did not hold. It fell only 11% and is now ~63% of the resolve total. Locally the same prefilter runs in ~5 ms at 780k records, so er-dev is ~25× slower for this stage. The next diagnosis is whether that is I/O against the EFS-backed corpus (is the cache actually hit?) or CPU on the 1-CPU pod.
Outside the resolve stages: the handler spends ~45 ms (request 240 vs resolve 195 at p50): authentication, input loading, serialization.
Memory:er-server went from 721 to 729 MiB over 60 calls, so the per-call leak is gone.
Measurement method:ci/er-api is ClusterIP-only. The driver opens a new connection per call through a kubectl port-forward whose /healthz floor is 168 ms from this client, so the wall numbers above include that tunnel. Once the server side is clearly under the gate, the wall measurement should come from a client that doesn't pay a per-call tunnel.
The gate is met on er-dev with #1518: in-cluster wall p95 is 116.7 / 120.6 ms at 779,861 standardized records, against the 300 ms target. Measured 2026-12-03 00:47–00:58 UTC.
Release (dev only). The owner limited #1518 to er-dev, so this went out through the new dev-only dispatch from #1545:
deploy.yml with sha=93e43da5, environment=dev, run 47005705531. deploy dev succeeded; deploy prod was skipped.
Image: er-api:93e43da5… (sha256:05a028692c…), built amd64 from rust/Dockerfile.
ci/er-api now selects blue with that digest, one 1-CPU replica.
Wall latency. 5 warm-ups + 55 sequential calls per pass, the same probe (resolve_latency_at_scale CRM record at f3cb5ede), the same nearest-rank p95 (53rd of 55), a temporary viewer key (revoked).
Client
p50
p95
max
In-cluster (Node fetch in the pod's web container → er-api.ci.svc), pass 1
107.6
116.7
142.9
In-cluster, pass 2
106.2
120.6
130.3
Laptop through kubectl port-forward (tunnel floor now 250 ms), pass 1 / 2
352 / 359
368 / 383
374 / 622
All 220 calls returned 200 with decision auto_merge on snapshot 29533, which matched the post-run /metrics. The port-forward rows are almost entirely the tunnel; the in-cluster rows are what a client of the service sees.
Server stages over 110 warm calls (resolve timings, plus the new resolve request timings line):
Cold start.resolve corpus cached built the in-memory corpus copy once: 5.54 s, 779,861 rows, 334.6 MiB. That first call took 5.85 s.
Open until #1518 lands. Dev now runs an unmerged image; the next merge-triggered deploy puts dev back on main's code. Prod still runs #1515. Close this issue when #1518 merges, with prod rollout approved, and its ledger records the same check on main.
Activity
athvin commentedon Nov 29, 2026
Claimed by a Claude Code session (coordinated with the project-2 session, which is staying off it). This will follow the duck-fleet #273 work.
feat(api): resolve declares its payload limit, its latency and its me…
perf(resolve): a cached session per dataset and a blocking prefilter,…
fix(resolve): cache sessions over ducklake:postgres: catalogs, and on…
athvin commentedon Nov 30, 2026
Reopening: #1482's merge closed this, but er-dev hasn't met the target (p95 under 300 ms at about 520k).
er-dev on p3live so far, 55 calls per pass:
5f1e3bb9)e18d60dc)#1476 never kept a session, because the catalog check missed
ducklake:postgres:. #1482 fixed that, and the tail spikes are gone, but each call still costs about 1.6 s of CPU on the 1-core pod. Single-threaded, the local 520k benchmark runs 260/282 ms, so the remainder is production-only.#1493 (closing #1495) seeds the dictionaries once per session and logs a per-phase
resolve timingsevent. The next er-dev pass will say where the time goes.athvin commentedon Nov 30, 2026
Progress on er-dev (p3live/default, about 520k records), measured by the project-2 session: 55 calls after 5 warm-ups per pass, through a port-forward to the 1-CPU web-api pod.
total_ms(median)e18d60dce1b7ef0d(persistent=false)28b33aa0(lake-free session)51e3671e(precomputed keys, candidate rows only)All times are ms. About 215 ms of each wall time sits outside the server's
total_ms(HTTP, auth, the measurement's port-forward), so a 300 ms wall p95 needs the server under about 85 ms on one CPU. Next: read candidates only from the files that hold them (EFS reads), then the one-row standardization's planning cost.athvin commentedon Dec 1, 2026
The indexed candidate from #1512 built and its single-thread local benchmark measured 142 ms p50 and 155 ms p95. Its er-dev release then rolled back when the
er-tenant-migratepost-upgrade job hit its deadline on Nov 30. The latest published er-dev wall p95 in the 55-call series is still 972 ms for #1506. The later 306 ms prefilter and 597 ms total for #1509 are server medians. The indexed build still needs a serving-revision check and a fresh 55-call er-dev measurement before this issue can close.The rollout log includes a
Startedevent for the migration container about 29 minutes before the diagnostics, followed by a controller deletion andDeadlineExceeded. Its final pod list was empty because the pod had been deleted. This establishes that the migration container ran. The retained output does not identify which migration operation consumed the time. On the next authorized deployment, retain the hook container logs while it is running so a repeat timeout can be attributed.The merged reference update contains the measured series and the current catalog paths. Failed er-dev rollout · Er-dev phase measurements · Indexed local benchmark
athvin commentedon Dec 1, 2026
Both failed dev attempts created two tenant migration pods. Each Job had a 1,920-second active deadline, a retry limit of one and a 1,800-second application wait. Each controller recorded a second pod creation roughly two minutes after the first. Both Jobs finished with two failed pods.
On attempt 2, the final event listing places the retry container start 29 minutes before collection and its stop 51 seconds before collection. Allowing for the minute-rounded start, it ran for less than 29 minutes 10 seconds. Even if the retry had reached the application wait immediately, it could not have reported a full 30-minute timeout before the controller stopped it. The reason the first pod ended and the tenant or stage the retry was waiting for are still unknown.
On the next authorized er-dev deploy, capture both pod attempts from their creation and preserve the first container's exit reason and the retry's last completed migration stage. The indexed build still needs the 55-call er-dev measurement. First job and events · Retry job and events
Retained application evidence, verified December 1. In the er-dev container archive, the first pod in each attempt reported one migration enqueued at the same catalog revision, at 19:30:12.963 and 20:05:00.130 UTC on November 30. The retry pod from attempt 2 reported the same at 20:07:55.037. The connection-refused messages from the first pods came from the telemetry exporters. No terminal per-tenant result appeared in either first pod's retained application output. I found no matching application stream for the attempt-1 retry.
The archive is the 30-day CloudWatch group
/er/dev/containersin us-east-2. For reproduction, use the CI migration pods named in the two Jobs and the CI dispatcher’sthe job settledevents at the UTC times below. Log retention and stream namingThe CI dispatcher logged zero
lake_migraterecords during the second deploy window. At 01:37:54.593 UTC on December 1 it recorded a full pipeline job ending in failure. Four distinctlake_migratejobs then succeeded at 01:38:32.353, 01:38:44.461, 01:38:50.626 and 01:38:58.668, all within 65 seconds of that pipeline settling. The application lines prove enqueue completed. The ordering is consistent with migrations waiting behind the dataset writer. The hook logs omit the generated job IDs, and the dispatcher settlement lines omit dataset IDs, so those logs alone cannot establish the exact blocking job or match each settlement to a hook pod. The application did not report a breaking schema in the observed hook streams. Migration enqueue and wait · Writer admission ruleAt 21:19 UTC the CI service still selected blue with one ready API replica. Its image digest matched the failed deploy's previous live API (
c4ee52d7…), while the indexed candidate in both attempts wasbc45282a…. The pending check is a dev-only CI release of the candidate and the existing 5 warm-up / 55 measured requests. Capture the active job and migration job IDs on the next authorized run so writer-queue time can be established directly.athvin commentedon Dec 1, 2026
The dev-only retry of the indexed build succeeded on 1 December. Attempt 3 started at 23:05:18 UTC, the inactive-colour upgrade completed at 23:07:24, and the preview API readiness and web health checks both returned HTTP 200. CI completed the traffic switch to green at 23:07:41. The production job retains its original 30 November execution time.
I verified the live
ci/er-apiservice selected green, had a ready endpoint, and that its one-CPU API pod used the candidate imagesha256:bc45282aa03b8da0b7fb1dfd01f798881dfeed8da84133348f5c602e7abc5c6efromf3cb5ede. This clears the deployment prerequisite. The 300 ms p95 gate still requires five warm-up requests and 55 measured resolve calls onp3live/defaultusing the benchmark probe and an authorized viewer credential. Dev CI job and smoke checks · Indexed buildThe indexed-release test fixture supplies a reproducible HTTP probe for the next pass. Use source
crm, the test’s syntheticpayloadasrecord, andlimit: 10. The earlier live reports do not include their request body. Identify the probe used when posting the measurements, and keep the recorded corpus size and serving revision alongside them.athvin commentedon Dec 2, 2026
Live er-dev measurement of the indexed build: the gate is still missed, and the remaining cost is server-side. Measured 2026-12-02 04:53–04:54 UTC.
Serving:
ci/er-apiselects green, which has one ready replica. Theer-servercontainer has a 1-CPU limit and runs imageer-api@sha256:bc45282a…e7abc5c6e(f3cb5ede). Probe: the bundledresolve_latency_at_scaleCRM record atf3cb5ede,limit: 10. Driver: 5 warm-ups and 55 timed sequential calls over a loopbackkubectl port-forward. A temporary viewer key was used and has since been revoked.requestduration (from its own log)auto_merge. Every call came from one snapshot (29533), which matched the post-run metrics./healthzthrough the same port-forward takes 175 ms median, so most of the gap between the two rows is the tunnel. The 12 s outlier has no matching server-side trace.The server-side stages, measured over the same 55 calls, show where the time goes:
standardize_msprefilter_mspredict_msprepare_ms+select_msStandardizing one probe record costs more than half the request. Even with zero network cost the server alone is about 1.4× the 300 ms target. Next step: remove the per-request standardize setup cost, then re-measure.
perf(resolve): standardize the probe staged, serve warm calls from th…
athvin commentedon Dec 2, 2026
#1515 is live on er-dev; the gate is still missed. Standardize is fixed; the prefilter now dominates. Measured 2026-12-02 06:36 and 06:38 UTC.
Serving: deploy 46825081522 logged
deploying a1dd29d5, andci/er-apinow selects blue (er-api@sha256:6edf36df…, one 1-CPU replica). The driver, probe and corpus were the same as before: 779,861 records, snapshot 29533, verified after each pass. Each pass used a temporary viewer key, revoked afterwards.requestduration p50 / p95resolve timingstotal p50 / p95er-serverwent from 721 to 729 MiB over 60 calls, so the per-call leak is gone.ci/er-apiis ClusterIP-only. The driver opens a new connection per call through akubectl port-forwardwhose/healthzfloor is 168 ms from this client, so the wall numbers above include that tunnel. Once the server side is clearly under the gate, the wall measurement should come from a client that doesn't pay a per-call tunnel.perf(resolve): serve candidates from an in-memory corpus copy, reuse …
ci(deploy): let a manual deploy target dev or prod alone
ci(deploy): let a manual deploy target dev or prod alone (#1545)
perf(resolve): serve candidates from an in-memory corpus copy, reuse …
athvin commentedon Dec 3, 2026
The gate is met on er-dev with #1518: in-cluster wall p95 is 116.7 / 120.6 ms at 779,861 standardized records, against the 300 ms target. Measured 2026-12-03 00:47–00:58 UTC.
Release (dev only). The owner limited #1518 to er-dev, so this went out through the new dev-only dispatch from #1545:
deploy.ymlwithsha=93e43da5,environment=dev, run 47005705531.deploy devsucceeded;deploy prodwas skipped.93e43da5is perf(resolve): serve candidates from an in-memory corpus copy, reuse key auth's connection (#1429) #1518 rebased onto main. Itsrust/tree is identical (42dc57dd) to thee7fd758athe image was built from.er-api:93e43da5…(sha256:05a028692c…), built amd64 fromrust/Dockerfile.ci/er-apinow selects blue with that digest, one 1-CPU replica.Wall latency. 5 warm-ups + 55 sequential calls per pass, the same probe (
resolve_latency_at_scaleCRM record atf3cb5ede), the same nearest-rank p95 (53rd of 55), a temporary viewer key (revoked).fetchin the pod's web container →er-api.ci.svc), pass 1kubectl port-forward(tunnel floor now 250 ms), pass 1 / 2All 220 calls returned 200 with decision
auto_mergeon snapshot 29533, which matched the post-run/metrics. The port-forward rows are almost entirely the tunnel; the in-cluster rows are what a client of the service sees.Server stages over 110 warm calls (
resolve timings, plus the newresolve request timingsline):Cold start.
resolve corpus cachedbuilt the in-memory corpus copy once: 5.54 s, 779,861 rows, 334.6 MiB. That first call took 5.85 s.Open until #1518 lands. Dev now runs an unmerged image; the next merge-triggered deploy puts dev back on main's code. Prod still runs #1515. Close this issue when #1518 merges, with prod rollout approved, and its ledger records the same check on main.
perf(resolve): serve candidates from an in-memory corpus copy, reuse …
perf(resolve): serve candidates from an in-memory corpus copy, reuse …