Edit a Bucket

    +
    Full, Cluster, and Bucket Administrators can edit a subset of the settings already established on an existing bucket. This section explains how to do so; and notes the possible consequences of such configuration-changes.

    Edit an Existing Bucket-Configuration

    To edit an existing bucket-configuration, access Couchbase Web Console, and left-click on the Buckets tab, in the vertical navigation-bar at the left-hand side.

    accessBucketTab

    The Buckets screen now appears, showing the buckets that have already been defined for your system:

    bucketsViewInitialEdit

    To edit the settings for a particular bucket, left-click on the bucket’s row in the UI. This expands the row, to display additional information:

    bucketsViewWithExpandedBucketRow

    Values for the current settings for the selected bucket are shown at the left-hand side, in a vertical column under the bucket-name. Current Memory and Disk status is shown further to the right. (Note that disk-related information pertains to Couchbase buckets only.)

    Further values are displayed in successive columns, to the right of the bucket-name. These indicate the number of items in the bucket, the number of items with data that is currently resident in memory (for Couchbase buckets only), the number of operations performed on the bucket during the last second, the amount of RAM currently in use from the available quota, and the amount of disk-space used (for Couchbase buckets only).

    To the right hand side of the row are tabs that allow examination of the Documents within the bucket; and creation of Scopes and Collections, into which documents can be organized.

    (For information on importing documents into a bucket, see Import Documents.)

    At the lower right, buttons are provided for dropping, compacting (for Couchbase buckets only), and editing the bucket. Note that dropping means deleting the bucket, all the documents it contains, and all scopes and collections into which the documents have been organized.

    To display the user-interface for editing, left-click on the Edit button:

    editBucketButton

    This displays the Edit Bucket Settings dialog, which permits changes to be made to a subset of existing settings. All the settings contained here are described in detail for the Add Data Bucket dialog, on the page Create a Bucket

    Making Changes

    Only a subset of settings is available for modification, after the creation of a bucket. These settings are listed below:

    • Memory Quota: The amount of RAM allocated per node to this bucket. Can be changed for a Couchbase or Ephemeral bucket only. If you decide to lower this setting, note that the value you specify cannot be lower than the amount of memory currently used by the bucket on any of the nodes in your cluster. Once changed, this setting takes effect immediately.

    • Bucket Max Time-to-Live: The maximum time a document can exist, following its creation within this bucket, before being deleted. Can be changed for a Couchbase or Ephemeral bucket only. A modified setting applies only to documents that will be created or modified subsequently.

    • Compression Mode: Whether and how compression is applied to data within the bucket. For information on available modes, and the effect of changing the mode of an existing bucket, see Compression.

    • Ejection Method: The ejection policy used by a bucket. Can be changed for a Couchbase bucket only. Note that changing the ejection-policy forces a bucket-restart; resulting in the temporary inaccessibility of data, while the bucket warms up.

    • Replicas: The number of bucket-replicas to be maintained by the cluster. This number can be changed at any time for a Couchbase or Ephemeral bucket: however, a rebalance is required after a setting-change, in order to redistribute the correct number of replica-items across the cluster. Note that Couchbase-bucket View Index Replicas cannot be enabled or disabled once a bucket has been created.

    • Bucket Priority: The priority to be assigned to the current bucket’s background tasks. Can be changed for Couchbase and Ephemeral buckets. Note that a priority-change invokes a bucket restart, resulting in the temporary inaccessibility of data, while the bucket warms up.

    • Minimum Durability Level: Allows an appropriate durability level to be assigned to the bucket. Levels are accessed by means of a pull-down menu. The options are none, majority, majorityAndPersistActive, and persistToMajority. For information, see Durability.

    • Auto-Compaction: When established, these settings, which determine the conditions under which data-compaction for the bucket is performed, override the cluster-wide defaults; as discussed in Auto-Compaction. The full range of settings applies to and can be changed for Couchbase buckets; while only the Metadata Purge Interval applies to and can be changed for Ephemeral buckets.

    • Flush: This setting enables or disables the Flush command for the current bucket. It can be changed at any time for all three types of bucket. Note that when flushing is enabled, left-clicking on the bucket’s display-row on the Buckets screen displays the Flush button:

      flushBucketButton

      If flushing is disabled, the Flush button does not appear.

    Changing Bucket-Settings with the CLI and REST API

    You can change bucket-settings using the CLI command bucket-edit; or the REST Buckets API.