This repository was archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 142
Fix CreateTopics failure when kafkaAdvertisedListeners are different with kafkaListeners #1092
Merged
BewareMyPower
merged 2 commits into
streamnative:branch-2.8.2
from
BewareMyPower:bewaremypower/2.8-create-topics
Feb 16, 2022
Merged
Fix CreateTopics failure when kafkaAdvertisedListeners are different with kafkaListeners #1092
BewareMyPower
merged 2 commits into
streamnative:branch-2.8.2
from
BewareMyPower:bewaremypower/2.8-create-topics
Feb 16, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… is different with kafkaListeners
Demogorgon314
approved these changes
Feb 16, 2022
Member
Demogorgon314
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just left one question. PTAL.
kafka-impl/src/main/java/io/streamnative/pulsar/handlers/kop/KafkaRequestHandler.java
Show resolved
Hide resolved
BewareMyPower
pushed a commit
that referenced
this pull request
Feb 18, 2022
Related to this #1092 1. The current brokers metadata is maintained in the AdminManager, and obtaining the controllerId from here can ensure data consistency. 2. Avoid extra complex parsing listeners and handling exceptions. 3. The node ID is calculated from the hostname and port hash. If kop is not configured with ip or hostname, the program will automatically obtain the hostname. One of the problems is: when kop is running, if a new hostname address is added to the local domain name self-resolution, and as for the first position, it may cause the program to return a different host alias, the controller node id will inconsistent with the Broker cache in metadataStore. You can see the PR #648 I submitted a long time ago. 4. Reuse `testMetadataRequestForMultiListeners` test validation controller. 5. A random node from the broker cache is used as the controller. There is no controller concept in kop. It is the same whether it returns to the node itself or randomly selects a node.
BewareMyPower
pushed a commit
that referenced
this pull request
Feb 18, 2022
Related to this #1092 1. The current brokers metadata is maintained in the AdminManager, and obtaining the controllerId from here can ensure data consistency. 2. Avoid extra complex parsing listeners and handling exceptions. 3. The node ID is calculated from the hostname and port hash. If kop is not configured with ip or hostname, the program will automatically obtain the hostname. One of the problems is: when kop is running, if a new hostname address is added to the local domain name self-resolution, and as for the first position, it may cause the program to return a different host alias, the controller node id will inconsistent with the Broker cache in metadataStore. You can see the PR #648 I submitted a long time ago. 4. Reuse `testMetadataRequestForMultiListeners` test validation controller. 5. A random node from the broker cache is used as the controller. There is no controller concept in kop. It is the same whether it returns to the node itself or randomly selects a node. (cherry picked from commit 459c6cb)
BewareMyPower
pushed a commit
that referenced
this pull request
Feb 18, 2022
Related to this #1092 1. The current brokers metadata is maintained in the AdminManager, and obtaining the controllerId from here can ensure data consistency. 2. Avoid extra complex parsing listeners and handling exceptions. 3. The node ID is calculated from the hostname and port hash. If kop is not configured with ip or hostname, the program will automatically obtain the hostname. One of the problems is: when kop is running, if a new hostname address is added to the local domain name self-resolution, and as for the first position, it may cause the program to return a different host alias, the controller node id will inconsistent with the Broker cache in metadataStore. You can see the PR #648 I submitted a long time ago. 4. Reuse `testMetadataRequestForMultiListeners` test validation controller. 5. A random node from the broker cache is used as the controller. There is no controller concept in kop. It is the same whether it returns to the node itself or randomly selects a node. (cherry picked from commit 459c6cb)
michaeljmarshall
pushed a commit
to michaeljmarshall/kop
that referenced
this pull request
Dec 13, 2022
Related to this streamnative#1092 1. The current brokers metadata is maintained in the AdminManager, and obtaining the controllerId from here can ensure data consistency. 2. Avoid extra complex parsing listeners and handling exceptions. 3. The node ID is calculated from the hostname and port hash. If kop is not configured with ip or hostname, the program will automatically obtain the hostname. One of the problems is: when kop is running, if a new hostname address is added to the local domain name self-resolution, and as for the first position, it may cause the program to return a different host alias, the controller node id will inconsistent with the Broker cache in metadataStore. You can see the PR streamnative#648 I submitted a long time ago. 4. Reuse `testMetadataRequestForMultiListeners` test validation controller. 5. A random node from the broker cache is used as the controller. There is no controller concept in kop. It is the same whether it returns to the node itself or randomly selects a node. (cherry picked from commit 459c6cb)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a follow up bug fix of #1042 for branch-2.8.2. It also migrate some util methods and tests from #864.