Transactions — Server Compatibility

      +

      How Sync Gateway works with Couchbase Server Transactions

      Related topics: XDCR | Eventing | Transactions | Collections

      Other Topics: Compatibility Matrix

      Introduction

      Couchbase Server provides the backing data store for Sync Gateway.

      See: Compatibility Matrix for version compatibility information.

      Both Couchbase Server and Couchbase mobile (Sync Gateway and Couchbase Lite) support local transactions.

      Here we provide details on how Couchbase Server’s Couchbase Transactions feature relates to the Couchbase mobile ecosystem.

      Local Transactions

      Within the Couchbase mobile ecosystem all transactions are local, either to the Couchbase Server or to the Couchbase Lite database:

      • Couchbase Server supports server side transactions — see: Couchbase Transactions.
        Changes made on the server within a transaction block are guaranteed to be imported by the Sync Gateway only after all the changes in a transaction are committed.

      • Similarly, Couchbase Lite supports transactions that are local to the Couchbase Lite database — see: Database.inBatch().
        Only committed transactions will ever reach Sync Gateway.

      There is no guarantee that a series of updates made within a transaction block, on either the Couchbase Server or Couchbase Lite client side, will be ACID compliant when they sync to the other end.