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

Jay Kreps commented on KAFKA-1070:
----------------------------------

Hey [~harsha_ch], that is a great point.

I'd like to avoid changing the type of the id to a long or UUID so as to not 
have to bump up the protocol format for the metadata request which hands these 
out to clients (we would need a way to handle compatibility with older clients 
that don't expect the longer types).

I think we can get around the problem you point out by just defaulting the node 
id sequence to 1000. This could theoretically conflict but most people number 
from 0 or 1 and we can discuss this in the release notes. Our plan will be to 
release with support for both configured node ids and assigned node ids for 
compatibility. After a couple of releases we will remove the config.

So the behavior would be this:
If there is a node id in the config we will validate it against the node id in 
the data directory
If it matches that good, we'll use that.
If it doesn't match that is bad, we'll crash with an error.
If there is a node id in the data directory but none in the config, we'll use 
whatever is in the data directory.
If there is no node id in the data directory yet but there is  one in the 
config we'll write that to the data directory and use it.
If there is neither a node id in the data directory nor in the config we'll 
allocate a node id and write it to the data directory.


> Auto-assign node id
> -------------------
>
>                 Key: KAFKA-1070
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1070
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Jay Kreps
>            Assignee: Sriharsha Chintalapani
>              Labels: usability
>
> It would be nice to have Kafka brokers auto-assign node ids rather than 
> having that be a configuration. Having a configuration is irritating because 
> (1) you have to generate a custom config for each broker and (2) even though 
> it is in configuration, changing the node id can cause all kinds of bad 
> things to happen.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to