John Cheng
John Cheng

Reputation: 569

cas operation behavior under network partitioning

The Couchbase 2.0 manual describes network partitioning as a potential issue.

http://docs.couchbase.org/couchbase-manual-2.0/couchbase-architecture.html#couchbase-architecture-failover-automatic-considerations

But I didn't see how (if) Couchbase 2.0 deal with such issues on the datastore side.

My question is how is CAS implemented in a cluster and how does CAS operations deal with the split-brain problem? Is there a cluster wide lock? Is it last writer wins?

Upvotes: 0

Views: 392

Answers (2)

Perry Krug
Perry Krug

Reputation: 675

The same question was asked to our Google Groups list: http://groups.google.com/group/couchbase/browse_thread/thread/e0d543d9b17f9c77

It's down at the bottom of the thread, posts starting on Aug 30

Perry

Upvotes: 2

Aliaksei Kandratsenka
Aliaksei Kandratsenka

Reputation: 667

Membase and Couchbase Server 2.0 are partitioning data. For each piece of data (vbucket) there's always single server that is source of truth.

Good side of this is that it's always strictly consistent. There's no need to design for conflict resolution etc.

But when some node goes down, you simply lose access to subset of your data. You can do failover in which case replicas will be promoted to masters for vbuckets that were lost, thus 'recoving' access to this vbuckets. Note that losing some recent mutations is unavoidable in that case due to some replication lag. And failover is manual operation (although recent version has very carefully implemented and limited autofailover).

Upvotes: 1

Related Questions