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

ASF GitHub Bot commented on KAFKA-7890:
---------------------------------------

markcho commented on pull request #6215: KAFKA-7890: Invalidate 
ClusterConnectionState cache for a broker if the hostname of the broker changes.
URL: https://github.com/apache/kafka/pull/6215
 
 
   See https://issues.apache.org/jira/browse/KAFKA-7890 for additional details.
   
   - Added a new unit test where the hostname changes.
   - Also tested in production
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Invalidate ClusterConnectionState cache for a broker if the hostname of the 
> broker changes.
> -------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-7890
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7890
>             Project: Kafka
>          Issue Type: Bug
>          Components: network
>    Affects Versions: 2.1.0
>            Reporter: Mark Cho
>            Priority: Major
>
> We've ran into a similar issue as this ticket: 
> [https://issues.apache.org/jira/projects/KAFKA/issues/KAFKA-7755]
> The fix for KAFKA-7755 doesn't work for this case as the hostname is not 
> updated when resolving the addresses.
> `ClusterConnectionStates::connecting` method makes an assumption that broker 
> ID will always map to same hostname. In our case, when a broker is terminated 
> in AWS, it is replaced by a different instance under the same broker ID. 
> In this case, the consumer fails to connect to the right host when the broker 
> ID returns to the cluster. For example, we see the following line in DEBUG 
> logs:
> {code:java}
> Initiating connection to node 100.66.7.94:7101 (id: 1 rack: us-east-1c) using 
> address /100.66.14.165
> {code}
> It tries to connect to the new broker instance using the wrong (old) IP 
> address.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to