ahuang98 commented on code in PR #14206:
URL: https://github.com/apache/kafka/pull/14206#discussion_r1340519640


##########
metadata/src/test/java/org/apache/kafka/image/ProducerIdsImageTest.java:
##########
@@ -54,11 +54,24 @@ public class ProducerIdsImageTest {
             setBrokerId(3).
             setBrokerEpoch(100).
             setNextProducerId(789), (short) 0));
+        DELTA1_RECORDS.add(new ApiMessageAndVersion(new ProducerIdsRecord().
+            setBrokerId(3).
+            setBrokerEpoch(100).
+            setNextProducerId(780), (short) 0));
+        DELTA1_RECORDS.add(new ApiMessageAndVersion(new ProducerIdsRecord().
+            setBrokerId(3).
+            setBrokerEpoch(100).
+            setNextProducerId(785), (short) 0));
+        DELTA1_RECORDS.add(new ApiMessageAndVersion(new ProducerIdsRecord().
+            setBrokerId(2).
+            setBrokerEpoch(100).
+            setNextProducerId(460), (short) 0));
 
         DELTA1 = new ProducerIdsDelta(IMAGE1);
         RecordTestUtils.replayAll(DELTA1, DELTA1_RECORDS);
 
-        IMAGE2 = new ProducerIdsImage(789);
+        // producer ids must be increasing, but delta replay does not check 
this (only QuorumController replay)

Review Comment:
   let's go with the latter then, we'll need to iron out validation for the 
sake of the metadata recovery tool anyways



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