-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
maxConnectionPoolSize
verification (#1216)
* Fix `maxConnectionPoolSize` verification Under high load of sessions, the connection pool is allowing new connections to be created. This is happening because, while the development of `AuthTokenManager` and `connection liveness check`, the methods do validate connection on acquired and return to the pool need to be async. This changes creates a situation of racing condition which doesn't exist the original code and this introduces this bug. Increasing the resouce acquired count before validating the connection solves the issue, since the race condition is removed. However, the pool needs also to release the resource when the validation return `false` or fails for some reason. This is important to avoid broken connection still be count for the max pool size. Co-Authored-By: Max Gustafsson <max.gustafsson@neo4j.com> * Adjusting test for be more resilient The test were to tight and any slowness might cause the test to fail. Increase the time waiting for the connection get release to pool reduces the likehood of this problem happens. --------- Co-authored-by: Max Gustafsson <max.gustafsson@neo4j.com>
- Loading branch information
Showing
3 changed files
with
164 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters