Difference between PeristTo and ReplicateTo

I wanted to confirm the differences between PeristTo and ReplicateTo since they sound kind of similar and the docs aren’t entirely clear from what I’ve read.

ReplicateTo seems mostly straight forward. A given document only has a single “master” node so this setting specifies that x number of other nodes must also replicate the document.

PesistTo is what I’m a bit vauge on since I’m not sure what "persist’ means. Obviously it can’t simply mean that the document is stored on those nodes, because that’s what the ReplicateTo setting appears to refer to. Therefore I assume that it references the difference between having the document stored in RAM or Disk. Does the PersistTo setting mean specifically that the given number of nodes don’t just have the document stored in their memory, but that they have also stored it on their disk as well?

If so, can we clarify the difference between “replicated” and “persisted” that on the docs? Specifically this one: http://www.couchbase.com/docs/couchbase-sdk-java-1.1/couchbase-sdk-java-set-durability.html#table-couchbase-sdk_java_set-persist-replicate I think perhaps just changing the wording of the docs to say “persisted to disk” would be helpful.

I would also love any additional links someone can provide if there is a doc explaining this and I simply missed it. This doc seems to pretty well support how I think those terms are defined: http://www.couchbase.com/docs/couchbase-sdk-java-1.1/advanced-persistence.html

Thanks, that confirms what I was thinking. Is there a reason why you posted that as a comment to my question and not an answer?

What can we do about the Couchbase docs to clear up the wording on that a little?

persistedto … will not return untill it writes to memory and to disk.

replicateto – will return when the number of repilca have been created.

FOUR
Persist to at least four nodes including Master.
MASTER
Persist to the Master.
ONE
ONE implies MASTER.
THREE
Persist to at least three nodes including Master.
TWO
Persist to at least two nodes including Master.
ZERO
Don’t wait for persistence on any nodes.

you can read about it more here http://www.couchbase.com/autodocs/couchbase-java-client-1.0.3/net/spy/memcached/PersistTo.html

Did not know there was a real difference between the two. I just do comments b/c when I’m writing my post … the original question is above the textarea box.

I would assume this should work like StackOverflow where you comment if you just need to clarify the question, but you answer if you are actually answering what was asked. Otherwise, the question still shows as having zero answers on the question list and I can’t upvote your answer as helpful.

@Brad: about the way to improve the documentation, I have a logged a doc bug available here :
http://www.couchbase.com/issues/browse/MB-8669 - feel free to comment/add stuff if needed.

Thanks Tug. If I have doc improvements in the future, I assume I can just go enter a ticket for it?

Househippo, thanks for converting your comment to an answer. I voted it up :slight_smile: