kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Kreps (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-1119) Kafka 0.8.1 overwrites previous per topic config changes
Date Tue, 05 Nov 2013 05:25:20 GMT

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

Jay Kreps commented on KAFKA-1119:

Hmm, but it looks like the current behavior is to just blindly set whatever properties are
given on the command line as the FULL set of properties. So if I say
./bin/kafka-topics.sh --alter --config retention.ms=180000
I might think I am just changing the retention.ms but in reality I am unsetting any previous
per-topic configs (whatever they may be) and setting retention.ms.

Currently the code looks like this:
      val configs = parseTopicConfigs(opts)
      AdminUtils.changeTopicConfig(zkClient, topic, configs)

I think it might be more intuitive if we interpreted the args as a diff to apply to the current
settings. So the code would be soemthing like:
      val configs = AdminUtils.fetchTopicConfig(zkClient, topic)
      AdminUtils.changeTopicConfig(zkClient, topic, configs)

This does have a downside, though. How do you remove an override? Let's say there is a default
of X, setting X actually sets a topic override of X which is different from having no setting
for the config (because if you change the default that topic would be unaffected). This is
not hugely important but some options for handling this would be
  1. No value means delete the config: --config x=
  2. Add a new option for unconfiguring: --config x=12 and --unconfig x

> Kafka 0.8.1 overwrites previous per topic config changes
> --------------------------------------------------------
>                 Key: KAFKA-1119
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1119
>             Project: Kafka
>          Issue Type: Bug
>          Components: config
>    Affects Versions: 0.8.1
>            Reporter: Neha Narkhede
>            Assignee: Neha Narkhede
>            Priority: Blocker
> kafka-topics --alter --config overwrites the previous per topic configs. There is no
way to override more than one per topic config for the same topic

This message was sent by Atlassian JIRA

View raw message