Home / Companies / Couchbase / Blog / Post Details
Content Deep Dive

Timestamp-based conflict resolution in XDCR – a QE’s perspective

Blog post from Couchbase

Post Details
Company
Date Published
Author
Arunkumar Senthilnathan, Sr Software Engineer, Couchbase
Word Count
1,711
Company Posts That Month
33
Language
English
Hacker News Points
-
Post removed?
No
Summary

Couchbase's Cross Datacenter Replication (XDCR) feature aids in disaster recovery and data locality by providing two conflict resolution strategies: revision ID-based and timestamp-based. The revision ID-based strategy, suitable for applications following a "Most updates is best" policy, uses a document's revision ID to resolve conflicts. Conversely, timestamp-based conflict resolution, introduced in version 4.6, is tailored for applications that prioritize the "Most recent update is best" approach, utilizing a hybrid logical clock to maintain consistent mutation ordering. Choosing the appropriate strategy is crucial, as it is a bucket-level parameter that cannot be changed post-creation, and both source and destination buckets in an XDCR setup must share the same strategy. Timestamp-based resolution requires synchronized clocks, typically achieved using NTP, to function accurately, as time skew can lead to incorrect outcomes. Testing the timestamp-based approach involves validating its effectiveness against revision ID-based resolution and ensuring the monotonicity and correctness of the hybrid logical clock.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.