-
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][client] add physicalAddress as part of connection pool key #22196
Conversation
@heesung-sn Please add the following content to your PR description and select a checkbox:
|
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java
Outdated
Show resolved
Hide resolved
…ectionPool.java Co-authored-by: Dragos Misca <[email protected]>
…ectionPool.java Co-authored-by: Dragos Misca <[email protected]>
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.
The Key
looks good now. One more refactoring suggestion.
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java
Outdated
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
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java
Outdated
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java
Outdated
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.
Good work @heesung-sn
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22196 +/- ##
============================================
- Coverage 73.57% 73.55% -0.02%
- Complexity 32624 32653 +29
============================================
Files 1877 1878 +1
Lines 139502 139634 +132
Branches 15299 15328 +29
============================================
+ Hits 102638 102711 +73
- Misses 28908 28929 +21
- Partials 7956 7994 +38
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Motivation
Context: https://github.com/apache/pulsar/pull/22085/files#r1497008116
Currently, the connection pool key does not include physicalAddress (currently logicalAddress + keySuffix). This can be a problem when the same logicalAddresses are in the migrated(green) cluster. (the connection pool will return the connection to the old(blue) cluster)
Modifications
Add physicalAddress as part of the connection pool key
Verifying this change
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: