-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][broker]A failed consumer/producer future in ServerCnx can never be removed #23123
[fix][broker]A failed consumer/producer future in ServerCnx can never be removed #23123
Conversation
@poorbarcode Please add the following content to your PR description and select a checkbox:
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/pulsarbot rerun-failure-checks |
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #23123 +/- ##
============================================
+ Coverage 73.57% 74.54% +0.96%
- Complexity 32624 34063 +1439
============================================
Files 1877 1919 +42
Lines 139502 144143 +4641
Branches 15299 15755 +456
============================================
+ Hits 102638 107446 +4808
+ Misses 28908 28485 -423
- Partials 7956 8212 +256
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… be removed (apache#23123) (cherry picked from commit 114880b) (cherry picked from commit 2d162ba)
… be removed (apache#23123) (cherry picked from commit 114880b) (cherry picked from commit 2d162ba)
Motivation
Conditions under which problems occur
Failover/Exclusive
subscriptionServerCnx
thread is busy.registering consumer 1st
registering consumer 2nd
ServerCnx
ServerCnx
is closedserverCnx.checkConnectionLiveness
, the Completable Future returned will never be completedClientCnx.removeConsumer
after the subscribing is timeoutServerCnx.consumers
[1]:
AbstractDispatcherSingleActiveConsumer.java
Affects
It leads to the following subscribing can never succeed due to the ServerCnx maintaining a failed future and it can never be removed.
Error logs
Modifications
Fix the bug.
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x