mumrah commented on code in PR #13033:
URL: https://github.com/apache/kafka/pull/13033#discussion_r1054485418


##########
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java:
##########
@@ -1071,7 +1136,11 @@ public ControllerResult<Void> generateRecordsAndResult() 
throws Exception {
                 log.info("The metadata log appears to be empty. Appending {} 
bootstrap record(s) " +
                         "at metadata.version {} from {}.", 
bootstrapMetadata.records().size(),
                         bootstrapMetadata.metadataVersion(), 
bootstrapMetadata.source());
+                records.add(new ApiMessageAndVersion(
+                        new BeginTransactionRecord().setName("initial 
transaction"), (short) 0));
                 records.addAll(bootstrapMetadata.records());
+                records.add(new ApiMessageAndVersion(
+                        new EndTransactionRecord(), (short) 0));

Review Comment:
   Why do we need the bootstrap records wrapped in a transaction? Aren't they 
written as an atomic batch?



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