Bug #109346 | Add support for Virtual Threads on the JDK | ||
---|---|---|---|
Submitted: | 12 Dec 2022 17:10 | Modified: | 12 Mar 12:14 |
Reporter: | Bart De Neuter (OCA) | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / J | Severity: | S4 (Feature request) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[12 Dec 2022 17:10]
Bart De Neuter
[13 Dec 2022 6:20]
MySQL Verification Team
Hello Bart De Neuter, Thank you for the feature request. regards, Umesh
[20 Dec 2022 7:50]
Bart De Neuter
I have created a PR to replace synchronized blocks by a ReentrantLock. Please feel free to accept or decline the PR. https://github.com/mysql/mysql-connector-j/pull/91 Kind regards, Bart
[18 Jan 2023 11:56]
Bart De Neuter
Hi, we are performing more tests with this patch and I noticed that the connectionMutex in ConnectionImpl can be used in other places then this class. ConnectionImpl has a `synchronized(connectionMutex)` but the implementations of this proxy have also synchronized methods. So by using only a ReentrantLock in the ConnectionImpl class, we alter the locking behaviour of the Driver. We are fixing this in our patch for testing. We didn't notice any errors with this patch and the tests passed. But it is safer to ignore this patch. We can always resubmit our current complete patch if needed or we can wait until Virtual Threads supports synchronized and don't alter the code.
[9 Nov 2023 12:30]
Paul Carter-Brown
Is there any update or plan to prevent pinning in the MySQL driver. This is a barrier to virtual threads adoption and seems to have been solved on Postgres. I see there was a PR for this mentioned on github but not merged. Thanks
[9 Nov 2023 16:07]
Bart De Neuter
This was a first PR when we started testing the MySQL driver with the JDK 19 release. Afterwards we have created another PR that makes this PR obsolete. You will find the new PR here: https://bugs.mysql.com/bug.php?id=110512
[12 Mar 12:14]
Filipe Silva
Superseded by Bug#110512.