Hi, I’ve integrated Couchbase Transactions with my Spring Boot application.
Since I haven’t configured the property explicitly, both client and couchbase server, the durability level of Transactions is majority, the default level defined in TransactionConfigBuilder
class.
Replica is 1 in the settings of the bucket to which the application connected and there are 3 nodes in cluster.
So the number of nodes required for majority is 2.
But when one node in cluster failed, the error as below occurred whenever the client tried to make use of Transactions.
com.couchbase.transactions.error.TransactionFailed: Transaction has failed with cause 'com.couchbase.client.core.error.DurabilityImpossibleException: With the current cluster configuration, the requested durability guarantees are impossible {"clientContext":{"txn.op":"atrPending"},"completed":true,"coreId":"0xe97068c100000001","idempotent":false,"lastChannelId":"E97068C100000001/00000000A1237106","requestId":21518,"requestType":"SubdocMutateRequest","retried":0,"service":{"bucket":"testdata","collection":"_default","documentId":"_txn:atr-933-#6a8","opaque":"0x5451","scope":"_default","syncDurability":"MAJORITY","type":"kv"},"status":"DURABILITY_IMPOSSIBLE","timeoutMs":20000,"timings":{"dispatchMicros":1174,"encodingMicros":136,"totalMicros":3970}}'
Just only one node was down and two other nodes still worked well.
It’s hard to understand for me why the durability cannot be guaranteed.
Is there anything I missed or should be checked?
Thanks in advance.