Couchbase Nodejs Issues

Hi,

How can we verify that data is persisted to disc in Node.js? Like if bucket.insert operation is performed than how to verify through application that document after being loaded to memory is persisted to disk. How to ensure that document is safely replicated to one or more nodes within the cluster and persisted to the master, or persisted to one or more nodes within the cluster. Provided there is only one default index is created (i.e. meta id). No secondary indexes are used. Could anyone please suggest something on this?

Take a look at the observe(persist_to, replicate_to) functionality. I’m not familiar with the Node.JS API so can’t point you there directly, but I’m sure the docs will have it covered.

1 Like

@gupta2905shilpi,

@drigby is correct, you’ll set the durability requirements when performing document operations. You may want to look at this: http://developer.couchbase.com/documentation/server/4.5/sdk/nodejs/document-operations.html

Thanks,

Matt