Couchbase - what happens if node dies after writing data to disk but before it gets replicated

Here's the script.

I have two nodes under my couchbase server, Node A and B. I have replication, so B will act as Node where A's data should be replicated.

Suppose I am trying to add a new entry and it can be stored in Node A. Node Saves this data to RAM and to my disk successfully, but UNSHORTABLE, it crashes even before this data can be replicated to Node B

If I have configured automatic failover, then all requests for Node data will now go to Node B.

My question is Will I be able to retrieve this new data that cannot be replicated to Node B, but has been successfully written over Node A Disk? given Node A is off and all I have is Node B to communicate with

If so, please explain. if not, is there an official couchbase document describing this behavior.

I tried looking for an answer in the official doc and it basically looks like this answer is no, but thought about it before concluding that its data loss is for sure.

Thank you in advance

+3


source to share


1 answer


In the scenario you described, yes, the data will not be available unless you verify that the data has been successfully replicated. Note, however, that replication will usually complete to a resiliency level, as the network is usually faster than disk.



Couchbase provides an API observe

that allows you to verify that a particular mutation has been replicated and / or saved. See Monitoring Data with Observe in the Couchbase Developer's Guide.

+3


source







All Articles