jsancio commented on code in PR #22805:
URL: https://github.com/apache/kafka/pull/22805#discussion_r3624390956


##########
raft/src/main/java/org/apache/kafka/snapshot/RecordsSnapshotReader.java:
##########
@@ -110,15 +110,22 @@ public void close() {
 
     public static <T> RecordsSnapshotReader<T> of(
         RawSnapshotReader snapshot,
-        RecordSerde<T> serde,
+        RecordsDecodingStrategy<T> decodingStrategy,

Review Comment:
   Because this class implements the method `lastContainedLogTimestamp`, the 
decoding strategy can only be `dataAndControl` or `controlOnly`. We should 
enforce at construction. That means that many the only two possible 
constructors should be `of` which takes a serde and creates a `dataAndControl` 
decoding strategy, and `ofControlOnly` which doesn't take a serde and creates a 
`controlOnly`.



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