BewareMyPower commented on PR #23298:
URL: https://github.com/apache/pulsar/pull/23298#issuecomment-2348298725

   > Perhaps the description could be updated to include the actual reason why 
we want to do this change,
   
   @lhotari Updated.
   
   >  but what is the expected behavior if user made an incorrect broker ID 
(same broker ID)? As I understand, only the first broker should register 
successfully, all the other brokers with the same broker ID should get failed?
   
   @codelipenghui I'd like to say, [undefined 
behavior](https://en.wikipedia.org/wiki/Undefined_behavior). Kafka's behavior 
is also that only one broker will succeed if multiple brokers configure the 
same 
[broker.id](https://kafka.apache.org/documentation/#brokerconfigs_broker.id). 
However, this behavior is never documented. It only suggests generating broker 
id automatically by ZooKeeper:
   
   > To avoid conflicts between ZooKeeper generated broker id's and user 
configured broker id's, generated broker ids start from reserved.broker.max.id 
+ 1.
   
   Actually, in real world, only if two brokers were configured with the same 
`advertisedAddress` and `webServicePort` would they have the same broker id. 
Even if they both don't fail after the change of this PR, users can still 
easily found the service didn't work because the advertised address is wrong.
   
   It would be good if users can quickly know they've configured the same 
broker id for different brokers. However, IMO, this issue caused by 
misconfiguration can hardly exist in practical rather than in theory.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to