You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Edoardo Comar (Jira)" <ji...@apache.org> on 2025/04/25 08:50:00 UTC

[jira] [Comment Edited] (KAFKA-19026) AlterConfigPolicy incompatibility between ZK mode and KRaft mode when using AlterConfigOp.OpType.SUBTRACT/APPEND

    [ https://issues.apache.org/jira/browse/KAFKA-19026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17947267#comment-17947267 ] 

Edoardo Comar edited comment on KAFKA-19026 at 4/25/25 8:49 AM:
----------------------------------------------------------------

Hi [~showuon] while this fix would change the behaviour of invoking a policy, the current ZK behavior is not usable to write a {{AlterConfigPolicy}}  to prevent an empty topic cleanup.policy, so if anything the breaking change would be that such a policy would start to work.

I think I can add a small doc note in the migration guide, but that would not IMHO resolve this problem. Currently I see no way a ZK-mode cluster can have a AlterConfigPolicy that can stop having an empty cleanup policy, and I think that is something that is worth fixing, as I expect ZK Kafkas to still keep running for some time in production :)


was (Author: ecomar):
Hi [~showuon] while this fix would change the behaviour of invoking a policy, the current ZK behavior is not usable to write a {{AlterConfigPolicy}}  to prevent an empty topic cleanup.policy, so if anything the breaking change would be that such a policy would start to work.

I think I can add a small doc note in the migration guide, but that would not IMHO resolve this problem. Currently I see no way a ZK-mode cluster can have an {{AlterConfigPolicy }}that can stop the removal of a cleanup policy, and I think that is something that is worth fixing, as I expect ZK Kafkas to still keep running for some time in production :)

> AlterConfigPolicy incompatibility between ZK mode and KRaft mode when using AlterConfigOp.OpType.SUBTRACT/APPEND
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-19026
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19026
>             Project: Kafka
>          Issue Type: Bug
>          Components: core, migration
>    Affects Versions: 3.8.1, 3.9.0
>            Reporter: Edoardo Comar
>            Assignee: Edoardo Comar
>            Priority: Major
>             Fix For: 3.9.2
>
>         Attachments: KAFKA19026Policy.java, KAFKA19026Test.java
>
>
> When processing an Incremental Alter Config on a Config entry of type List with OpType.SUBTRACT
> the metadata passed to  {color:#000000}AlterConfigPolicy.validate contains {color}
>  * {color:#000000}in KRaft mode : {color}{color:#000000}the config that would result AFTER the subtraction{color}
>  * {color:#000000}in ZK mode : the config as if the opType was OpType.SET, with no indication that actually the value would be removed{color}
> {color:#000000}Also OpType.APPEND behaves inconsistently in this regard{color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)