nicktelford opened a new pull request, #12842: URL: https://github.com/apache/kafka/pull/12842
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. This also simplifies the API of `RocksDBAccessor`, as `prepareBatchForRestore` is no longer needed. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org