You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "m1a2st (via GitHub)" <gi...@apache.org> on 2026/04/20 17:44:03 UTC

[PR] KAFKA-20506 kafka-configs.sh can't delete a nonexistent config from a offline broker when using bootstrap controller [kafka]

m1a2st opened a new pull request, #22104:
URL: https://github.com/apache/kafka/pull/22104

   Ref https://github.com/apache/kafka/pull/22070#issuecomment-4282766703
   
   Remove the pre-flight DescribeConfigs existence check in `alterResourceConfig()` since deleting a non-existent config is idempotent, and the check causes a timeout when the target broker is offline.


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


Re: [PR] KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller [kafka]

Posted by "mimaison (via GitHub)" <gi...@apache.org>.
mimaison commented on code in PR #22104:
URL: https://github.com/apache/kafka/pull/22104#discussion_r3131634557


##########
tools/src/test/java/org/apache/kafka/tools/ConfigCommandIntegrationTest.java:
##########
@@ -621,6 +621,29 @@ public void testUpdateInvalidTopicConfigs() throws ExecutionException, Interrupt
         }
     }
 
+    @ClusterTest
+    public void testDeleteNonExistentConfigIsIdempotent() throws Exception {

Review Comment:
   Since the Jira is about usages with bootstrap-controller I would have expected new tests with that flag. Also is there a test that alters configs with a broker shutdown?



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


Re: [PR] KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #22104:
URL: https://github.com/apache/kafka/pull/22104#discussion_r3116009063


##########
tools/src/main/java/org/apache/kafka/tools/ConfigCommand.java:
##########
@@ -263,7 +266,7 @@ static void alterConfig(Admin adminClient, ConfigCommandOptions opts) throws IOE
                 throw ee;
             }
         } else if (BROKER_LOGGER_CONFIG_TYPE.equals(entityType)) {
-            List<String> validLoggers = getResourceConfig(adminClient, entityType, entityName, true, false).stream().map(ConfigEntry::name).toList();

Review Comment:
   It looks like an existing bug, as the synonyms are not actually being used. Therefore, it should pass true instead of false.



##########
tools/src/main/java/org/apache/kafka/tools/ConfigCommand.java:
##########
@@ -577,18 +580,7 @@ private static void describeResourceConfig(Admin adminClient, String entityType,
         }
     }
 
-    private static void alterResourceConfig(Admin adminClient, String entityTypeHead, String entityNameHead, List<String> configsToBeDeleted, Map<String, ConfigEntry> configsToBeAdded, ConfigResource.Type resourceType) throws ExecutionException, InterruptedException, TimeoutException {
-        Map<String, ConfigEntry> oldConfig = getResourceConfig(adminClient, entityTypeHead, entityNameHead, false, false)

Review Comment:
   please add this changes to `upgrade.md`



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


Re: [PR] KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 commented on code in PR #22104:
URL: https://github.com/apache/kafka/pull/22104#discussion_r3118618766


##########
docs/getting-started/upgrade.md:
##########
@@ -32,6 +32,7 @@ type: docs
 
 ### Notable changes in 4.4.0
 
+  * `kafka-configs.sh --alter --delete-config` no longer requires the specified config keys to exist on the target resource. Previously, attempting to delete a non-existent config key raised an `InvalidConfigurationException`. The deletion is now a no-op when the key does not exist, which allows managing configs for offline brokers via `--bootstrap-controller`. For further details, please refer to [KAFKA-20506](https://issues.apache.org/jira/browse/KAFKA-20506).

Review Comment:
   Since this fix will be backported to the 4.3 branch, this note can be deferred to the PR targeting 4.3.



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


Re: [PR] KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller [kafka]

Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
chia7712 merged PR #22104:
URL: https://github.com/apache/kafka/pull/22104


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


Re: [PR] KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller [kafka]

Posted by "m1a2st (via GitHub)" <gi...@apache.org>.
m1a2st commented on code in PR #22104:
URL: https://github.com/apache/kafka/pull/22104#discussion_r3131784232


##########
tools/src/test/java/org/apache/kafka/tools/ConfigCommandIntegrationTest.java:
##########
@@ -621,6 +621,29 @@ public void testUpdateInvalidTopicConfigs() throws ExecutionException, Interrupt
         }
     }
 
+    @ClusterTest
+    public void testDeleteNonExistentConfigIsIdempotent() throws Exception {

Review Comment:
   I’ll file a patch to add these tests.



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


Re: [PR] KAFKA-20506 kafka-configs.sh can't delete the config from a offline broker when using bootstrap controller [kafka]

Posted by "m1a2st (via GitHub)" <gi...@apache.org>.
m1a2st commented on PR #22104:
URL: https://github.com/apache/kafka/pull/22104#issuecomment-4292863910

   For 4.3 branch: https://github.com/apache/kafka/pull/22113


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