[
https://issues.apache.org/jira/browse/KAFKA-14406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
A. Sophie Blee-Goldman resolved KAFKA-14406.
--------------------------------------------
Resolution: Fixed
> Double iteration of records in batches to be restored
> -----------------------------------------------------
>
> Key: KAFKA-14406
> URL: https://issues.apache.org/jira/browse/KAFKA-14406
> Project: Kafka
> Issue Type: Bug
> Components: streams
> Reporter: A. Sophie Blee-Goldman
> Priority: Major
> Fix For: 3.4.0
>
>
> While restoring a batch of records, {{RocksDBStore}} was iterating the
> {{{}ConsumerRecord{}}}s, building a list of {{{}KeyValue{}}}s, and then
> iterating _that_ list of {{{}KeyValue{}}}s to add them to the RocksDB batch.
> Simply adding the key and value directly to the RocksDB batch prevents this
> unnecessary second iteration, and the creation of itermediate {{KeyValue}}
> objects, improving the performance of state restoration, and reducing
> unnecessary object allocation.
> (thanks to Nick Telford for finding this)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)