AWS documentdb: DocumentDB 8.0.2 adds retryable writes and correlated subqueries
Summary
Updates the functional differences page to state that retryable writes are now supported starting with engine version 8.0.2 (with a new error message for older versions), removes the obsolete disable-retryable-writes code example, and documents support for correlated subqueries (including concise syntax) starting with 8.0.2.
Security assessment
The change is purely a feature/behavior compatibility update about retryable write support and correlated subqueries. It mentions no vulnerability, credential handling, encryption, or access control, so it has no concrete security implication.
Evidence
+Most current MongoDB-compatible drivers enable retryable writes by default. Amazon DocumentDB supports retryable writes starting with engine version 8.0.2. On earlier engine versions, retryable writes are not supported and you must disable them to avoid errors.
Diff
diff --git a/documentdb/latest/devguide/functional-differences.md b/documentdb/latest/devguide/functional-differences.md index 0d3c202bc..a7f3a4c7b 100644 --- a//documentdb/latest/devguide/functional-differences.md +++ b//documentdb/latest/devguide/functional-differences.md @@ -293 +293 @@ When using the `$sort` aggregation stage, the sort order is not preserved unless -Starting with MongoDB 4.2 compatible drivers, retryable writes are enabled by default. However, Amazon DocumentDB does not currently support retryable writes. The functional difference will manifest itself in an error message similar to the following. +Most current MongoDB-compatible drivers enable retryable writes by default. Amazon DocumentDB supports retryable writes starting with engine version 8.0.2. On earlier engine versions, retryable writes are not supported and you must disable them to avoid errors. @@ -294,0 +295 @@ Starting with MongoDB 4.2 compatible drivers, retryable writes are enabled by de +On engine versions earlier than 8.0.2, enabling retryable writes results in an error message similar to the following. @@ -296 +296,0 @@ Starting with MongoDB 4.2 compatible drivers, retryable writes are enabled by de - {"ok":0,"errmsg":"Unrecognized field: 'txnNumber'","code":9,"name":"MongoError"} @@ -298,3 +298 @@ Starting with MongoDB 4.2 compatible drivers, retryable writes are enabled by de -Retryable writes can be disabled via the connection string (for example, `MongoClient("mongodb://my.mongodb.cluster/db?retryWrites=false")`) or the MongoClient constructor’s keyword argument (for example, `MongoClient("mongodb://my.mongodb.cluster/db", retryWrites=False)`). - -The following is a Python example that disables retryable writes in the connection string. + {"ok":0,"errmsg":"Retryable writes are not supported","code":301,"name":"MongoError"} @@ -301,0 +300 @@ The following is a Python example that disables retryable writes in the connecti +Retryable writes can be disabled via the connection string (for example, `MongoClient("mongodb://my.mongodb.cluster/db?retryWrites=false")`) or the MongoClient constructor’s keyword argument (for example, `MongoClient("mongodb://my.mongodb.cluster/db", retryWrites=False)`). @@ -303 +302 @@ The following is a Python example that disables retryable writes in the connecti - client = pymongo.MongoClient('mongodb://<username>:<password>@docdb-2019-03-17-16-49-12.cluster-ccuszbx3pn5e.us-east-1.docdb.amazonaws.com:27017/?replicaSet=rs0',w='majority',j=True,retryWrites=False) +For more information about retryable writes on engine version 8.0.2 and later, see [Retryable writes in Amazon DocumentDB](./retryable-writes.html). @@ -353 +352 @@ Amazon DocumentDB does not support querying Dollar($) prefixed fields in $in, $n -Amazon DocumentDB supports the ability to do equality matches (for example, left outer join) and also supports uncorrelated subqueries, but does not support correlated subqueries. +Amazon DocumentDB supports the ability to do equality matches (for example, left outer join) and also supports uncorrelated subqueries. Starting with version 8.0.2, Amazon DocumentDB also supports correlated subqueries, including the concise correlated subquery syntax. In a correlated subquery, only a subset of aggregation stages that evaluate expressions can reference the `let` variables. For the list of supported stages and related restrictions, see [Supported stages in correlated subqueries](./lookup.html#lookup-correlated-stages). In versions earlier than 8.0.2, correlated subqueries are not supported.