The driver claims to be "fully non-blocking" if only asynchronous execution is used, but when BlockHound is enabled, a few blocking calls are detected:
com.datastax.oss.driver.internal.core.time.Clock#getInstance when JNI is activated
com.datastax.oss.driver.internal.core.context.DefaultNettyOption: constructor and onClose method, because of HashedWheelTimer, see https://github.com/netty/netty/pull/10810.
com.datastax.oss.driver.api.core.uuid.Uuids#random, this will be solved by JAVA-2449.
Also, BlockHound considers ReentrantLock.lock() as a blocking call, and several driver components are affected.
We should clarify what calls are really dangerous for non-blocking applications:
Add a page to the manual to clarify how to use BlockHound and what API methods are safe to use;
Add some BlockHound exceptions to methods that should always be allowed to block momentarily:
Session Initialization participants should be allowed to block
Calls to ReentrantLock.lock should be allowed where absolutely required for the driver to work properly, and expected lock contention is low (i.e. the thread won't be blocked indefinitely).
The driver claims to be "fully non-blocking" if only asynchronous execution is used, but when BlockHound is enabled, a few blocking calls are detected:
com.datastax.oss.driver.internal.core.time.Clock#getInstance
when JNI is activatedcom.datastax.oss.driver.internal.core.context.DefaultNettyOption
: constructor andonClose
method, because ofHashedWheelTimer
, see https://github.com/netty/netty/pull/10810.com.datastax.oss.driver.api.core.uuid.Uuids#random
, this will be solved by JAVA-2449.Also, BlockHound considers
ReentrantLock.lock()
as a blocking call, and several driver components are affected.We should clarify what calls are really dangerous for non-blocking applications:
Add a page to the manual to clarify how to use BlockHound and what API methods are safe to use;
Add some BlockHound exceptions to methods that should always be allowed to block momentarily:
Session Initialization participants should be allowed to block
Calls to
ReentrantLock.lock
should be allowed where absolutely required for the driver to work properly, and expected lock contention is low (i.e. the thread won't be blocked indefinitely).