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


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateEntry.java:
##########
@@ -42,24 +41,28 @@ public class ProducerStateEntry {
     private long lastTimestamp;
     private OptionalLong currentTxnFirstOffset;
 
-    public static ProducerStateEntry empty(long producerId) {
+    static ProducerStateEntry empty(long producerId) {
         return new ProducerStateEntry(producerId, 
RecordBatch.NO_PRODUCER_EPOCH, -1, RecordBatch.NO_TIMESTAMP, 
OptionalLong.empty(), Optional.empty());
     }
 
-    public ProducerStateEntry(long producerId, short producerEpoch, int 
coordinatorEpoch, long lastTimestamp, OptionalLong currentTxnFirstOffset, 
Optional<BatchMetadata> firstBatchMetadata) {
+    public ProducerStateEntry(long producerId, short producerEpoch, int 
coordinatorEpoch, long lastTimestamp,
+                              OptionalLong currentTxnFirstOffset, 
Optional<BatchMetadata> firstBatchMetadata) {
         this.producerId = producerId;
         this.producerEpoch = producerEpoch;
         this.coordinatorEpoch = coordinatorEpoch;
         this.lastTimestamp = lastTimestamp;
         this.currentTxnFirstOffset = currentTxnFirstOffset;
-        firstBatchMetadata.ifPresent(batchMetadata::add);
+        firstBatchMetadata.ifPresent(batch -> {

Review Comment:
   This part is a little weird, so I left a comment on the AK pr: 
https://github.com/apache/kafka/pull/21096#discussion_r2628647232



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