chia7712 commented on code in PR #21096:
URL: https://github.com/apache/kafka/pull/21096#discussion_r2630590274


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateEntry.java:
##########
@@ -55,11 +55,11 @@ public ProducerStateEntry(long producerId, short 
producerEpoch, int coordinatorE
         firstBatchMetadata.ifPresent(batchMetadata::add);

Review Comment:
   Yes.
   
   My point was to remove the "first" batch from constructor and add it after 
creating the entry. For example:
   
   var entry = new ProducerStateEntry ...
   
   entry.addBatch(new BatchMetadata(...))
   
   This can streamline the constructor.
   
   (Sorry for the formatting. I typed this on my phone)
   



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