@@ -7,6 +7,59 @@ title = "What's New"
7
7
pre = " <i class='fa fa-level-up'></i>"
8
8
+++
9
9
10
+ ## What's new in 3.11
11
+
12
+ This release fully supports all MongoDB releases from versions 2.6 to 4.2. Key new features of the 3.11 Java driver release include:
13
+
14
+ ### Improved transactions support
15
+
16
+ * The transactions API supports MongoDB 4.2 distributed transactions for use with sharded clusters. Distributed transactions use the same
17
+ API as replica set transactions.
18
+ * The sessions API supports the
19
+ [ ` ClientSession.withTransaction() ` ] ({{<apiref "com/mongodb/client/ClientSession.html#withTransaction(com.mongodb.client.TransactionBody) ">}})
20
+ method to conveniently run a transaction with automatic retries and at-most-once semantics.
21
+ * The transactions API supports the
22
+ [ ` maxCommitTime ` ] ({{<apiref "com/mongodb/TransactionOptions.html#getMaxCommitTime(java.util.concurrent.TimeUnit)">}}) option to control the
23
+ maximum amount of time to wait for a transaction to commit.
24
+
25
+ ### Reliability improvements
26
+
27
+ * Most read operations are by default
28
+ [ automatically retried] (https://github.com/mongodb/specifications/blob/master/source/retryable-reads/retryable-reads .rst). Supported read
29
+ operations that fail with a retryable error are retried automatically and transparently.
30
+ * [ Retryable writes] ( https://docs.mongodb.com/manual/core/retryable-writes/ ) are now enabled by default. Supported write
31
+ operations that fail with a retryable error are retried automatically and transparently, with at-most-once update semantics.
32
+ * DNS [ SRV] ( https://en.wikipedia.org/wiki/SRV_record ) records are periodically polled in order to update the mongos proxy list without
33
+ having to change client configuration or even restart the client application. This feature is particularly useful when used with a sharded
34
+ cluster on [ MongoDB Atlas] ( https://www.mongodb.com/cloud/atlas ) , which dynamically updates SRV records whenever you resize your Atlas
35
+ sharded cluster.
36
+ * Connections to the replica set primary are no longer closed after a step-down, allowing in progress read operations to complete.
37
+
38
+ ### Security improvements
39
+
40
+ Client-side encryption is supported. Automatic encryption and decryption is available for users of
41
+ [ MongoDB Enterprise Advanced] ( https://www.mongodb.com/products/mongodb-enterprise-advanced ) , while explicit encryption and decryption is
42
+ available for users of MongoDB Community.
43
+
44
+ See [ Client-side Encryption] ({{<ref "driver/reference/fle.md">}}) for further details.
45
+
46
+ ### General improvements
47
+
48
+ * New [ ` aggregate ` ] ({{<apiref "com/mongodb/client/MongoDatabase.html##aggregate(java.util.List)">}}) helper methods support running
49
+ database-level aggregations.
50
+ * Aggregate helper methods now support the ` $merge ` pipeline stage, and
51
+ [ ` Aggregates.merge() ` ] ({{<apiref "com/mongodb/client/model/Aggregates.html#merge(java.lang.String)">}}) builder methods support creation of
52
+ the new pipeline stage.
53
+ * [ Zstandard] ( https://facebook.github.io/zstd/ ) for wire protocol compression is supported in addition to Snappy and Zlib.
54
+ * Change stream helpers now support the ` startAfter ` option.
55
+ * Index creation helpers now support wildcard indexes.
56
+
57
+ ### Full list of changes
58
+
59
+ * [ New Features] ( https://jira.mongodb.org/issues/?jql=project%20%3D%20JAVA%20AND%20issuetype%20%3D%20%22New%20Feature%22%20AND%20resolution%20%3D%20Fixed%20AND%20fixVersion%20%3D%203.11.0%20ORDER%20BY%20component%20DESC%2C%20key%20ASC )
60
+ * [ Improvements] ( https://jira.mongodb.org/issues/?jql=project%20%3D%20JAVA%20AND%20issuetype%20%3D%20Improvement%20AND%20resolution%20%3D%20Fixed%20AND%20fixVersion%20%3D%203.11.0%20ORDER%20BY%20component%20DESC%2C%20key%20ASC )
61
+ * [ Bug Fixes] ( https://jira.mongodb.org/issues/?jql=project%20%3D%20JAVA%20AND%20issuetype%20%3D%20Bug%20AND%20resolution%20%3D%20Fixed%20AND%20fixVersion%20%3D%203.11.0%20ORDER%20BY%20component%20DESC%2C%20key%20ASC )
62
+
10
63
## What's new in 3.10
11
64
12
65
Key new features of the 3.10 Java driver release:
0 commit comments