Skip to main content

Posts

Showing posts with the label concurrency

Introduction to Couchbase for Oracle Developers and Experts: Part 8: Transactions

Six thousand years ago, the Sumerians invented writing for transaction processing -  Gray and Reuter Transaction is a set of read and write actions consisting of Unprotected actions on the transient state outside the transaction statement scope and state (e.g. storage allocations, dictionary management) Protected change the persisted data, actions must be reflected in transaction outcome Real actions using sensors and actuators, once done, cannot be undone. Transaction Examples ORACLE Couchbase Oracle automatically starts a multi-statement transaction for every new statement. So, issuing BEGIN WORK or START TRANSACTION is unnecessary BEGIN WORK, START TRANSACTION are all synonymous and start a multi statement transaction.  – Transaction begins automatically INSERT INTO customer(cid, name, balance) VALUES(4872, “John Doe”, 724.23); INSERT INTO customer(cid, name, balance) VALUES(1924, “Bob Stanton”, 2735.48); COMMIT; START TRANSACTION; INSERT INTO customer VALUES(“cx4872”, {“c...

Concurrency Behavior: MongoDB vs. Couchbase

[Reposted from my article: http://blog.couchbase.com/2016/july/testing-mongodb-and-couchbase-concurrent-query  and https://dzone.com/articles/concurrency-behavior-mongodb-vs-couchbase ] Multi-User Testing David Glasser of Meteor wrote a blog on an MongoDB query missing matching documents issue he ran into.  It is straightforward to reproduce the issue on both MongoDB MMAPv1 and MongoDB WiredTiger engine. Here are his conclusions from his article (emphasis is mine) Long story short… This issue doesn’t affect queries that don’t use an index, such as queries that just look up a document by ID. It doesn’t affect queries which explicitly do a single value equality match on all fields used in the index key. It doesn’t affect queries that use indexes whose fields are never modified after the document is originally inserted. But any other kind of MongoDB query can fail to include all the matching documents! Here’s another way to look at it. In MongoDB...