jsancio commented on a change in pull request #10946:
URL: https://github.com/apache/kafka/pull/10946#discussion_r662608352



##########
File path: raft/src/main/java/org/apache/kafka/raft/Batch.java
##########
@@ -99,38 +116,68 @@ public boolean equals(Object o) {
         Batch<?> batch = (Batch<?>) o;
         return baseOffset == batch.baseOffset &&
             epoch == batch.epoch &&
-            lastOffset == batch.lastOffset &&
+            appendTimestamp == batch.appendTimestamp &&
             sizeInBytes == batch.sizeInBytes &&
+            lastOffset == batch.lastOffset &&
             Objects.equals(records, batch.records);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(baseOffset, epoch, lastOffset, sizeInBytes, 
records);
+        return Objects.hash(
+            baseOffset,
+            epoch,
+            appendTimestamp,
+            sizeInBytes,
+            lastOffset,
+            records
+        );
     }
 
     /**
-     * Create a batch without any records.
+     * Create a control batch without any data records.
      *
      * Internally this is used to propagate offset information for control 
batches which do not decode to the type T.
      *
      * @param baseOffset offset of the batch
      * @param epoch epoch of the leader that created this batch
-     * @param lastOffset offset of the last record of this batch
+     * @param appendTimestamp timestamp of when the batch was appended

Review comment:
       Done and done.




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


Reply via email to