Let’s say I’m adding documents to a bucket using the following API:
CouchbaseClient.set(key, 0, value);
where I only added it to the cache. My understanding is that the OperationFuture object is used to determine if the document (key/value) was successfully added to the cache. However, we have NO idea (using this API) if it was in fact successfully persisted to disk. If the OperationFuture instance indicates success, we ONLY know the document was added to the persistence queue. Now, we could use the API in which we specify to be notified when the document has been persisted, but in testing we noticed this is a much slower operation (obviously). So the question. Let’s say i did the following:
Every 1000 (or some number) of set operations we use the PersistTo.ONE option. So the first 999 we used the above API, then on the 1000, we used the following:
CouchbaseClient.set(key, 0, value, PersistTo.ONE);
If I recieve a SUCCESS on the returned OperationFuture object, can I assume that the previous 999 documents have been persisted to disk?