sql

seancorfield 2024-07-10T04:42:10.512579Z

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.

seancorfield 2024-07-10T15:14:29.472609Z

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.

seancorfield 2024-07-10T15:15:56.356809Z

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

dharrigan 2024-07-10T15:16:23.902229Z

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! 🙂

seancorfield 2024-07-10T15:17:34.514979Z

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

dharrigan 2024-07-10T05:59:32.421869Z

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

seancorfield 2024-07-10T04:43:00.719179Z

(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