Apparent race condition (JDK driver 2.1.2) - CountDownLatch.await() vs. ReentrantLock.unlock()

Hello,

Whilst using the above driver with the Java concurrency package, i.e. in a multi-threaded manner using an ExecutorService, a race condition seems to occur. The full stack trace of one thread being…

com.couchbase.client.java.CouchbaseBucket.get()
com.couchbase.client.java.CouchbaseBucket.get()
com.couchbase.client.java.CouchbaseAsyncBucket.get()
com.couchbase.client.java.CouchbaseAsyncBucket.get()
com.couchbase.client.core.CouchbaseCore.send()
com.couchbase.client.deps.com.lmax.disruptor.RingBuffer.tryPublishEvent()
com.couchbase.client.deps.com.lmax.disruptor.RingBuffer.translateAndPublish()
com.couchbase.client.deps.com.lmax.disruptor.publish()
com.couchbase.client.deps.com.lmax.disruptor.BlockingWaitStrategy.signalAllWhenBlocking()
java.util.concurrent.locks.ReentrantLock.unlock()

…the stack trace for the other thread is…

com.couchbase.client.java.CouchbaseBucket.get()
com.couchbase.client.java.CouchbaseBucket.get()
com.couchbase.client.java.util.Blocking.blockForSingle()
java.util.concurrent.CountDownLatch.await()

Please excuse any errors as am transcribing this from a screen shot sent in from our stress testing team. I have so far been unable to replicate the condition.

Thanks,

Matthew

@daschl can you help here, please?

do you have any more context? did you mean a deadlock instead of a race condition?
do you get any Exception?

on a side note, 2.1.4 should be out today.