diff --git a/pgjdbc/src/main/java/com/yugabyte/ysql/LoadBalanceService.java b/pgjdbc/src/main/java/com/yugabyte/ysql/LoadBalanceService.java index 56e6f7c388..7fb3f3a7ef 100644 --- a/pgjdbc/src/main/java/com/yugabyte/ysql/LoadBalanceService.java +++ b/pgjdbc/src/main/java/com/yugabyte/ysql/LoadBalanceService.java @@ -248,7 +248,7 @@ public static Connection getConnection(String url, Properties properties, LoadBalanceProperties lbProperties, ArrayList timedOutHosts) { // Cleanup extra properties used for load balancing? if (lbProperties.isLoadBalanceEnabled()) { - Connection conn = getConnection(lbProperties, properties, user, database, timedOutHosts); + Connection conn = getConnection(lbProperties, properties, timedOutHosts); if (conn != null) { return conn; } @@ -316,8 +316,6 @@ private static Connection getConnection(LoadBalanceProperties loadBalancePropert /** * @param loadBalanceProperties * @param lb LoadBalancer instance - * @param user - * @param dbName * @return true if the refresh was not required or if it was successful. */ private static synchronized boolean checkAndRefresh(LoadBalanceProperties loadBalanceProperties, @@ -334,7 +332,7 @@ private static synchronized boolean checkAndRefresh(LoadBalanceProperties loadBa boolean refreshFailed = false; try { if (controlConnection == null || controlConnection.isClosed()) { - controlConnection = new PgConnection(hspec, user, dbName, properties, url); + controlConnection = new PgConnection(hspec, properties, url); } try { refresh(controlConnection, lb.getRefreshListSeconds());