Disable couchbase transactions

How do I disable transaction management with the latest couchbase Java SDK

Hi @himanshu.mps
If you don’t perform any transactions with that SDK, then everything related to transactions is effectively not doing anything. There are a couple of threads related to the background asynchronous cleanup, but they will have no work to do.
What is the context to the question - are you looking to not have those no-op threads started at all?

Hi @graham.pople

We are seeing some latency (total around 3 sec) while connecting to cluster and opening the bucket. I am trying to reduce the latency by not starting anything which is not needed. I do see a lot of NODE NOT AVAILABLE error in debug mode along with transaction logs.

Hi @himanshu.mps
Ok well it shouldn’t be having any impact on that since it’s just creating a couple of no-op threads, but if you like you can disable them with the docs here Cleanup | Couchbase Docs - just set cleanupClientAttempts and cleanupLostAttempts to false.

(For anyone else coming across this post: please don’t make this config change without good reason! These cleanup threads are essential to normal transactions operation, and per above, they will be doing nothing anyway if transactions are not
running.)

If you post the debug logs to a Github gist or similar, we can aim to take a quick look and see if we can spot what’s causing that slowness.

What is the approximate network latency between your application and the cluster? That’s usually the culprit in these situations.

Hi @graham.pople

I will replace the domain and publish the debug logs to get some help.

N.b. log redaction should be able to do that for you. (Though a search-and-replace is probably just as easy tbh, if it’s only the domain to be obfuscated)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.