Skip to content

bench: fail fast on lost produce; kafka: survive host stalls#204

Merged
brownjuly2003-code merged 3 commits into
mainfrom
fix/bench-delivery-guard
Jul 19, 2026
Merged

bench: fail fast on lost produce; kafka: survive host stalls#204
brownjuly2003-code merged 3 commits into
mainfrom
fix/bench-delivery-guard

Conversation

@brownjuly2003-code

Copy link
Copy Markdown
Owner

A 4-hour soak run exposed two stacked stand/harness defects (neither in the serving path):

  • Throughput bench produced fire-and-forget. No delivery callback and an unchecked flush(30): when the broker briefly lost partition leadership, librdkafka silently expired queued messages for the rest of the run while the pace loop kept counting them as produced — the gate then judged a phantom load. Every produce() now carries an on_delivery hook, the loop aborts (exit 3) on the first surfaced delivery failure, and the final flush(120) must drain clean. Transient blips that librdkafka rides out within message.timeout.ms do not abort.
  • Single-node KRaft broker fenced itself under host load. Broker and controller share one JVM yet heartbeat over TCP; a host stall past the default 9 s session timeout made the broker fence itself and drop every partition leader for 16 s. KAFKA_BROKER_SESSION_TIMEOUT_MS raised to 45 s in the dev compose.

Also guards misnamed root-level audit/plan notes in .gitignore.

Verified: ruff check + format clean, py_compile, compose YAML valid; the guarded bench is currently driving a live 4 h re-run.

🤖 Generated with Claude Code

JuliaEdom and others added 2 commits July 19, 2026 09:29
The throughput bench produced fire-and-forget: no delivery callback and an
unchecked flush(30), so events librdkafka silently expired after
message.timeout.ms still counted as "produced" and the gate math judged a
phantom load. Now every produce carries an on_delivery hook, the paced loop
aborts on the first surfaced failure, and the final flush must drain clean.

The dev stand's single-node KRaft broker heartbeats its own controller over
TCP; a host stall past the default 9s session makes it fence itself and drop
every partition leader. Session timeout raised to 45s.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

DORA Metrics

  • Window: last 30 days
  • Branch: main
  • Deployment frequency: 101 total / 23.57 per week
  • Lead time for changes: avg 0.37h / median 0.0h
  • Change failure rate: 74.26% (75/101)
  • MTTR: 20.13h across 5 incident(s)

…ess loss)

The paced100 series documented runs up to 1h; the two 4h attempts failed for
stand and harness reasons worth keeping: r1 proves the apply path dedups a
292k replay storm exactly under checkpoint-storage failure, r3 proves the
path processes 100% of delivered events across broker fencing blips and
motivates the bench delivery guard. Multi-hour gate stays open until a clean
pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@brownjuly2003-code
brownjuly2003-code merged commit 9ae4429 into main Jul 19, 2026
22 checks passed
@brownjuly2003-code
brownjuly2003-code deleted the fix/bench-delivery-guard branch July 19, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants