Buckets — Server Compatibility

      +

      How Sync Gateway works with Couchbase Server’s Buckets

      Related topics: Buckets | Collections | Eventing | Transactions | XDCR | Backup and restore

      Other Topics: Compatibility Matrix

      Introduction

      A bucket in Couchbase Server is the fundamental space for storing data. Each bucket contains a hierachy of Scopes and Collections to logically group keys and values.

      For more information, see Buckets

      See: Compatibility Matrix for version compatibility information.

      You can find details here about compatibility between Couchbase Server buckets and the Couchbase Mobile ecosystem.

      Durability

      Sync Gateway does not support non-default durability settings at the bucket level for durable writes. Make sure your buckets have their bucket durability setting set to None. If this is not the case you’ll get a failure scenario, Write while SyncWrite is pending, and the attempt at a durable write fails.

      You can still use high durability settings when set on the client side. For more information about how to configure client-level durability for durable writes, see specifying levels.

      Time To Live (TTL)

      Document TTL is an Enterprise Edition only feature.

      Couchbase Server Enterprise Edition lets you have documents expire after a period of time, called the document’s Time To Live (TTL). This feature only works in Couchbase and Ephemeral buckets. It does not work in Memcached buckets. For more information, see Expiration.

      Sync Gateway does not support Bucket-level TTL, make sure your buckets have their maxTTL setting set to 0. If the bucket setting has a non-zero maxTTL value set, Sync Gateway returns an error prompting you to set the value to 0 in the Couchbase Server Admin UI.

      Similarly, do not set Collection-level TTL (maxTTL on collections) as this can interfere with Sync Gateway’s internal documents, including those with _sync prefixes and other system documents that are essential for proper operation. If these system documents expire due to collection-level TTL, Sync Gateway may malfunction or fail to operate properly. You can use per-collection sync functions to set expiry on all documents within a collection when you need TTL-like behavior at the collection level, while preserving Sync Gateway’s system documents.

      You can still set Document expiration settings on individual documents.