Skip to content

Conversation

@twmb
Copy link
Owner

@twmb twmb commented Feb 8, 2026

ProduceSync now stops lingering and triggers an immediate drain on
all partitions that records were produced to. This avoids the caller
waiting unnecessarily for linger timers (default 10ms since v1.20.0)
when synchronously waiting for results.

After each Produce call, the record's Partition field is already set
(see bufferRecord), so we collect unique recBufs inline and unlinger
them after all records are enqueued. A [16]*recBuf stack array with
linear dedup avoids heap allocation in the common case.

Closes #1195

Add -b/--bench and -c/--count flags for running Go benchmarks.
Derive kfake and kgo directories from the script location rather
than using hardcoded paths.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
ProduceSync now stops lingering and triggers an immediate drain on
all partitions that records were produced to. This avoids the caller
waiting unnecessarily for linger timers (default 10ms since v1.20.0)
when synchronously waiting for results.

After each Produce call, the record's Partition field is already set
(see bufferRecord), so we collect unique recBufs inline and unlinger
them after all records are enqueued. A [16]*recBuf stack array with
linear dedup avoids heap allocation in the common case.

Closes #1195

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ProduceSync lingering

1 participant