[JAVA-5189] Use Lock.lockInterruptibly only where it may actually be needed Created: 05/Oct/23  Updated: 28/Oct/23  Resolved: 06/Oct/23

Status: Closed
Project: Java Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 4.11.0

Type: Bug Priority: Unknown
Reporter: Ross Lawley Assignee: Valentin Kavalenka
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by JAVA-5140 Replace uninterruptible Lock.lock wit... Closed
Epic Link: Virtual Threads Support
Quarter: FY24Q3
Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

Tests failing on evergreen - indicating that the pool is still in use.



 Comments   
Comment by Githook User [ 06/Oct/23 ]

Author:

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

Message: Use `Lock.lockInterruptibly` only where it may actually be needed (#1220)

JAVA-5189
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/e1b4b9005e48ba7d647d121db9619ab0a423eeee

Comment by Valentin Kavalenka [ 05/Oct/23 ]

we can mindlessly replace all the calls with Lock.lockInterruptibly and never use Lock.lock again

That sentence I wrote in JAVA-5140 proved to be mindless itself: making the code that releases resources interruptible is not necessary a good idea, as it may lead to resource leaks and/or invariant violations.

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