Bucket Conflict Resolution


#1

HI!
I’m curious to know more use-case scenarios for deciding on Bucket Conflict resolution either Sequence or Timestamp. According to the docs, I assume that most XDCR enabled buckets should be set to Timestamp. Is that correct? Such as: High Availability with Cluster Failover

These are good examples:
Example 1 - Most Updates is Best

Consider a hit counter for a website, stored as a counter document within Couchbase Server which is incremented on every access. In the event of a conflict occurring, you would want the version of the document has been incremented the most, as that will more closely reflect the actual count. Revision ID-based conflict resolution would be preferable in this instance as it ensures that the document which has been mutated the most ‘wins’.

Example 2 - Most Recent Update is Best

Consider a thermometer device which stores the current temperature in Couchbase Server, writing to the same key repeatedly. In the event of a conflict occurring, you would want to keep the version of the document which was captured most recently, as that is the most accurate ‘current’ temperature. Timestamp-based conflict resolution ensures that the most recent version of the document would be used.

I’m confused about XDCR - lets say you have a similar use case as above with a Counter - but you want to use XDCR… Would you set it to Timestamp because it’s most appropriate for XDCR or would you use Sequence.

Thanks,
Will