You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yubiao Feng (Jira)" <ji...@apache.org> on 2025/03/11 04:28:00 UTC

[jira] [Commented] (FLINK-34962) flink-connector-pulsa starts failed due to incorrect use of Pulsar API: LookupService. getPartitionedTopicMetadata

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

Yubiao Feng commented on FLINK-34962:
-------------------------------------

[~syhily] [~tison] 

 

They are not the same issue
 * the link you related [https://github.com/apache/flink-connector-pulsar/commit/7340f713422b1734e84ec0602f154441b8da7fab] added a retry for the calling `getPartitionsForTopic`
 * The current one is for the partitioned topic creation

> flink-connector-pulsa starts failed due to incorrect use of Pulsar API: LookupService. getPartitionedTopicMetadata
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-34962
>                 URL: https://issues.apache.org/jira/browse/FLINK-34962
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / Pulsar
>         Environment: * flink 1.17
>  * pulsar client 3.0.0
>  * org.apache.flink:flink-connector-pulsar:4.1.0-1.17 (connector)
>            Reporter: Yubiao Feng
>            Priority: Major
>              Labels: easyfix, pull-request-available
>             Fix For: pulsar-4.2.0
>
>
> - The unnecessary codes calls `pulsarClient.getLookup().getPartitionedTopicMetadata()` to create the partitioned topic metadata(in fact, this behavior of is not correct)
>   - Why it is unnecessary: the [following code]([https://github.com/apache/flink-connector-pulsar/blob/main/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/sink/writer/topic/ProducerRegister.java#L245]) that is creating a producer will also trigger partitioned topic metadata to create.
>  - The method `pulsarClient.getLookup().getPartitionedTopicMetadata()` will not retry if the connection is closed so that users will get an error. The following code creates a producer that will retry if the connection is closed, reducing the probability of an error occurring.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)