-
Notifications
You must be signed in to change notification settings - Fork 7
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
Addresses github issue #9896 #13
base: master
Are you sure you want to change the base?
Conversation
- Include 'cloud' part of the placement as well in 'topology-keys' property value - Exception handling improvements while getting a balanced connection when refreshing 'server list'. - Add 'debug' parameter to examples. - Add more debug level logs to help troubleshooting.
// Since it is just a demo app. Using some smaller values so that it can run | ||
// on laptop | ||
String numConnections = "6"; | ||
String controlHost = "127.0.0.1"; | ||
String controlPort = "5433"; | ||
|
||
controlUrl = "jdbc:postgresql://" + controlHost | ||
+ ":" + controlPort + "/yugabyte?user=yugabyte&password=yugabyte&load-balance=true&topology-keys=region1.zone1"; | ||
|
||
+ ":" + controlPort + "/yugabyte?user=yugabyte&password=yugabyte&load-balance=true&topology-keys=cloud1.region1.zone1"; |
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.
This assignment to controlUrl can be enclosed in else block of the if block below.
@@ -15,20 +15,27 @@ | |||
protected static String controlUrl = ""; | |||
protected static HikariDataSource hikariDataSource; | |||
protected static Scanner scanner = new Scanner(System.in); | |||
protected static List<Connection> borrowConnections = new ArrayList<>(); | |||
protected static List<Connection> connectionsCreatedFroamApi = new ArrayList<>(); |
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.
Seems to be a typo: connectionsCreatedFroamApi -> connectionsCreatedFromApi
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.
Looks good.
|
||
+ ":" + controlPort + "/yugabyte?user=yugabyte&password=yugabyte&load-balance=true&topology-keys=cloud1.region1.zone1"; | ||
if (debugLogging) { | ||
controlUrl = "jdbc:postgresql://" + controlHost |
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.
nit: controlUrl = controlUrl + "&loggerLevel=debug";
Same in UniformLoadBalanceExample.java
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
property value
All Submissions:
New Feature Submissions:
Changes to Existing Features:
The value of property 'topology-keys' has to contain 'cloud' part also. App using previous version of the driver will have to change in how they specify topology-key value. Previously it was topology-keys=region1.zone1,region1.zone2 etc and now it is topology-keys=cloud1.region1.zone1,cloud1.region1.zone2