Search code examples
javamultithreadingdeadlockcouchbase

Is couchbase java SDK really thread safe?


Today I was facing some issues with the java SDK 2.1.1 targeting my couchbase server. The client is doing a lot of reads on couchbase. At one point, one thread gets locked (I can see one CPU core at 100%) and is never released. I am doing synchronous calls. It is only get calls. How come does it create a deadlock ?

Any input appreciated.

Thanks a lot

Romain


Solution

  • It was actually not a deadlock. The view I am querying is returning too many results. As a consequence, it leads to a timeout. I find it still pretty strange that the thread is not released ...

    Anyway, I will go for async calls. Maybe it will help ! It seems to support timeout handling.