-
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
[improve] [broker] Let the producer request success at the first time if the previous one is inactive #21220
[improve] [broker] Let the producer request success at the first time if the previous one is inactive #21220
Conversation
The pr had no activity for 30 days, mark with Stale label. |
… if the previous is inactive
3709b39
to
8710eb5
Compare
"Producer with name '" + newProducer.getProducerName() | ||
+ "' is already connected to topic")); | ||
} else { | ||
return internalAddProducer(newProducer); |
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.
It's better to add a comment here to explain why we should take a recursive call.
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.
And it also should be BUG before, right?
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.
It's better to add a comment here to explain why we should take a recursive call.
Done
And it also should be BUG before, right?
Yes, the issue is that the producer creation will fail if a same-name producer has already closed on the client side.
Codecov Report
@@ Coverage Diff @@
## master #21220 +/- ##
=============================================
+ Coverage 36.74% 73.23% +36.48%
- Complexity 375 32607 +32232
=============================================
Files 1713 1890 +177
Lines 130808 140428 +9620
Branches 14256 15434 +1178
=============================================
+ Hits 48068 102841 +54773
+ Misses 76375 29498 -46877
- Partials 6365 8089 +1724
Flags with carried forward coverage won't be shown. Click here to find out more.
|
… if the previous one is inactive (apache#21220) ### Motivation If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. ### Modifications Make the initial request made on the new connection success.
… if the previous one is inactive (#21220) ### Motivation If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. ### Modifications Make the initial request made on the new connection success.
There are conflicts when cherry pick this patch to branch-3.1, would you please help do it @poorbarcode |
… if the previous one is inactive (#21220) If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. Make the initial request made on the new connection success. (cherry picked from commit 711b621)
Done |
… if the previous one is inactive (#21220) If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. Make the initial request made on the new connection success. (cherry picked from commit 40f94d5)
… if the previous one is inactive (#21220) If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. Make the initial request made on the new connection success. (cherry picked from commit 40f94d5)
… if the previous one is inactive (#21220) ### Motivation If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. ### Modifications Make the initial request made on the new connection success. (cherry picked from commit 40f94d5)
… if the previous one is inactive (apache#21220) If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. Make the initial request made on the new connection success. (cherry picked from commit 40f94d5)
…rst time if the previous one is inactive (apache#21220)" This reverts commit 918e746.
… if the previous one is inactive (apache#21220) If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. Make the initial request made on the new connection success. (cherry picked from commit 40f94d5)
… if the previous one is inactive (apache#21220) If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. Make the initial request made on the new connection success. (cherry picked from commit 711b621)
… if the previous one is inactive (apache#21220) If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation. Make the initial request made on the new connection success. (cherry picked from commit 711b621)
Motivation
See #21155 (comment)
If a producer establishes a new connection when it is reconnecting, while the previous connection is now inactive, the initial request made on the new connection will fail. This failure will trigger the topic of cleaning up the inactive producers. However, upon making a second request, the producer will be able to successfully establish a connection and proceed with the operation.
Modifications
Make the initial request made on the new connection success.
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x