[jira] [Commented] (KAFKA-3525) max.reserved.broker.id off-by-one error
[ https://issues.apache.org/jira/browse/KAFKA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15279324#comment-15279324 ] ASF GitHub Bot commented on KAFKA-3525: --- Github user asfgit closed the pull request at: https://github.com/apache/kafka/pull/1224 > max.reserved.broker.id off-by-one error > --- > > Key: KAFKA-3525 > URL: https://issues.apache.org/jira/browse/KAFKA-3525 > Project: Kafka > Issue Type: Bug > Components: config >Reporter: Alan Braithwaite >Assignee: Manikumar Reddy > Fix For: 0.10.1.0 > > > There's an off-by-one error in the config check / id generation for > max.reserved.broker.id setting. The auto-generation will generate > max.reserved.broker.id as the initial broker id as it's currently written. > Not sure what the consequences of this are if there's already a broker with > that id as I didn't test that behavior. > This can return 0 + max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215 > However, this does a <= check, which is inclusive of max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3525) max.reserved.broker.id off-by-one error
[ https://issues.apache.org/jira/browse/KAFKA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15273215#comment-15273215 ] Flavio Junqueira commented on KAFKA-3525: - Got it, thank you both for the clarification. {{getSequenceId}} needs to start from 1, otherwise we can get a collision. > max.reserved.broker.id off-by-one error > --- > > Key: KAFKA-3525 > URL: https://issues.apache.org/jira/browse/KAFKA-3525 > Project: Kafka > Issue Type: Bug > Components: config >Reporter: Alan Braithwaite >Assignee: Manikumar Reddy > Fix For: 0.10.1.0 > > > There's an off-by-one error in the config check / id generation for > max.reserved.broker.id setting. The auto-generation will generate > max.reserved.broker.id as the initial broker id as it's currently written. > Not sure what the consequences of this are if there's already a broker with > that id as I didn't test that behavior. > This can return 0 + max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215 > However, this does a <= check, which is inclusive of max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3525) max.reserved.broker.id off-by-one error
[ https://issues.apache.org/jira/browse/KAFKA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15272696#comment-15272696 ] Sriharsha Chintalapani commented on KAFKA-3525: --- [~fpj] reservered.broker.max.id is for backward compatibility. If a user is already setting broker.id than they can do so till reserved.broker.max.id and auto generation of broker.id (in absence of broker.id in server.properties) will start from reserved.broker.max.id > max.reserved.broker.id off-by-one error > --- > > Key: KAFKA-3525 > URL: https://issues.apache.org/jira/browse/KAFKA-3525 > Project: Kafka > Issue Type: Bug > Components: config >Reporter: Alan Braithwaite >Assignee: Manikumar Reddy > Fix For: 0.10.1.0 > > > There's an off-by-one error in the config check / id generation for > max.reserved.broker.id setting. The auto-generation will generate > max.reserved.broker.id as the initial broker id as it's currently written. > Not sure what the consequences of this are if there's already a broker with > that id as I didn't test that behavior. > This can return 0 + max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215 > However, this does a <= check, which is inclusive of max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3525) max.reserved.broker.id off-by-one error
[ https://issues.apache.org/jira/browse/KAFKA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15272275#comment-15272275 ] Manikumar Reddy commented on KAFKA-3525: 1. Assume reserved.broker.max.id =1000 2. Configure broker.id=1000 on Broker1 3. Enable auto broker id generation on Broker2 Now, [~abraithwaite] concern is Broker2 may generate 1000 as broker.id. > max.reserved.broker.id off-by-one error > --- > > Key: KAFKA-3525 > URL: https://issues.apache.org/jira/browse/KAFKA-3525 > Project: Kafka > Issue Type: Bug > Components: config >Reporter: Alan Braithwaite >Assignee: Manikumar Reddy > Fix For: 0.10.1.0 > > > There's an off-by-one error in the config check / id generation for > max.reserved.broker.id setting. The auto-generation will generate > max.reserved.broker.id as the initial broker id as it's currently written. > Not sure what the consequences of this are if there's already a broker with > that id as I didn't test that behavior. > This can return 0 + max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215 > However, this does a <= check, which is inclusive of max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3525) max.reserved.broker.id off-by-one error
[ https://issues.apache.org/jira/browse/KAFKA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15272234#comment-15272234 ] Flavio Junqueira commented on KAFKA-3525: - I'm a bit confused by what this issue is trying to accomplish. The documentation for {{reserved.broker.max.id}} says "Max number that can be used for a broker.id", which in my interpretation says that the maximum id is the value of {{reserved.broker.max.id}}, and not that there are {{reserved.broker.max.id}} possible values reserved. Unless I'm missing something, the code is correct without the change proposed in the PR, but please clarify if I'm missing the point. > max.reserved.broker.id off-by-one error > --- > > Key: KAFKA-3525 > URL: https://issues.apache.org/jira/browse/KAFKA-3525 > Project: Kafka > Issue Type: Bug > Components: config >Reporter: Alan Braithwaite >Assignee: Manikumar Reddy > Fix For: 0.10.1.0 > > > There's an off-by-one error in the config check / id generation for > max.reserved.broker.id setting. The auto-generation will generate > max.reserved.broker.id as the initial broker id as it's currently written. > Not sure what the consequences of this are if there's already a broker with > that id as I didn't test that behavior. > This can return 0 + max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215 > However, this does a <= check, which is inclusive of max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3525) max.reserved.broker.id off-by-one error
[ https://issues.apache.org/jira/browse/KAFKA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15271527#comment-15271527 ] Gwen Shapira commented on KAFKA-3525: - This will wait for the next release. The max reserved is very high and user-configurable. > max.reserved.broker.id off-by-one error > --- > > Key: KAFKA-3525 > URL: https://issues.apache.org/jira/browse/KAFKA-3525 > Project: Kafka > Issue Type: Bug > Components: config >Reporter: Alan Braithwaite >Assignee: Manikumar Reddy > Fix For: 0.10.1.0 > > > There's an off-by-one error in the config check / id generation for > max.reserved.broker.id setting. The auto-generation will generate > max.reserved.broker.id as the initial broker id as it's currently written. > Not sure what the consequences of this are if there's already a broker with > that id as I didn't test that behavior. > This can return 0 + max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215 > However, this does a <= check, which is inclusive of max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3525) max.reserved.broker.id off-by-one error
[ https://issues.apache.org/jira/browse/KAFKA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15242882#comment-15242882 ] ASF GitHub Bot commented on KAFKA-3525: --- GitHub user omkreddy opened a pull request: https://github.com/apache/kafka/pull/1224 KAFKA-3525; getSequenceId should return 1 for first path creation You can merge this pull request into a Git repository by running: $ git pull https://github.com/omkreddy/kafka KAFKA-3525 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/1224.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1224 commit 83143d07bc2bafdd4699b8144f55b9f44d528e0f Author: Manikumar reddy ODate: 2016-04-15T12:19:53Z KAFKA-3525; getSequenceId should return 1 for first path creation > max.reserved.broker.id off-by-one error > --- > > Key: KAFKA-3525 > URL: https://issues.apache.org/jira/browse/KAFKA-3525 > Project: Kafka > Issue Type: Bug > Components: config >Reporter: Alan Braithwaite >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.10.0.0 > > > There's an off-by-one error in the config check / id generation for > max.reserved.broker.id setting. The auto-generation will generate > max.reserved.broker.id as the initial broker id as it's currently written. > Not sure what the consequences of this are if there's already a broker with > that id as I didn't test that behavior. > This can return 0 + max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215 > However, this does a <= check, which is inclusive of max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3525) max.reserved.broker.id off-by-one error
[ https://issues.apache.org/jira/browse/KAFKA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15233241#comment-15233241 ] Manikumar Reddy commented on KAFKA-3525: Yes, by looking this function alone it is possible. But, the create part of the code will never get execute (we create all the required zk paths during kafka startup process). May be we can just cleanup code. > max.reserved.broker.id off-by-one error > --- > > Key: KAFKA-3525 > URL: https://issues.apache.org/jira/browse/KAFKA-3525 > Project: Kafka > Issue Type: Bug > Components: config >Reporter: Alan Braithwaite >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.10.0.0 > > > There's an off-by-one error in the config check / id generation for > max.reserved.broker.id setting. The auto-generation will generate > max.reserved.broker.id as the initial broker id as it's currently written. > Not sure what the consequences of this are if there's already a broker with > that id as I didn't test that behavior. > This can return 0 + max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215 > However, this does a <= check, which is inclusive of max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (KAFKA-3525) max.reserved.broker.id off-by-one error
[ https://issues.apache.org/jira/browse/KAFKA-3525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15232703#comment-15232703 ] Alan Braithwaite commented on KAFKA-3525: - Please correct me if I'm wrong, but this looks like a create or update function, meaning that it is possible to create and then return 0 (instead of the zk node version, but that would be 0 as well). > max.reserved.broker.id off-by-one error > --- > > Key: KAFKA-3525 > URL: https://issues.apache.org/jira/browse/KAFKA-3525 > Project: Kafka > Issue Type: Bug > Components: config >Reporter: Alan Braithwaite >Assignee: Manikumar Reddy >Priority: Blocker > Fix For: 0.10.0.0 > > > There's an off-by-one error in the config check / id generation for > max.reserved.broker.id setting. The auto-generation will generate > max.reserved.broker.id as the initial broker id as it's currently written. > Not sure what the consequences of this are if there's already a broker with > that id as I didn't test that behavior. > This can return 0 + max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/utils/ZkUtils.scala#L213-L215 > However, this does a <= check, which is inclusive of max.reserved.broker.id: > https://github.com/apache/kafka/blob/8dbd688b1617968329087317fa6bde8b8df0392e/core/src/main/scala/kafka/server/KafkaConfig.scala#L984-L986 -- This message was sent by Atlassian JIRA (v6.3.4#6332)