cmccabe commented on code in PR #13374:
URL: https://github.com/apache/kafka/pull/13374#discussion_r1140833054


##########
core/src/main/scala/kafka/tools/StorageTool.scala:
##########
@@ -214,6 +340,24 @@ object StorageTool extends Logging {
     }
   }
 
+  def buildBootstrapMetadata(metadataVersion: MetadataVersion,
+                             metadataOptionalArguments: 
Option[ArrayBuffer[ApiMessageAndVersion]],
+                             source: String): BootstrapMetadata = {
+
+    val metadataRecords = new util.ArrayList[ApiMessageAndVersion]
+    metadataRecords.add(new ApiMessageAndVersion(new FeatureLevelRecord().
+                        setName(MetadataVersion.FEATURE_NAME).
+                        setFeatureLevel(metadataVersion.featureLevel()), 
0.toShort));
+
+    metadataOptionalArguments.foreach { metadataArguments =>
+      for (record <- metadataArguments) metadataRecords.add(record)
+    }
+
+    metadataRecords.add(new ApiMessageAndVersion(new NoOpRecord(), 0.toShort));

Review Comment:
   why are you adding a no-op record?



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