Skip to content

[fix][client] Remove consumer when close consumer command is received#15761

Merged
mattisonchao merged 3 commits into
apache:masterfrom
nodece:close-consumer
Jun 13, 2022
Merged

[fix][client] Remove consumer when close consumer command is received#15761
mattisonchao merged 3 commits into
apache:masterfrom
nodece:close-consumer

Conversation

@nodece

@nodece nodece commented May 24, 2022

Copy link
Copy Markdown
Member

Signed-off-by: Zixuan Liu nodeces@gmail.com

Motivation

When the close consumer command is received, we just disconnected and didn't remove the cache, which will cause us to receive repeated messages.

This case happened in org.apache.pulsar.broker.service.SubscriptionSeekTest#testSeekByFunctionAndMultiTopic test of #15568.

Modifications

  • Use remove() instead of get()

Documentation

  • no-need-doc

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label May 24, 2022
@nodece

nodece commented May 25, 2022

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@RobertIndie

Copy link
Copy Markdown
Member

Do you mean that testSeekByFunctionAndMultiTopic is a flaky test?

@nodece

nodece commented May 25, 2022

Copy link
Copy Markdown
Member Author

@RobertIndie It should be stable, maybe I add the message inclusive feature breaks this, but I cannot find the root cause.

I tried this code to test the org.apache.pulsar.broker.service.SubscriptionSeekTest#testSeekByFunctionAndMultiTopic of #15568, it is passed.

If you are interested in this, we can find the root cause together.

@nodece nodece closed this May 26, 2022
@nodece nodece reopened this May 26, 2022
@nodece

nodece commented May 27, 2022

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@gaoran10 gaoran10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the producer has the same problem. We can fix it in another PR.

@nodece

nodece commented May 31, 2022

Copy link
Copy Markdown
Member Author

It seems that the producer has the same problem. We can fix it in another PR.

Yes, I can make a PR to fix the HandleCloseProducer.

nodece added 2 commits June 6, 2022 10:49
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@nodece

nodece commented Jun 10, 2022

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@nodece nodece closed this Jun 10, 2022
@nodece nodece reopened this Jun 10, 2022
@nodece nodece requested review from codelipenghui and gaoran10 June 10, 2022 09:46
Comment thread pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java Outdated
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@mattisonchao mattisonchao merged commit 5246c8e into apache:master Jun 13, 2022
@mattisonchao mattisonchao added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Jun 13, 2022
mattisonchao added a commit that referenced this pull request Jun 13, 2022
codelipenghui pushed a commit that referenced this pull request Jun 28, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jul 4, 2022
BewareMyPower pushed a commit that referenced this pull request Jul 27, 2022
@BewareMyPower BewareMyPower added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants