[
https://issues.apache.org/jira/browse/KAFKA-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14244175#comment-14244175
]
Dave Parfitt commented on KAFKA-1811:
-------------------------------------
Hi Gwen -
Thanks so much for taking the time to review my patch and pointing me in the
right direction.
>> 2. We also like unit tests
Absolutely. I wanted to make sure I was going down the correct path first.
>> 3. I'd consider pushing this check down to registerBrokerInZk. It seems like
>> a natural place to ensure uniqueness of registered brokers before
>> registering.
My thinking was that I wanted to detect non-unique host:port combinations
before the SocketServer started, however it probably
makes more sense in registerBrokerInZk as you suggest.
>> 4. Another thing to consider is race conditions - what if new broker
>> registers while we are checking? Perhaps we can even use ZK itself to
>> enforce uniqueness?
I should have thought of this, is there any code in Kafka that you recommend I
model this after?
Cheers -
Dave
> ensuring registered broker host:port is unique
> ----------------------------------------------
>
> Key: KAFKA-1811
> URL: https://issues.apache.org/jira/browse/KAFKA-1811
> Project: Kafka
> Issue Type: Improvement
> Reporter: Jun Rao
> Labels: newbie
> Attachments: KAFKA_1811.patch
>
>
> Currently, we expect each of the registered broker to have a unique host:port
> pair. However, we don't enforce that, which causes various weird problems. It
> would be useful to ensure this during broker registration.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)