compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View Page History
{code}

Note that in the response above, the field normally used for CAS has been separated into two fields which are to provide statistics on the average amount of time for certain events to propagate from a given server. The first is the amount of time, in milliseconds, it's taking on average to persist items. The second is the amount of time, in milliseconds, it's taking to replicate items. If not implemented by a given server version, each of these fields would be padded with 0. These fields allow a client library to optionally be a bit more intelligent, and thus efficient, about its polling intervals. The examples above show 1000 milliseconds to persistence and 100 milliseconds to replication. Note that this is a server's best guess on how long things take on average for any given operation, it is not related to the specific key being observed.

h2. Notes
{{OBSERVE}} is a binary protocol only operation. It could be implemented in ASCII, but that would currently be complicated by the fact that mutation operations do not return the new CAS value in ASCII protocol. Since Couchbase Server uses binary protocol exclusively, we do not implement that currently.

h2. Expected use Cases

h3. Ensure Indexable
The current implementation of Couchbase Server does not consider items in stale=false view queries until items are persisted. The combination of an application making changes, ensuring they're persisted and then issuing a stale=false query will give the app an ability to consistently access the view with respect to any changes that application made.

Further information on this use case is to be documented elsewhere.

h3. Ensure Durability
Through client library specific APIs, applications may wish to verify that the change recently made was durable. For example, in some cases a user application may wish to verify a data item has been made on the master and at least one replica. Another example may be that a user application may be extremely paranoid that a particular data update not be lost. In that case, it would want to ensure that item has been replicated to at least 3 servers and persisted to at least 4 servers (the maximum durability supported by Couchbase Server).

h2. Implementation Questions
{quote}