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


##########
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java:
##########
@@ -646,70 +616,69 @@ public Optional<SnapshotFile> 
removeAndMarkSnapshotForDeletion(long snapshotOffs
     }
 
     public static List<ProducerStateEntry> readSnapshot(File file) throws 
IOException {

Review Comment:
   It seems we don't have unit test for this method. We should add some tests 
for `readSnapshot` and `writeSnapshot` before introducing the generated code.
   
   I have filed https://issues.apache.org/jira/browse/KAFKA-17135 for you 
@brandboat please feel free to un-assign if you have no bandwidth.



##########
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java:
##########
@@ -74,37 +71,10 @@ public class ProducerStateManager {
 
     public static final long LATE_TRANSACTION_BUFFER_MS = 5 * 60 * 1000;
 
-    private static final short PRODUCER_SNAPSHOT_VERSION = 1;

Review Comment:
   @brandboat could you add a temporary unit test to verify the compatibility? 
We can move those struct stuff to testing and then generate some random data 
for comparison. 



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