Open lazystone opened 3 months ago
Hi @lazystone
Thanks for reaching out and raising this issue with us.
We've updated our documentation to reflect this.
We'll also be reviewing our usage of synchronized
and concurrent classes that use synchronized
, but cannot comment on any timelines.
Thank you!
I've found 11 instances of synchronized
in the code that interfere with virtual threads. Can these be replaced soon?
Hi @rmichela Thanks for reaching out. We are currently working on the drivers compatibility with virtual threads. We'll keep you updated when the change is available. Thank you!
Hi, @lazystone @rmichela
The issue has been fixed and we see no thread pinning. A fix is available in a snapshot build. Could you kindly checkout our snapshot build and let us know if the issue still persists?
Thank you!
Describe the issue
Please explain your compatibility with virtual threads explicitly.
Original postgresql jdbc driver did a great job by replacing all "synchronized" by ReentrantLock(see v42.6.0 release notes), but in this wrapper there are a lot of "synchronized" places in the code.
Using "synchronized" causes thread pinning and can cause a dead-lock on Virtual Threads.
Links
https://github.com/pgjdbc/pgjdbc/releases/tag/REL42.6.0