Durability setting for Spring data Couchbase

Hello Team,

What is the default setting for durability in Spring Data Couchbase ?

If consistency is defined as Strong, does it has any impact on Durability ?

What is the best way to define durability if we are using - ReactiveCouchbaseSortingRepository -> save() method ?

Thanks,
Suyash

Hi,

Default durability is NONE (it only persists in the server in responsible for the vBucket) but it is mostly used on transactions. https://docs.couchbase.com/server/current/learn/data/durability.html#:~:text=Couchbase%20Server%20supports%20durability%20for%20up%20to%20two%20replicas%3A%20it,to%20a%20bucket%2C%20or%20both.

Saves/Updates/Deletes are strongly consistent by default on Couchbase. But if you need to query the object saved right after, then you need to set your Scan Consistency to REQUEST_PLUS. By default the scan consistency is NOT_BOUNDED.

On spring data couchbase 4 you can use the annotation ScanConsistency(query = QueryScanConsistency.REQUEST_PLUS) , and I think that we might have a config somewhere to set REQUEST_PLUS as the default

Hi,
How do I set QueryScanConsistency.REQUEST_PLUS as the default? I can’t find any config.

I’m looking for the very same information !

My tests randomly fail because of the default scan consistency.

Provided with

Override this method in your configuration class:

	public QueryScanConsistency getDefaultConsistency() {
		return null;
	}