Java thread that upserts document in Couchbase is stuck in Waiting state indefinitely

85 Views Asked by At

Spring Boot Version: 2.3.1.RELEASE Spring Data Couchbase: 4.3.5 Couchbase Java Client: 3.2.7 My spring boot application is getting stuck after inserting a document in Couchbase. (I can see document was inserted successfully)

` final CatalogLock entity = lockRepository.save(lock);
        return entity.getId();

public interface CatalogLockRepository extends CouchbaseRepository<CatalogLock, String>`

"main" #1 prio=5 os_prio=0 tid=0x0000000003614800 nid=0x5f14 waiting on condition [0x000000000360b000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x0000000709cf3808> (a java.util.concurrent.CountDownLatch$Sync) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836) at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997) at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304) at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231) at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:87) at reactor.core.publisher.Mono.block(Mono.java:1679) at org.springframework.data.couchbase.core.ExecutableUpsertByIdOperationSupport$ExecutableUpsertByIdSupport.one(ExecutableUpsertByIdOperationSupport.java:75)

There seems to be a similar issue raised in Couchbase forum https://forums.couchbase.com/t/java-thread-that-queries-couchbase-stuck-in-waiting-state/24144 but with no response

Tried different versions of Couchbase java client and spring data couchbase, reactore-core. Nothing helped

1

There are 1 best solutions below

0
mn_test347 On

This is a known issue that is fixed in Spring Boot 2.6.6.