Release Notes

Release Notes

Couchbase Server 4.6 delivers some exciting capabilities for cross datacenter replication, security, query, tools, and application development. Take a look at What's new for a list of new features and improvements that are available in this release.

Release 4.6.2

Couchbase Server 4.6.2, released in May 2017, is the second maintenance release in the 4.6.x series of Couchbase Server. This release has fixes related to many different components.

Fixed Issues

This section lists some of the notable fixed issues in this release, grouped by component:

Backup

Issue Description
MB-23531 Sometimes cbbackupmgr would fail to get stats for a bucket when performing a backup. This results in some of the data from a bucket not being backed up.
MB-23105 cbbackupmgr might re-stream all mutations if there are multiple entries in a vBucket failover log. This causes cbbackupmgr to run a full backup every time, rather than incremental backups.
MB-22716 Using cbbackup with the command-line flag cbb_max_mx causes cbbackup to unexpectedly terminate.
MB-22325 cbbackupwrapper sometimes ends with a threading exception. Although this does not affect the backup, it would cause the incorrect exit code to be returned.
MB-20891 DCP rollbacks are sometimes not handled correctly, causing cbbackupmgr to unexpectedly terminate for subsequent backups using the same archive. This unexpected termination would be indicated by the message 'panic: runtime error: invalid memory address or nil pointer dereference'.

Cluster Manager

Issue Description
MB-24088 The secrets management feature fails to encrypt secrets larger than 4KB (such as SSL certificates). This causes the cluster manager to unexpectedly terminate when saving the cluster configuration to disk.
MB-23327 A race condition means that adding a node to a cluster shortly after node startup causes the cluster management process on the node to crash. This results in the failure of the node addition process.
MB-23268 The cluster management process' logging does not recover from situations where the disk that the logs are located on becomes full.

Data Service

Issue Description
MB-23591 A direct upgrade from 2.5.x to 4.6.x could result in a rebalance hanging or empty data files.
MB-23503 Previously removed items in replica vBuckets may be incorrectly restored during a failover. If a subsequent failover occurs then this could result in inconsistent/incorrect data.
MB-23269 The memcached process crashes when trying to write an audit event to a file with wrong permissions.
MB-22814 When creating a new Memcached bucket, existing Couchbase buckets may appear as not ready in the Couchbase Web Console for a few seconds. This should not affect application clients.
MB-22180 When a node is being rebalanced out of a cluster, its vBuckets are deleted. However, if there are pending disk fetches when the vBucket is deleted then they are not terminated correctly. This prevents the node from being accessible once it has been removed from a cluster.
MB-22044 Sub-document mutations using the CAS for optimistic concurrency fail on an item that is already locked.

Indexing Service

Issue Description
MB-22693 The indexer does not remove the old value for a key if the new value exceeds the maximum index length size.
MB-22692 Some corner cases in secondary key length checks cause the index to have inconsistent or incorrect results. This only affects indexes where there are keys which are close to the maximum key length.

Query Service

Issue Description
MB-23203 The wrong index may be chosen when using JOIN.
MB-22831 Inserting a numerical value using a N1QL query causes the value to be stored in scientific notation
MB-22630 Cipher AES128-SHA is incorrectly categorized as a medium-level cipher.
MB-22578 UNNEST queries do not consider the WHEN clause when selecting an index to use.
MB-22577 Producing an array by ranging over objects does not work.
MB-22536 DATE_RANGE_STR() and DATE_RANGE_MILLIS() may give wrong results when using very large or very small values.
MB-22530 The functions ARRAY_RANGE(), ARRAY_REPEAT(), DATE_RANGE_MILLIS(), DATE_RANGE_STR(), REPEAT() do not have bounds enforced. This causes the query engine to crash when very large arrays are generated.
MB-22362 Using LET with MISSING incorrectly sets the value to NULL.
MB-22273 In Couchbase clusters with multiple query service nodes, applications may get incorrect results from prepared N1QL queries that use covering indexes.
MB-22119 In rare cases, the query engine may panic when evaluating ARRAY expressions (for example ARRAY x FOR x IN ... END;)
MB-21284 Incorrect error message when non-JSON arguments are passed to the TOKENS() function.
MB-20677 REGEXP_LIKE() does not return an error when an invalid pattern string is passed.

Web Console

Issue Description
MB-23541 When the web console has been disabled over port 8091, in certain circumstances a login page will still be shown.
MB-23308 Using the REST API and web console over SSL (port 18091) does not work correctly in recent versions of Google Chrome (56.0 onwards) and Mozilla Firefox (51.0 onwards).
MB-23244 If a bucket password contains semicolon, the web console will truncate the password to the semicolon when saving the bucket setting.
MB-20741 The web console login page has character limit of 24 characters for the password, but this limit is not enforced in other components.

XDCR

Issue Description
MB-23228 Replication frequently restarts when a node is removed from target cluster.
MB-22997 XDCR sometimes has a backlog of items in its DCP queue due to a deadlock. This causes increased memory usage and issues with replication progress.
MB-22754 XDCR may not be able to detect if a bucket is deleted and then recreated on a target cluster.
MB-22678 XDCR is not able to connect to an elasticsearch target due to an incorrect endpoint.
MB-22382 In some cases, the thread handling a DCP stream may exit before closing its stream. This results in the XDCR process unexpectedly terminating.
MB-22224 XDCR does not set the snapshot start sequence number and vBucket uuid correctly when starting a DCP stream request. This results in the whole vBucket being re-streamed when replication is restarted, rather than from the most recent checkpoint.

Improvements

This section lists some of the notable improvements in this release, grouped by component:

Cluster Manager

Issue Description
MB-22252 Change the default behavior of the cluster manager to wait for the master password by default. This new behavior is detailed in Secret Management and Hardening.

Query

Issue Description
MB-22750 Add CONTAINS_TOKEN_LIKE() and CONTAINS_TOKEN_REGEXP().
MB-22646 Allow arbitrary variable names in array index selection.
MB-22645 Support simpler syntax for array indexing when all array elements are indexed.
MB-22644 Enable the string function CONTAINS() to use the functional index created with SUFFIXES().
MB-22629 Performance improvement for CONTAINS_TOKEN().
MB-22606 Enable DATE_RANGE_STR() to accept different supported date formats as parameters.
MB-22550 Add OBJECT_RENAME() and OBJECT_REPLACE() functions.
MB-22470 Improve pattern matching speed with LIKE and HAS_TOKEN().
MB-22417 Add weekday part to N1QL datetime functions.
MB-22332 Push down ORDER, COUNT(), MIN() to covering UNNEST index.
MB-22321 Add OrderedIntersectScan for pagination.
MB-22315 Push down LIMIT to IntersectScan and UnionScan.
MB-22309 Push down LIMIT to DistinctScan.
MB-22285 Infer IS NOT MISSING term for INNER UNNEST expressions on primary keyspace
MB-22148 Variable length sarging for OR predicates.
MB-22143 Index scans for OR predicates on disjoint terms.
MB-22124 Allow NOT IN/WITHIN queries to use secondary indexes.
MB-21770 Relax the mandatory array index-key, to create covering array-index.
MB-20626 Avoiding full index scan and optimize processing of queries with whole IN clause as a query parameter.
MB-19916 Add support for N1QL expressions in SELECT from-clause, and subqueries over nested collections.
MB-19078 Add quiet mode option to cbq to not echo the content of input file.

XDCR

Issue Description
MB-23305 Make capi nozzle runtime parameters externally configurable.
MB-22832 Do not refresh metadata about a target cluster reference in every replication. This reduces the number of requests to a target cluster in situations where there are multiple buckets being replicated from the source.
MB-22514 Reduce the number of outgoing connections to the target cluster.

Known Issues

This section lists some of the known issues in this release:

Issue Description
MB-24066 When upgrading from Couchbase Server 2.5.x to Couchbase Server 4.6.2 directly on a Couchbase Server cluster using views, rebalances may hang.

Workaround: Upgrade the cluster fully to Couchbase Server 3.1.6 as an intermediate step, before upgrading the cluster to Couchbase Server 4.6.2.

MB-22178 VBuckets may be incorrectly identified as in a backfill state and never leave this state. This may result in a rebalance hanging as the rebalance waits for the vBucket to leave the backfill state.
MB-20403

The cbbackupmgr merge command will not function correctly and may cause data corruption under the following circumstances:

  • The bucket being backed up is flushed between incremental backups

  • The bucket being backed up is deleted and re-created in between incremental backups

  • The bucket has not been backed up between a document's deletion and the metadata for that deleted document being purged

  • There has been a failover between incremental backups of the bucket

For more information about the Merge functionality, see cbbackupmgr merge.

Workaround: In the interim, the recommendation is to perform a full backup if you experience any of the above scenarios. This will lead to longer backup times than performing incremental backups, but will avoid potential data corruption due to the aforementioned issue.

MB-20338 When any topology changes occur on source cluster, such as when a node is removed, in some cases the outbound XDCR mutation statistics show a negative number on the monitoring page.

Release 4.6.1

Couchbase Server 4.6.1, released in March 2017, is the first maintenance release in the 4.6.x series for Couchbase Server. This release has fixes related to N1QL query, XDCR, indexing, and backup.

Fixed Issues

This section lists some of the fixed issues in this release:

Issue Description
MB-23114 Under certain circumstances the cbbackupmgr merge command may not properly display an error on the command line when merge fails.
MB-23112 When using XDCR from a cluster running Couchbase Server 4.x (prior to 4.6.0) to a 4.6.0 cluster, XDCR stops when it tries to replicate tombstones (deletes) and fails with an error message EINVAL.
MB-23032 When the query engine receives many syntactically incorrect N1QL statements, the Query Service processes may leak memory resulting in query engine crash with multiple goroutine stacktraces, or unexpected or unresponsive behavior.
MB-22409 The Indexer Service crashes while indexing an array whose size is close to the maximum index array size.
MB-22389 The Indexer Service crashes when there is a buffer overrun in secondary key length check.

Known Issues

This section lists some of the known issues in this release:

Issue Description
MB-22814 When creating a new Memcached bucket, existing Couchbase buckets may appear as not ready in the Couchbase Web Console for a few seconds. This should not affect the application clients.
MB-22273

In Couchbase clusters with multiple query service nodes, applications may get incorrect results from prepared N1QL queries that use covering indexes.

Workaround: The following two options can be used to avoid this problem:

  • Do not use prepared statements.
  • If using the Java SDK, set the undocumented property N1qlQueryExecutor.ENCODED_PLAN_ENABLED_PROPERTY to “false” before opening the bucket. For example,

System.setProperty(N1qlQueryExecutor.ENCODED_PLAN_ENABLED_PROPERTY, "false”) .. cluster.openBucket(bucketname)

MB-20403

The cbbackupmgr merge command will not function correctly and may cause data corruption under the following circumstances:

  • The bucket being backed up is flushed between incremental backups
  • The bucket being backed up is deleted and re-created in between incremental backups
  • The bucket has not been backed up between a document's deletion and the metadata for that deleted document being purged
  • There has been a failover between incremental backups of the bucket

For more information about the Merge functionality, see cbbackupmgr merge.

Workaround: In the interim, the recommendation is to perform a full backup if you experience any of the above scenarios. This will lead to longer backup times than performing incremental backups, but will avoid potential data corruption due to to the aforementioned issue.

MB-20338 When any topology changes occur on source cluster such as ‘when a node is removed’, in some edge cases the outbound XDCR mutation statistics show a negative number on the Monitoring page.

Release 4.6.0

Couchbase Server 4.6.0 was released in February 2017.

Supported Platforms

This release also adds support for Microsoft Windows 10 Anniversary Edition and Mac OS Sierra. For more information, see Supported Platforms.

Changes in Behavior

Here are the behavior changes in the product, compared to the previous release:
  • Results for the OBJECT_PAIRS and OBJECT_INNER_PAIRS functions:

    Starting from version 4.6.0, the results generated by OBJECT_PAIRS and OBJECT_INNER_PAIRS functions use the word "val" for value instead of the N1QL reserved word "value".

    For example:

    "results": [ 
          { "$1": [ { "name": "key1", "val": "val1" } ] 
           }
      ] 
  • CREATE INDEX is not allowed using any of the document metadata attributes except meta().id:

    In earlier releases, CREATE INDEX on metadata such as meta().cas, meta().flags, meta().expiry etc. were allowed, but respective metadata attributes weren’t getting indexed. Couchbase Server 4.6 allows only meta().id attribute in index-key expressions when creating secondary index.

  • META function:

    META() with no keyspace parameter can be used in N1QL statements when that query/statement refers to only one keyspace or bucket. When multiple keyspaces are referred in a query (for example, JOIN or NEST), then the META expressions must be used with specific keyspace names as parameter, such as META(keyspace). In earlier releases, this requirement is not enforced, and META() with no parameters is still accepted, implicitly referring to the first keyspace name used in the query. Couchbase 4.6 enforces this requirement and throws syntax error if META() is used with no parameter.

  • Upgrading Couchbase Server when Full Text Search (FTS) Service is enabled:

    When upgrading a cluster with nodes running FTS, upgrades will fail unless all full text index definitions are first deleted. To upgrade a cluster with FTS indexes, first save the existing index definition JSON, then remove all full text indexes. Then upgrade all nodes to the desired version. Once all nodes are upgraded, recreate the index definitions using the REST API. Note that you need to manually remove the byte_array_converter attribute from the index definition JSON (see MB-18042).

Known Issues

This section lists some of the known issues in this release:

Issue Description
MB-23112 When using XDCR from a cluster running Couchbase Server 4.x (prior to 4.6.0) to a 4.6.0 cluster, XDCR stops when it tries to replicate tombstones (deletes) and fails with an error message EINVAL.
Important: We recommend you wait for the upcoming bug-fix version 4.6.1 to upgrade.
MB-22814 When creating a new Memcached bucket, existing Couchbase buckets may appear as not ready in the Couchbase Web Console for a few seconds. This should not affect the application clients.
MB-22273

In Couchbase clusters with multiple query service nodes, applications may get incorrect results from prepared N1QL queries that use covering indexes.

Workaround: The following two options can be used to avoid this problem:

  • Do not use prepared statements.
  • If using the Java SDK, set the undocumented property N1qlQueryExecutor.ENCODED_PLAN_ENABLED_PROPERTY to “false” before opening the bucket. For example,

System.setProperty(N1qlQueryExecutor.ENCODED_PLAN_ENABLED_PROPERTY, "false”) .. cluster.openBucket(bucketname)

MB-20403

The cbbackupmgr merge command will not function correctly and may cause data corruption under the following circumstances:

  • The bucket being backed up is flushed between incremental backups
  • The bucket being backed up is deleted and re-created in between incremental backups
  • The bucket has not been backed up between a document's deletion and the metadata for that deleted document being purged
  • There has been a failover between incremental backups of the bucket

For more information about the Merge functionality, see cbbackupmgr merge.

Workaround: In the interim, the recommendation is to perform a full backup if you experience any of the above scenarios. This will lead to longer backup times than performing incremental backups, but will avoid potential data corruption due to to the aforementioned issue.

MB-20338 When any topology changes occur on source cluster such as ‘when a node is removed’, in some edge cases the outbound XDCR mutation statistics show a negative number on the monitoring page.

Fixed Issues

Data Service

Issue Description
MB-21762 Sub-document commands failed when Couchbase Server was under memory pressure.
MB-20868 The Data Service would crash when an invalid cluster map was prepared for a Memcached bucket.
MB-21597 In the case of concurrent sub-document API operations from multiple clients, Couchbase Server does not honor the atomicity. This can result in one update overwriting the previous update, even though the previous update was successful as far as the client is concerned.
MB-21448 Performing the REPLACE_WITH_CAS operation on a key which has recently been deleted and then requested can occasionally return KEY_EEXISTS (key exists but with different CAS) instead of the expected KEY_ENOENT.
MB-20519 Memory allocation in Data Service caused Memcached to continuously crash on Microsoft Windows 10 Anniversary Edition.
MB-20245 When using the access.log, the Data Service warmup would not honour the thresholds to stop. It would only stop once all the documents in the access.log was loaded.
MB-21475 There is a race condition where the Data service node crashes and when a bucket is deleted.
MB-20822 The Failover table showed some entries that resulted in the incorrect vbucket sequence numbers.
MB-20623 When the Data service node performs warmup using the access.log, it can use a lot of memory causing a low resident ratio.
MB-21511 Better logging message when a network connection is closed during a rebalance.
MB-21369 A large number of XDCR connections to Memcached that led to connection leak.
MB-20871 Fixed an issue to correctly display counters with zero values.
MB-20843 Fixed an issue when cluster's name using the REST endpoints was not retrievable.
MB-19614 There is a race condition that can cause the XDCR service to crash when replication using version 1 of XDCR. Please note that version 1 is used when replicating to ElasticSearch.
MB-21879 XDCR replication might get struck and not able to replicate mutations to target cluster in some cases, because the data service node is under heavy load.
MB-21924 The cbbackupmgr incorrectly restored delete document tombstones (metadata) as full documents.

Query Service

Issue Description
MB-21593 When you canceled a query from the workbench, the query continued to run on the server even though the UI indicated that it was canceled.
MB-16772 Queries using indexes created on metadata attributes other than meta().id (such as meta().cas, meta().expiry) did not produce correct results.
MB-16857 The NEST ON KEYS query results may not preserve original key order of fields.
MB-17674 Syntax error messages may have Unicode values instead of the character itself. This is same as MB-18722 below.
MB-18722 When copied and pasted, the PREPARE statement text or condition does not evaluate the special characters because the text contains Unicode values.
MB-19230 The N1QL queries with LIKE predicates did not work with strings containing new lines.
MB-19988 The IN and WITHIN operators may not handle NULL in-list values.
MB-20023 Query engine panics with error when WITH clause is used with CREATE INDEX .. USING VIEWS clause.
MB-20086 A query with USE INDEX() may panic when no matching secondary or primary indexes are available.
MB-20183 The query text in the EXPLAIN plan was arbitrarily truncated.
MB-20384 The Query engine displayed errors when backslash (\) was used in the LIKE expression.
MB-20485 The DATE_DIFF_MILLIS displayed incorrect results in case of very small difference.
MB-20520 The colon (:) was not properly encoded when setting the Predefined Session Parameters in the cbq shell.
MB-20577 The cbq shell displayed password in the console error messages.
MB-20826 In the cbq shell, running multiple queries separated by semicolon (;) displayed an error in the batch mode.
MB-20897 In the cbq shell, the \SET command without name and only prefix, resulted in an empty parameter with a value.
MB-20925 N1QL queries with correlated sub-query using covered index did not return results.
MB-21161 The cbq command line utility was not working properly when the [User/Bucket] password contained special characters.
MB-21384 Queries accessing system keyspace got access to all buckets, even though one of the buckets in the query was password protected.
MB-21660 A query with chained UPDATE FOR clause does not work for nested array element fields.
MB-21720 Composite predicate with AND of ANY / EVERY expressions do not work with array indexes.
MB-21816 The MILLIS_TO_STR() and STR_TO_MILLIS() functions converted incorrectly for the futuristic date/time values.
MB-21958 Incorrect result when the SELECT COUNT() query uses a secondary index for the query, and has META().id in the predicate.
MB-22000 N1QL query returned intermittent error "Index not found" even though index was present.
MB-22093 N1QL queries returned "Error performing bulk get operation" errors intermittently.
MB-22105 The UPDATE, INSERT, UPSERT statements may fail with the error message: "Panic: : runtime error: slice bounds out of range", when running with increased pipeline_batch settings.

Index Service

Issue Description
MB-21038 Upgrading nodes with the query service to version 4.5 causes version 4.0 indexer services to crash during rolling upgrade (stale=false).

FTS Service

Issue Description
MB-18042 Breaking Change. FTS index definitions from earlier releases no longer work due to the removal of byte_array_converter. Workaround: Manually remove the “byte_array_converter” attribute from the index definition JSON and then recreate the index.
MB-21595 MossStore is now the default kv store for FTS. If you have full text index definitions from previous versions that you want to update, change “kvStoreName” to “mossStore”, otherwise they will stay set to “forestdb”.

Security

Issue Description
MB-21814 The Email Server Password was not saved correctly when the Email Alerts setting was enabled (from the Settings > Alerts page).

Deprecated Items

Support for the following platforms is deprecated in this release:
  • Microsoft Windows 2008
  • Microsoft Windows 2008 R2 SP1
  • Ubuntu 12.0.4
  • Mac OS X 10.10
Note: For Windows, .exe installers are deprecated starting with 4.6.0. Beginning with the next major release, Windows installers will be delivered as industry-standard MSI files. Furthermore, in-place upgrade of a node from 4.x to 5.x will not be supported. When upgrading a cluster to 5.x, we recommend performing a rolling-upgrade.

The following platforms are no longer supported:

  • Microsoft Windows 8
  • Mac OS X 10.9
  • Amazon Linux 2014.03

The following functionality is deprecated, will be deprecated or is unsupported.

Function Description
TAP The TAP is an internal protocol that streams information about data changes between cluster nodes. In future releases, this protocol will be removed and not supported. The TAP is replaced with the Database Change Protocol (DCP).
CLI setting-ldap command This command is deprecated in this release. Use the admin-role-manage command instead.
CLI group-manage command Adding servers using the group-manage command is deprecated in this release. To add a server, use the server-add CLI command.
CLI rebalance command Adding servers using the couchbase-cli rebalance command is deprecated in this release. Use the couchbase-server-add CLI command instead.
CLI failover command Failing over multiple servers using one failover command option is deprecated in this release. Run the failover command once for each server.
CLI server-readd command The server-readd command is deprecated in this release. Use the recovery command instead.
BASE64() The BASE64() function is deprecated in version 4.5; use the function BASE64_ENCODE() instead.

Also, use the BASE64_DECODE() function to reverse the encoding done by BASE64_ENCODE().

Server-side moxi proxy is deprecated in 4.5 Use Couchbase client SDKs or client-side moxi in your applications.
CRAM-MD5 for bucket authentication Use SCRAM protocol supporting clients for bucket authentication in Couchbase Server version 4.5. SCRAM protocol for bucket authentication will first be introduced in Java, followed by other SDK clients.
Deprecate XDCR API from /internalSettings REST endpoint in 4.5 /Settings/replications REST endpoint will be available for all replication settings and provides the same functionality.
N1QL: Deprecated the use of path-expressions in FROM and JOIN clauses in version 4.5 FROM and JOIN clauses should use only keyspaces. Paths can be used for expressions in other clauses, operators, projections, and so on.
For example:
SELECT count(*) FROM `travel-sample`.schedule; 
can be rewritten as:
SELECT count(*)  FROM `travel-sample` WHERE schedule IS NOT MISSING;
CAPI based XDCR CAPI based XDCR is deprecated and will be removed in a future version of Couchbase Server.

Note that the support for Elasticsearch Plugin has not been removed. However, the Elasticsearch Plugin may be modified in the future to use an alternative connection method such as DCP or XMEM XDCR (XDCR v2).

FTS support for ForestDB as a KV Store As of this release, FTS indexes use MossStore as their default KV store. FTS support for ForestDB as a KV store will be removed in a future version of Couchbase Server.
Couchbase Enterprise Backup and Restore tool The tools, cbbackup and cbrestore, are deprecated from the Enterprise Edition. We recommend replacing these old tools with the new enterprise backup and restore tool, cbbackupmgr, in version 4.5.