From 07b786e5bfe9685316d8ec51d58f67c8f1536a49 Mon Sep 17 00:00:00 2001 From: Ken Huang Date: Sun, 21 Sep 2025 12:35:46 +0800 Subject: [PATCH] KAFKA-19681 Improve MetadataShell tool by skipping missing children and removing zkMigrationState (#20504) The current `metadata-shell` find command throws an exception due to child node `zkMigrationState`. This interrupts the output and makes the CLI less usable. Additionally, `zkMigrationState` is no longer used in Kafka 4.x, but it is still defined under image/features, which causes misleading error messages. Reviewers: Chia-Ping Tsai --- .../java/org/apache/kafka/image/node/FeaturesImageNode.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/metadata/src/main/java/org/apache/kafka/image/node/FeaturesImageNode.java b/metadata/src/main/java/org/apache/kafka/image/node/FeaturesImageNode.java index 286e31dba0a..09244a28db7 100644 --- a/metadata/src/main/java/org/apache/kafka/image/node/FeaturesImageNode.java +++ b/metadata/src/main/java/org/apache/kafka/image/node/FeaturesImageNode.java @@ -34,11 +34,6 @@ public class FeaturesImageNode implements MetadataNode { */ public static final String METADATA_VERSION = "metadataVersion"; - /** - * The name of the zk migration state child node. - */ - public static final String ZK_MIGRATION_STATE = "zkMigrationState"; - /** * The prefix to put before finalized feature children. */ @@ -57,7 +52,6 @@ public class FeaturesImageNode implements MetadataNode { public Collection childNames() { ArrayList childNames = new ArrayList<>(); childNames.add(METADATA_VERSION); - childNames.add(ZK_MIGRATION_STATE); for (String featureName : image.finalizedVersions().keySet()) { childNames.add(FINALIZED_PREFIX + featureName); }