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 2024/04/01 04:24:00 UTC
[jira] [Updated] (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:all-tabpanel ]
Yubiao Feng updated FLINK-34962:
--------------------------------
Description:
- 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.
was:
- The unnecessary codes calls `pulsarClient.getLookup().getPartitionedTopicMetadata()` to create the partitioned topic metadata(in fact, this behavior of is not correct, explained [here](https://github.com/streamnative/eng-support-tickets/issues/1001#issuecomment-1969473868))
- 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.
> 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
> Affects Versions: pulsar-4.2.0, pulsar-4.1.1
> 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
>
> - 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)