You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "A. Sophie Blee-Goldman (Jira)" <ji...@apache.org> on 2022/11/19 01:31:00 UTC
[jira] [Created] (KAFKA-14406) Double iteration of records in batches to be restored
A. Sophie Blee-Goldman created KAFKA-14406:
----------------------------------------------
Summary: 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
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)