Skip to content

KAFKA-20866: Remove incremental-only append result state - #23032

Open
lh0156 wants to merge 1 commit into
apache:trunkfrom
lh0156:agent/KAFKA-20866-remove-incremental-result-fields
Open

KAFKA-20866: Remove incremental-only append result state#23032
lh0156 wants to merge 1 commit into
apache:trunkfrom
lh0156:agent/KAFKA-20866-remove-incremental-result-fields

Conversation

@lh0156

@lh0156 lh0156 commented Aug 2, 2026

Copy link
Copy Markdown

Summary

RecordAppendResult is created for every successful append. This change removes the incremental-strategy-only outcome and extensionBytesNeeded fields from regular results. Buffer-extension capacity is now held only by a private result subtype, while the existing append/new-batch behavior remains unchanged.

The chunked accumulator consumes the capacity through a package-private accessor, and a regression test covers the buffer-extension result contract.

Testing

The implementation followed a TDD cycle:

  1. RED: the new regression test failed to compile because extensionBytesNeeded() did not exist.
  2. GREEN: implemented the result specialization and reran the test.

Validated with:

  • ./gradlew :clients:test --tests org.apache.kafka.clients.producer.internals.RecordAccumulatorTest --tests org.apache.kafka.clients.producer.internals.ChunkedRecordAccumulatorTest --no-build-cache --console=plain
  • ./gradlew :clients:test --no-build-cache --console=plain
  • ./gradlew :clients:spotlessJavaCheck --no-build-cache --console=plain

The clients test task also ran checkstyle and SpotBugs successfully.

@github-actions github-actions Bot added triage PRs from the community producer clients small Small PRs labels Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients producer small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant