yugabyte / jdbc-yugabytedb

JDBC Driver for Yugabyte SQL (YSQL)
BSD 2-Clause "Simplified" License
17 stars 7 forks source link

Fix for github issue: https://github.com/yugabyte/yugabyte-db/issues/9764 #12

Closed kneeraj closed 3 years ago

kneeraj commented 3 years ago

Not relying on random function to select least loaded server by concurrent threads. Instead putting a small synch block to just quickly determine the least, optimistically increment the connection counter assuming connection will be successful. However if connection fails then decrementing the reference count or removing it from the internal 'host->conn' map

All Submissions:

New Feature Submissions:

  1. [✅] Does your submission pass tests?
  2. [ ] Does mvn checkstyle:check pass ?
  3. [ ] Have you added your new test classes to an existing test suite? - Tested with existing yb_sample_apps Sqlnserts workload

Changes to Existing Features: