Skip to content

Commit 695a66a

Browse files
authored
RUST-2190 Remove support for server 4.0 (#1461)
1 parent 330ced1 commit 695a66a

33 files changed

+50
-418
lines changed

.evergreen/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ buildvariants:
9494
SSL: ssl
9595
tasks:
9696
# Ubuntu 22.04 does not support MongoDB versions below 6.0.
97-
- name: .standalone !.4.0 !.4.2 !.4.4 !.5.0
98-
- name: .replicaset !.4.0 !.4.2 !.4.4 !.5.0
99-
- name: .sharded !.4.0 !.4.2 !.4.4 !.5.0
97+
- name: .standalone !.4.2 !.4.4 !.5.0
98+
- name: .replicaset !.4.2 !.4.4 !.5.0
99+
- name: .sharded !.4.2 !.4.4 !.5.0
100100

101101
- name: macos-14.00
102102
display_name: "MacOS 14.00"
@@ -200,8 +200,8 @@ buildvariants:
200200
tasks:
201201
# The Stable API was introduced in MongoDB version 5.0. Drivers Evergreen Tools only supports
202202
# setting REQUIRE_API_VERSION on standalones and sharded clusters.
203-
- .standalone !.4.0 !.4.2 !.4.4
204-
- .sharded !.4.0 !.4.2 !.4.4
203+
- .standalone !.4.2 !.4.4
204+
- .sharded !.4.2 !.4.4
205205

206206
- name: sync-api
207207
display_name: "Sync API"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
target
2+
Cargo.lock

.evergreen/generate-tasks/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
static VERSIONS: &[&str] = &[
2-
"4.0", "4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest",
3-
];
1+
static VERSIONS: &[&str] = &["4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest"];
42

53
static TOPOLOGIES: &[(&str, &str)] = &[
64
("standalone", "server"),

.evergreen/suite-tasks.yml

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,6 @@
33

44
tasks:
55

6-
- name: test-4.0-standalone
7-
tags: [4.0, standalone]
8-
commands:
9-
- func: "bootstrap mongo-orchestration"
10-
vars:
11-
MONGODB_VERSION: 4.0
12-
TOPOLOGY: server
13-
- func: "run driver test suite"
14-
156
- name: test-4.2-standalone
167
tags: [4.2, standalone]
178
commands:
@@ -84,15 +75,6 @@ tasks:
8475
TOPOLOGY: server
8576
- func: "run driver test suite"
8677

87-
- name: test-4.0-replicaset
88-
tags: [4.0, replicaset]
89-
commands:
90-
- func: "bootstrap mongo-orchestration"
91-
vars:
92-
MONGODB_VERSION: 4.0
93-
TOPOLOGY: replica_set
94-
- func: "run driver test suite"
95-
9678
- name: test-4.2-replicaset
9779
tags: [4.2, replicaset]
9880
commands:
@@ -165,15 +147,6 @@ tasks:
165147
TOPOLOGY: replica_set
166148
- func: "run driver test suite"
167149

168-
- name: test-4.0-sharded
169-
tags: [4.0, sharded]
170-
commands:
171-
- func: "bootstrap mongo-orchestration"
172-
vars:
173-
MONGODB_VERSION: 4.0
174-
TOPOLOGY: sharded_cluster
175-
- func: "run driver test suite"
176-
177150
- name: test-4.2-sharded
178151
tags: [4.2, sharded]
179152
commands:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ For more details, including features, runnable examples, troubleshooting resourc
1111
### Requirements
1212

1313
- Rust 1.83.0+ (See the [MSRV policy](#minimum-supported-rust-version-msrv-policy) for more information)
14-
- MongoDB 4.0+
14+
- MongoDB 4.2+
1515

1616
#### Supported Platforms
1717

src/action/find_and_modify.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ impl<T: DeserializeOwned + Send + Sync> Collection<T> {
6161

6262
/// Atomically finds up to one document in the collection matching `filter` and updates it.
6363
/// Both `Document` and `Vec<Document>` implement `Into<UpdateModifications>`, so either can be
64-
/// passed in place of constructing the enum case. Note: pipeline updates are only supported
65-
/// in MongoDB 4.2+.
64+
/// passed in place of constructing the enum case.
6665
///
6766
/// This operation will retry once upon failure if the connection and encountered error support
6867
/// retryability. See the documentation
@@ -133,8 +132,7 @@ impl<T: DeserializeOwned + Send + Sync> crate::sync::Collection<T> {
133132

134133
/// Atomically finds up to one document in the collection matching `filter` and updates it.
135134
/// Both `Document` and `Vec<Document>` implement `Into<UpdateModifications>`, so either can be
136-
/// passed in place of constructing the enum case. Note: pipeline updates are only supported
137-
/// in MongoDB 4.2+.
135+
/// passed in place of constructing the enum case.
138136
///
139137
/// This operation will retry once upon failure if the connection and encountered error support
140138
/// retryability. See the documentation

src/action/transaction.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ impl ClientSession {
1919
/// [`crate::error::TRANSIENT_TRANSACTION_ERROR`] label. This label indicates that the entire
2020
/// transaction can be retried with a reasonable expectation that it will succeed.
2121
///
22-
/// Transactions on replica sets are supported on MongoDB 4.0+. Transactions on sharded
23-
/// clusters are supported on MongoDB 4.2+.
24-
///
2522
/// ```rust
2623
/// # use mongodb::{bson::{doc, Document}, error::Result, Client, ClientSession};
2724
/// #

src/action/update.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ where
2020
/// Updates all documents matching `query` in the collection.
2121
///
2222
/// Both `Document` and `Vec<Document>` implement `Into<UpdateModifications>`, so either can be
23-
/// passed in place of constructing the enum case. Note: pipeline updates are only supported
24-
/// in MongoDB 4.2+. See the official MongoDB
23+
/// passed in place of constructing the enum case. See the official MongoDB
2524
/// [documentation](https://www.mongodb.com/docs/manual/reference/command/update/#behavior) for more information on specifying updates.
2625
///
2726
/// `await` will return d[`Result<UpdateResult>`].
@@ -41,8 +40,7 @@ where
4140
/// Updates up to one document matching `query` in the collection.
4241
///
4342
/// Both `Document` and `Vec<Document>` implement `Into<UpdateModifications>`, so either can be
44-
/// passed in place of constructing the enum case. Note: pipeline updates are only supported
45-
/// in MongoDB 4.2+. See the official MongoDB
43+
/// passed in place of constructing the enum case. See the official MongoDB
4644
/// [documentation](https://www.mongodb.com/docs/manual/reference/command/update/#behavior) for more information on specifying updates.
4745
///
4846
/// This operation will retry once upon failure if the connection and encountered error support
@@ -73,8 +71,7 @@ where
7371
/// Updates all documents matching `query` in the collection.
7472
///
7573
/// Both `Document` and `Vec<Document>` implement `Into<UpdateModifications>`, so either can be
76-
/// passed in place of constructing the enum case. Note: pipeline updates are only supported
77-
/// in MongoDB 4.2+. See the official MongoDB
74+
/// passed in place of constructing the enum case. See the official MongoDB
7875
/// [documentation](https://www.mongodb.com/docs/manual/reference/command/update/#behavior) for more information on specifying updates.
7976
///
8077
/// [`run`](Update::run) will return d[`Result<UpdateResult>`].
@@ -87,8 +84,7 @@ where
8784
/// Updates up to one document matching `query` in the collection.
8885
///
8986
/// Both `Document` and `Vec<Document>` implement `Into<UpdateModifications>`, so either can be
90-
/// passed in place of constructing the enum case. Note: pipeline updates are only supported
91-
/// in MongoDB 4.2+. See the official MongoDB
87+
/// passed in place of constructing the enum case. See the official MongoDB
9288
/// [documentation](https://www.mongodb.com/docs/manual/reference/command/update/#behavior) for more information on specifying updates.
9389
///
9490
/// This operation will retry once upon failure if the connection and encountered error support

src/action/watch.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ use crate::{
3333
impl Client {
3434
/// Starts a new [`ChangeStream`] that receives events for all changes in the cluster. The
3535
/// stream does not observe changes from system collections or the "config", "local" or
36-
/// "admin" databases. Note that this method (`watch` on a cluster) is only supported in
37-
/// MongoDB 4.0 or greater.
36+
/// "admin" databases.
3837
///
3938
/// See the documentation [here](https://www.mongodb.com/docs/manual/changeStreams/) on change
4039
/// streams.
@@ -121,8 +120,7 @@ where
121120
impl crate::sync::Client {
122121
/// Starts a new [`ChangeStream`] that receives events for all changes in the cluster. The
123122
/// stream does not observe changes from system collections or the "config", "local" or
124-
/// "admin" databases. Note that this method (`watch` on a cluster) is only supported in
125-
/// MongoDB 4.0 or greater.
123+
/// "admin" databases.
126124
///
127125
/// See the documentation [here](https://www.mongodb.com/docs/manual/changeStreams/) on change
128126
/// streams.

src/change_stream/options.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ pub struct ChangeStreamOptions {
5151
/// the token. This will allow users to watch collections that have been dropped and
5252
/// recreated or newly renamed collections without missing any notifications.
5353
///
54-
/// This feature is only available on MongoDB 4.2+.
55-
///
5654
/// See the documentation [here](https://www.mongodb.com/docs/master/changeStreams/#change-stream-start-after) for more
5755
/// information.
5856
pub start_after: Option<ResumeToken>,

0 commit comments

Comments
 (0)