[JAVA-4451] Fix the await condition in OpenConcurrencyLimiter.acquirePermitOrGetAvailableOpenedConnection Created: 25/Jan/22  Updated: 28/Oct/23  Resolved: 26/Jan/22

Status: Closed
Project: Java Driver
Component/s: Connection Management
Affects Version/s: None
Fix Version/s: 4.5.0

Type: Bug Priority: Minor - P4
Reporter: Valentin Kavalenka Assignee: Valentin Kavalenka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by JAVA-4452 Improve performance characteristics o... Closed
Problem/Incident
is caused by JAVA-3927 Rate limit new connection creations (... Closed
Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed

 Description   

Acquiring locks unfairly in DefaultConnectionPool.OpenConcurrencyLimiter.releasePermit revealed a bug in OpenConcurrencyLimiter.acquirePermitOrGetAvailableOpenedConnection, which manifested itself by failing the pool-checkout-minPoolSize-connection-maxConnecting.json test.



 Comments   
Comment by Githook User [ 26/Jan/22 ]

Author:

{'name': 'Valentin Kovalenko', 'email': 'valentin.kovalenko@mongodb.com', 'username': 'stIncMale'}

Message: Change the `while(complexCondition)

{ await }

style in `ConcurrentPool`

The change is similar to one done in
https://jira.mongodb.org/browse/JAVA-4451,
but this one is done for stylistic reasons only.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/464bcc8bf2b07c6c00d48ed865dafbddde8160de

Comment by Githook User [ 26/Jan/22 ]

Author:

{'name': 'Valentin Kovalenko', 'email': 'valentin.male.kovalenko@gmail.com', 'username': 'stIncMale'}

Message: Fix the `await` condition in `OpenConcurrencyLimiter.acquirePermitOrGetAvailableOpenedConnection` (#858)

JAVA-4451
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/8ecee9af378cb20c5d042fc78d0dc3c447053987

Generated at Thu Feb 08 09:02:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.