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

[GitHub] [kafka] mumrah commented on a diff in pull request #14342: KAFKA-15435 Fix counts in MigrationManifest

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


##########
metadata/src/main/java/org/apache/kafka/metadata/migration/MigrationManifest.java:
##########
@@ -60,7 +61,8 @@ public MigrationManifest build() {
             if (endTimeNanos == 0) {
                 endTimeNanos = time.nanoseconds();
             }
-            return new MigrationManifest(total, batches, endTimeNanos - startTimeNanos, counts);
+            Map<MetadataRecordType, Integer> orderedCounts = new TreeMap<>(counts);

Review Comment:
   Putting into a treemap will order the map according to the keys. The effect of this is that the log message becomes deterministic, which is useful for testing.



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