arnabnandy7 opened a new pull request, #23310: URL: https://github.com/apache/kafka/pull/23310
## Summary KAFKA-19028 identifies inconsistent `AlterConfigPolicy` behavior for incremental DELETE operations. Deleting an unset topic configuration produced no `ConfigRecord`, causing the configuration to be omitted from `RequestMetadata.configs()`. Broker deletions were instead represented as a key mapped to `null`. This change ensures every explicit incremental DELETE operation is passed to `AlterConfigPolicy` as a configuration key mapped to `null`, even when the resource has no existing override and no metadata record is generated. The existing behavior for SET, APPEND, SUBTRACT, and the legacy AlterConfigs API remains unchanged. The `AlterConfigPolicy.RequestMetadata.configs()` Javadoc now documents how incremental DELETE operations are represented. ## Testing Added a focused unit test covering explicit deletion of unset topic and broker configurations. The test verifies that both resource types produce consistent policy metadata containing the deleted key mapped to `null`. ```text ./gradlew :metadata:test --tests org.apache.kafka.controller.ConfigurationControlManagerTest ./gradlew :clients:test --tests org.apache.kafka.server.policy.AlterConfigPolicyTest ./gradlew spotlessCheck ``` Reviewers: Edoardo Comar @edoardocomar -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
