-
Notifications
You must be signed in to change notification settings - Fork 8
Fix for wrong connection count on remote nodes #37
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
Conversation
.../com/yugabyte/oss/driver/internal/core/loadbalancing/YugabyteDefaultLoadBalancingPolicy.java
Outdated
Show resolved
Hide resolved
|
Also, please run the formatting command and commit the changes |
kneeraj
left a comment
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.
Should get a clean run of nosqlbench with correct routing behaviour before merging.
|
@HarshDaryani896 Let's get this PR cleaned of all the debugging logs and merge it, if we have successfully completed all the testing. |
ashetkar
left a comment
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.
Also, please add a log at debug/info 1) when metadata is refreshed and 2) when leader is not found for a particular tablet.
.../src/main/java/com/yugabyte/oss/driver/internal/core/loadbalancing/PartitionAwarePolicy.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/yugabyte/oss/driver/internal/core/loadbalancing/PartitionAwarePolicy.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/yugabyte/oss/driver/internal/core/loadbalancing/PartitionAwarePolicy.java
Outdated
Show resolved
Hide resolved
kneeraj
left a comment
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
Description
Issue:Even after settingCONNECTION_POOL_REMOTE_SIZEto zero, connections were getting created to remote nodes. Number of connections on REMOTE nodes were equal to Number of connections on LOCAL nodes.On some investigation we found out that the private localDc variable of
YugabyteDefaultLoadBalancingPolicyclass [child class] was hiding the localDc variable of theBasicLoadBalancingPolicyclass [parent class], due to which the driver was not properly identifying Local AND Remote nodes. It was considering all Up nodes as Local.Fix
Removed the private localDc from
YugabyteDefaultLoadBalancingPolicyand made the localDc variable inBasicLoadBalancingPolicyprotected.Also did this change for another private member variable of
YugabyteDefaultLoadBalancingPolicyclass:distanceReporterNote
This PR also includes some formatting changes in PartitionAwarePolicy.java
Testing
TestDMLRoutingLocality(these occur with 4.15.0-yb-1 also).