Skip to content

Commit 86dfbf7

Browse files
committed
Add upgrading guide and what's new section for the 3.11 release
1 parent 36ab5e1 commit 86dfbf7

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

docs/reference/content/upgrading.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@ title = "Upgrade Considerations"
77
pre = "<i class='fa fa-level-up'></i>"
88
+++
99

10+
## Upgrading from 3.10.x
11+
12+
Please note that the 3.11 driver enables both retryable reads and retryable writes by default, so users upgrading to the 3.11 driver may
13+
wish to adjust any custom retry logic in order to prevent applications from retrying for too long.
14+
15+
In the upcoming 4.0 release, all deprecated API elements except those documented as "not currently scheduled for removal" will be removed.
16+
Currently the only deprecated API elements _not_ scheduled for removal are:
17+
18+
* [`Mongo.getDB`]({{<apiref "com/mongodb/Mongo.html#getDB-java.lang.String-">}})
19+
* [`JsonMode.STRICT`]({{<apiref "org/bson/json/JsonMode.html#STRICT">}})
20+
21+
To prepare for the 4.0 release, please compile with deprecation warnings enabled and replace all usage of deprecated API elements with their
22+
recommended replacements.
23+
24+
Also, note that the 3.11 release (which includes support for MongoDB 4.2) will be the last release that is compatible with *Java 6
25+
or Java 7*. The 4.0 Java driver will require a minimum of Java 8. The 3.11 release will also be the last non-patch release in the 3.x
26+
line. In particular, support for MongoDB 4.4 will only be made available via a 4.x driver release.
27+
28+
The 3.11 release is binary and source compatible with the 3.9 release, except for methods that have been added to interfaces that
29+
have been marked as unstable, and changes to classes or interfaces that have been marked as internal or annotated as Beta.
30+
1031
## Upgrading from 3.9.x
1132

1233
Please note that two large portions of the current driver have been deprecated as of the 3.9.0 release:

docs/reference/content/whats-new.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,59 @@ title = "What's New"
77
pre = "<i class='fa fa-level-up'></i>"
88
+++
99

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+
1063
## What's new in 3.10
1164

1265
Key new features of the 3.10 Java driver release:

0 commit comments

Comments
 (0)