Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

[BUG] Unbale to find OwnedBundle for topic error unable to recover automatically #647

@wenbingshen

Description

@wenbingshen

Describe the bug
broker.conf:
`messagingProtocols=kafka
protocolHandlerDirectory=./protocols
allowAutoTopicCreationType=partitioned

kafkaListeners=PLAINTEXT://:9996
brokerEntryMetadataInterceptors=org.apache.pulsar.common.intercept.AppendIndexMetadataInterceptor
brokerDeleteInactiveTopicsEnabled=false`

we can see znode value for /loadbalance/brokers/10.xx.xx.58:8089:
"protocols": {
"kafka": "PLAINTEXT://:9996"
}

When kop findBroker(topic), it will get the pulsar node metadata. The protocol about kafka is the information of the above znode. When constructing the Endpoint, the current local hostname will be used to construct the node. If the current node is not the topic's onwer broker, the partition leader in TopicMetadata obtained by the client is always the wrong leader node.

image

The current leader node of persistent://public/default/test_v1_01-partition-0 is 57 node, but when PartitionMeata is constructed it is 58 node.

To Reproduce
Steps to reproduce the behavior:

  1. Configuration in broker.conf: kafkaListeners=PLAINTEXT://:9996
  2. Start multiple pulsar brokers
  3. The kafka client uses a different broker address to access kop
  4. See error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions