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)

Reply via email to