[
https://issues.apache.org/jira/browse/KAFKA-19851?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
José Armando García Sancio resolved KAFKA-19851.
------------------------------------------------
Resolution: Fixed
> Delete dynamic config that were removed by Kafka
> ------------------------------------------------
>
> Key: KAFKA-19851
> URL: https://issues.apache.org/jira/browse/KAFKA-19851
> Project: Kafka
> Issue Type: Improvement
> Components: controller
> Affects Versions: 4.0.0, 4.1.0, 4.2.0
> Reporter: José Armando García Sancio
> Assignee: tony tang
> Priority: Major
> Fix For: 4.3.0
>
>
> *Problem*
> [KIP-724: Drop support for message formats v0 and
> v1|https://cwiki.apache.org/confluence/display/KAFKA/KIP-724%3A+Drop+support+for+message+formats+v0+and+v1]
> and Kafka 4.0.0 removed support for the dynamic configs like
> {code:java}
> message.format.version{code}
> When upgrading from 3.x to 4.x, deprecated dynamic configs previously set by
> users may still exist in the metadata log. During migration the upgrade can
> complete successfully, but after migration, any attempt to update topic
> dynamic configs will fail with:
> {code:java}
> InvalidConfigurationException: Unknown topic config name:
> message.format.version{code}
> This happens because {{validateAlterConfig()}} loads all existing configs
> from {{configData}} including the deprecated ones and validates all their
> names, even when the user is only trying to update an unrelated config.
> *Solution*
> Maintain a well-defined allowlist of supported dynamic config names per
> resource type. Any {{ConfigRecord}} whose config name is not in the allowlist
> is silently ignored during metadata replay, preventing deprecated configs
> from entering the in-memory state.
> This filtering is triggered when the metadata version is upgraded to 4.0,
> meaning that upgrading the metadata version will cause all removed configs to
> be effectively deleted from the in-memory state. Any config that no longer
> appears in the allowlist for its resource type will not be replayed into
> {{{}configData{}}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)