Destination: per-statement Describe round trip caps throughput at 0.77x Kafka Connect under saturation

Aperta
#443 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go, postgresql

Direzione di ricerca

Start with #437, which the issue identifies as the cached query mode and xmin fingerprint starting point, then compare the candidate fixes against the PgBouncer coercion risk described here. Run an AWS benchi test at 40,000 ops/s and add a test covering PgBouncer coercion. Done means the destination reaches parity or better against Kafka Connect at shipped defaults without reintroducing that risk.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

At shipped defaults on Conduit's arch-v2 engine, the Postgres destination keeps pace with the Kafka Connect JDBC sink at 20,000 ops/s (0.999x). At 40,000 ops/s offered it reaches 14,798 net rows/s against 19,145 for Kafka Connect, which is 0.769x (range 0.765-0.778 over 5 rounds). Evidence is in ConduitIO/conduit#3247 (results-arch-v2.md, profiles, pg_stat_activity samples).

Cause: Conduit is not CPU-bound (about 0.9 core; Destination.Write is 5.7% of samples). The upsert backend sits idle in ClientRead in 36% of samples. The default describe_exec query mode does a Parse/Describe round trip for every statement. A labelled tuned run with default_query_exec_mode=cache_statement reached 23,401 net rows/s (1.227x). That mode is not the default because of GHSA-rcwq-pcpp-gx9v (PgBouncer coercion).

Candidate fixes:

  1. Cache prepared statements per table shape, and re-describe on a schema-change error. #437 (cached mode + xmin fingerprint) is the starting point.
  2. Build one multi-row or unnest upsert per flush.
  3. On the source side, memoize the Avro schema in updateAvroSchema (21% of source CPU) and avoid re-parsing positions per ack (ParseSDKPosition, 12%).

Acceptance criteria: an AWS benchi rerun at 40,000 ops/s shows parity or better against Kafka Connect at shipped defaults. The fix must not reintroduce the PgBouncer coercion risk; add a test covering it. Data-path change, so Tier 1.

Target: Conduit v0.22.

Lingua principale
Go
Stelle
20
Fork
12
Merge medio
9h 50m
PR unite (30g)
29

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ConduitIO/conduit-connector-postgres

Tutte le issue di ConduitIO/conduit-connector-postgres

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.