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

[GitHub] [kafka] Hangleton commented on a diff in pull request #13183: KAFKA-14668 Avoid unnecessary UMR during ZK migration

Hangleton commented on code in PR #13183:
URL: https://github.com/apache/kafka/pull/13183#discussion_r1094454976


##########
metadata/src/main/java/org/apache/kafka/metadata/migration/KRaftMigrationDriver.java:
##########
@@ -474,6 +472,7 @@ class MetadataChangeEvent extends MigrationEvent {
         private final MetadataImage image;
         private final MetadataProvenance provenance;
         private final boolean isSnapshot;
+        CompletableFuture<Void> future = new CompletableFuture<>();

Review Comment:
   If we want to follow this pattern where the tests `KRaftMigrationDriverTest` are signalled when this event is processed, and at the same time avoid the cost of adding a future to every `SendRPCsToBrokersEvent`, `enqueueMetadataChangeEvent` could take a future in argument instead. Prod code would pass an empty/noop future. Alternatively the unit tests could loop until the assertions are verified or a timeout is reached.



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