Parkerhiphop opened a new pull request, #24402: URL: https://github.com/apache/kafka/pull/24402
Backport of https://github.com/apache/kafka/pull/24239 to the 4.2 branch, prepared from source commit 9e03d32263 before the original PR is merged. Replace eager record-batch iteration with closeable streaming iteration and return a `CloseableIterator` from `Records.records()` to avoid collecting compressed v2 batches into intermediate lists. Adaptations for 4.2: - Keep record classes in `common.record` and utility classes in `common.utils`; do not backport the package moves. - Migrate the Scala DumpLogSegments implementation and log-cleaner/UnifiedLog tests to closeable iteration. - Retain this branch's transaction-log parsing and metadata serde behavior. - Omit DLQ and chunked-accumulator changes because those classes do not exist on this branch; do not introduce tests for trunk-only features. This draft intentionally presents the source PR's iterator API changes for review, including removing `RecordBatch`'s `Iterable` inheritance and changing `Records.records()`'s return type. On 4.2 these classes have not moved to an `internal` package; the compatibility approach needs maintainer review before this backport is ready. The source PR is still under review; this draft is for reviewing release-branch differences and will need to follow any further changes there. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
