benchi: s3 backlog is inflated by the destination count's own duration, so lag.py reports a false SATURATED
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- aws, bash, go, postgresql
- Ambito
- data-engineering, stream-processing, testing
Direzione di ricerca
Read scripts/lag.py and run.sh:364-366 to see how backlog is computed, then trace the ROWS_* and SRC_* sampling hooks in bench.yml (lines 428-703). Compare the three proposed fix shapes and their effect on throughput measurements; add the described skew fixture to scripts/test-lag.py. Done when the s3 measurement skew no longer causes a false SATURATED verdict and the fixture checks that case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What is wrong
runs.csv carries rows_before/rows_after (destination ground truth) and src_before/src_after (the source tables' change counters), and scripts/lag.py computes backlog as src - rows "at the same instants" (run.sh:364-366). They are not the same instant.
bench.yml emits them from separate hooks, and the source read comes last:
ROWS_BEFOREat lines 428 / 459 / 520 / 544 / 572,TS_BEFORE_MS+SRC_EVENTS_BEFORE+SRC_NET_BEFOREat line 598ROWS_AFTERat lines 609 / 630 / 656 / 665 / 677,TS_AFTER_MS+SRC_EVENTS_AFTER+SRC_NET_AFTERat line 703
So src is sampled after the destination count has finished running. For a cheap count that is microseconds. For the s3 count it is seconds, because the count downloads the entire bucket:
aws --endpoint-url http://cdcparity-minio:9000 s3 cp --recursive s3://bench/ /tmp/s3dump --quiet
find /tmp/s3dump -type f -exec cat {} + | wc -l
The loader is live throughout. Every second the download takes, src advances by one second of offered load while rows does not, and backlog is inflated by rate x count_duration.
What it broke
Pass H (results-aws/20261130T090609-qualified-batch8192-latency) is the first latency pass to complete. lag.py refused a latency figure for all three s3 arms:
conduit-s3 — SATURATED: backlog grew 21,000 -> 65,000 (+44,000) during a 66s window
connect-s3 — SATURATED: backlog grew 10,000 -> 55,000 (+45,000) during a 66s window
That verdict is wrong. Pass G (results-aws/20261130T070532-qualified-batch8192, same code, same box) measures conduit-s3 at 49,551 rec/s and connect-s3 at 34,027 rec/s — four and three times the 12,000 rec/s offered in pass H. Neither arm can be saturated at a quarter of its measured throughput.
The evidence matches the skew and not saturation:
| s3 arm | file arm (cheap count) | |
|---|---|---|
| backlog before (bucket freshly reset, count fast) | 21,000 | 22,808 |
| backlog after (957,000 rows in the bucket, count slow) | 65,000 | 19,000 |
- before-backlog agrees with the file arm; after-backlog does not, and the only thing that changed is bucket size
- the inflation reproduces exactly across rounds: 65,000 / 62,000 / 65,000
- 44,000 records at 11,966 rec/s is 3.7 s of download, the right order for 957,000 rows out of MinIO
connect-s3shows the same shape with a different tool, so it is the counting method, not Conduit
What it does NOT break
Throughput. rows_delta / (ts_after - ts_before) uses only the destination counter and the two timestamps, and TS_AFTER_MS is read in the same hook as SRC_EVENTS_AFTER, after the count — so the window and the delta are consistent and the skew cancels. Every throughput number in pass G and in the committed baselines stands. Only backlog, which subtracts two different instruments at one nominal instant, is affected, and therefore only lag.py.
It is also worse than a constant offset: it scales with bucket size, so it grows within a round, which is precisely the signature lag.py reads as "unbounded backlog". A fail-closed instrument reaching a false SATURATED is the failure mode that matters here — it does not lie about a number, it suppresses one that exists.
Not this
connect-kafka also got a SATURATED verdict (+7,086 over 62 s = 114 rec/s, 0.95% of offered). Its count is kafka-get-offsets.sh, O(1) in topic size, so this skew does not explain it. Left open; it may be real Debezium flush behaviour at low offered rate.
connect-pg's NOT COMPARABLE (negative backlog, −425) is the separate known mismatch between the destination's net live rows and the source's n_tup_ins - n_tup_del.
Fix shape (not yet chosen)
Three candidates, in rough order of preference:
- Read
srcin the same hook asrows, before the expensive count. Move theTS_*/SRC_*psql read to the head of the destination-count hook. Needs care:TS_AFTER_MSis also the throughput window's end, and moving it earlier changes the window to exclude the count — which is arguably more correct, but it changes every rate in the harness and so cannot be done quietly. Emitting two timestamps (one for the window, one for the backlog pair) avoids that. - Bracket the count and report its duration, then have
lag.pysubtractrate x durationfrom the after-backlog. Correct in expectation but it is a modelled correction on top of a measurement, which is the kind of thing this harness has been burned by. - Count s3 rows from the object listing's metadata instead of downloading, so the count is O(objects) rather than O(bytes). Only helps s3, and the listing does not carry a row count.
Whichever is chosen, scripts/test-lag.py needs the case that would have caught this: a fixture where rows_after is sampled before src_after by a known interval at a known rate, asserting that the arm is not reported SATURATED.
Related
- #3435 — the s3 count compared two snapshots of a growing bucket. Same class (a count whose relationship to time was not accounted for), different place.
- #3434 — four remaining fail-open ground-truth counts.
- PR #3440 — carries pass G and pass H, and states this artifact rather than fixing it.
- Lingua principale
- Go
- Stelle
- 617
- Fork
- 69
- Merge medio
- 8h 5m
- PR unite (30g)
- 122
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ConduitIO/conduit
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
docs(conduit.io): durable state commits, db.allowUnsyncedCommits, and the new store error codesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di ConduitIO/conduit
Issue simili
-
P3 tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
kind/feature needs-triage priority/unprioritized
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
NVIDIA/k8s-test-infra#1504 ·
I maintainer di solito rispondono entro 1 giorno
-
Area/Infrastructure Aspect/Infra Resources Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
wso2/agent-manager#2717 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
open-policy-agent/opa#9685 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
aliyun/elastic-compute-control-cli#191 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno