You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "clolov (via GitHub)" <gi...@apache.org> on 2023/02/02 11:29:02 UTC

[GitHub] [kafka] clolov commented on a diff in pull request #13180: MINOR: Add a summary of the metadata migration

clolov commented on code in PR #13180:
URL: https://github.com/apache/kafka/pull/13180#discussion_r1094398310


##########
metadata/src/main/java/org/apache/kafka/metadata/migration/KRaftMigrationDriver.java:
##########
@@ -415,7 +416,7 @@ public void run() throws Exception {
                             log.info("Migrating {} records from ZK", batch.size());
                         }
                         CompletableFuture<?> future = zkRecordConsumer.acceptBatch(batch);
-                        count.addAndGet(batch.size());
+                        summary.acceptBatch(batch);

Review Comment:
   I am new to this part of the codebase, so this might have an obvious answer, but previously we used an AtomicInteger, which leads me to believe there was a race-condition which the author was trying to avoid. If this is true, the new MigrationSummary class does not impose any synchronization barriers, is this correct?



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org