JiayaoS opened a new pull request, #22289:
URL: https://github.com/apache/kafka/pull/22289

   Following the best practices discussed in:
   - https://github.com/apache/kafka/pull/22116#discussion_r3237099653
   - https://github.com/apache/kafka/pull/10990#discussion_r666715085
   This change replaces redundant `new MetadataRecordSerde()` allocations with 
   `MetadataRecordSerde.INSTANCE`. Investigation of `MetadataRecordSerde` usage 
   in `RecordsIterator` confirms that using the singleton is safe and not 
   impacted by any state recycling issues:
   
https://github.com/apache/kafka/blob/36d052b6c5c3297d448d2c9f981315d519fec5b8/raft/src/main/java/org/apache/kafka/raft/internals/RecordsIterator.java#L354
   


-- 
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]

Reply via email to