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


##########
core/src/main/scala/kafka/tools/DumpLogSegments.scala:
##########
@@ -288,6 +294,12 @@ object DumpLogSegments {
                   case ControlRecordType.ABORT | ControlRecordType.COMMIT =>
                     val endTxnMarker = EndTransactionMarker.deserialize(record)
                     print(s" endTxnMarker: ${endTxnMarker.controlType} 
coordinatorEpoch: ${endTxnMarker.coordinatorEpoch}")
+                  case ControlRecordType.SNAPSHOT_HEADER =>
+                    val header = 
ControlRecordUtils.deserializedSnapshotHeaderRecord(record)
+                    print(s" SnapshotHeader 
${SnapshotHeaderRecordJsonConverter.write(header, 
SnapshotHeaderRecord.HIGHEST_SUPPORTED_VERSION)}")
+                  case ControlRecordType.SNAPSHOT_FOOTER =>
+                    val footer = 
ControlRecordUtils.deserializedSnapshotFooterRecord(record)
+                    print(s" SnapshotFooter 
${SnapshotFooterRecordJsonConverter.write(footer, 
SnapshotFooterRecord.HIGHEST_SUPPORTED_VERSION)}")

Review Comment:
   Instead of using `HIGHEST_SUPPORTED_VERSION` should we use `version()` from 
the `header` and `footer` record? We may also need to handle the case when the 
version is greater than `HIGHEST_SUPPORTED_VERSION`.



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