Question about using virtual thread
Michael McMahon
michael.a.mcmahon at oracle.com
Thu Jun 29 21:41:29 UTC 2023
I really appreciate your effort on this project. It will be a great resource for Java programmers, regardless of which database they want to use.
Personally, I’m very happy to see the Oracle Database driver has held up to independent verification. We did a lot of testing on our end, but we don’t always think of everything.
Thank you!
— Michael
On Jun 29, 2023, at 1:29 PM, Attila Kelemen <attila.kelemen85 at gmail.com> wrote:
I have installed Oracle the "normal" way, and spent like a day on configuring it to my liking :)
Anyway, now with Oracle added, I think most relevant DBs are there.
Also, I have confirmed what you wrote by benchmarking "com.oracle.database.jdbc:ojdbc8:19.19.0.0" against "com.oracle.database.jdbc:ojdbc11:21.9.0.0", and as expected the new version is considerably faster.
Attila
Michael McMahon <michael.a.mcmahon at oracle.com<mailto:michael.a.mcmahon at oracle.com>> ezt írta (időpont: 2023. jún. 27., K, 23:23):
Hi Attila,
For Oracle JDBC, I replaced almost all usages of “synchronized” with a ReentrantLock. This change first appears in version 21.1. The driver is distributed on Maven Central:
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<version>21.9.0.0</version>
</dependency>
To detect thread pinning, you might try:
-Djdk.tracePinnedThreads=full
This system property is documented in JEP 444:
The system property jdk.tracePinnedThreads triggers a stack trace when a thread blocks while pinned. Running with -Djdk.tracePinnedThreads=full prints a complete stack trace when a thread blocks while pinned, highlighting native frames and frames holding monitors. Running with -Djdk.tracePinnedThreads=short limits the output to just the problematic frames.
https://openjdk.org/jeps/444#Executing-virtual-threads
Hope this helps.
Thanks,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230629/acfb63c4/attachment.htm>
More information about the loom-dev
mailing list