Fork me on GitHub
#sql
<
2024-07-10
>
seancorfield04:07:10

For any MySQL users: The 9.0.0 connector-j is available now that rewrites all the synchronized stuff to use ReentrantLock so that the driver is compatible with virtual threads.

dharrigan05:07:32

I think I'll have to wait until HikariCP supports virtual threads:

seancorfield15:07:29

My reading of that (long) thread is that Hikari doesn't use synchronized on any critical path so it "doesn't matter". What is a real issue is vthread code overwhelming the connection pool and getting timeouts - which is already a problem with native thread code, but perhaps more likely with vthread code.

seancorfield15:07:56

No one provided a repro case of pinning within Hikari...

dharrigan15:07:23

Interesting. There are other discussions in the issues tab that talk about it. However, worth a shot I think! I'm happy for the connector change too! 🙂

seancorfield15:07:34

Databases have a limit on concurrent connections so you can't have unlimited pool sizes anyway - so there has to be some throttling somewhere.

seancorfield04:07:00

(we've already updated at work and we're starting to use vthreads -- finally! -- and we're not seeing any pinned o/s threads so... yay!)

🎉 7