Search code examples
marklogic

MarkLogic ACID and scalability


I am new to NoSQL and MarkLogic. My understanding is that MarkLogic has a near-linear scalability with multi document ACID.

In the case of a READ, how does MarkLogic achieve near-linear scalability with a shared-nothing architecture?

In the case of an UPDATE against dozens of nodes/forests, I am guessing the lock will be a huge overhead.

How does MarkLogic handle the above problems?


Solution

  • I wrote a blog post on isolation and how this works a while ago.

    The gist is that we do lock-free reads at an MVCC timestamp, and we lock records during update transactions in ways similar to relational DBMS systems. For cross-partition transactions we use two-phase commit.

    Locks don't in themselves impose huge overhead, but like any DBMS, you can run into locking issues if you're doing a lot of large concurrent updates that are not independent. We have monitoring for that and deadlock detection/resolution.

    You can also use predicate locks (see the blog post) to mitigate if you're doing large updates and want to serialize concurrent transactions on the same domain to avoid deadlocks.