AHeise commented on a change in pull request #17119:
URL: https://github.com/apache/flink/pull/17119#discussion_r703525392
##########
File path:
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/source/enumerator/PulsarSourceEnumerator.java
##########
@@ -175,11 +175,11 @@ public void close() {
private void seekStartPosition(Set<TopicPartition> partitions) {
ConsumerBuilder<byte[]> consumerBuilder =
createConsumerBuilder(pulsarClient, Schema.BYTES,
configuration);
- Set<String> seekedPartitions = new HashSet<>();
+ Set<String> seekedTopics = new HashSet<>();
for (TopicPartition partition : partitions) {
String topicName = partition.getFullTopicName();
- if (seekedPartitions.add(topicName)) {
+ if (!assignmentState.containsTopic(topicName) &&
seekedTopics.add(topicName)) {
Review comment:
We could avoid this check by using only hooking into `assign` which only
gets the added partitions. Did you try that out? (It might not work out, but it
feels the better place).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]