Skip to content

Commit 7976de7

Browse files
authored
RUST-1821 EOL support for 3.6 (#1151)
1 parent 6a5ce91 commit 7976de7

File tree

16 files changed

+47
-48
lines changed

16 files changed

+47
-48
lines changed

.evergreen/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ buildvariants:
8787
SSL: ssl
8888
tasks:
8989
# Ubuntu 22.04 does not support MongoDB versions below 6.0.
90-
- name: .standalone !.3.6 !.4.0 !.4.2 !.4.4 !.5.0
91-
- name: .replicaset !.3.6 !.4.0 !.4.2 !.4.4 !.5.0
92-
- name: .sharded !.3.6 !.4.0 !.4.2 !.4.4 !.5.0
90+
- name: .standalone !.4.0 !.4.2 !.4.4 !.5.0
91+
- name: .replicaset !.4.0 !.4.2 !.4.4 !.5.0
92+
- name: .sharded !.4.0 !.4.2 !.4.4 !.5.0
9393

9494
- name: macos-11.00
9595
display_name: "MacOS 11.00"
@@ -193,7 +193,7 @@ buildvariants:
193193
tasks:
194194
# The Stable API was introduced in MongoDB version 5.0. Drivers Evergreen Tools only supports
195195
# setting REQUIRE_API_VERSION on standalones.
196-
- .standalone !.3.6 !.4.0 !.4.2 !.4.4
196+
- .standalone !.4.0 !.4.2 !.4.4
197197

198198
- name: sync-api
199199
display_name: "Sync API"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
static VERSIONS: &[&str] = &[
2-
"3.6", "4.0", "4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest",
2+
"4.0", "4.2", "4.4", "5.0", "6.0", "7.0", "8.0", "rapid", "latest",
33
];
44

55
static TOPOLOGIES: &[(&str, &str)] = &[

.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-3.6-standalone
7-
tags: [3.6, standalone]
8-
commands:
9-
- func: "bootstrap mongo-orchestration"
10-
vars:
11-
MONGODB_VERSION: 3.6
12-
TOPOLOGY: server
13-
- func: "run driver test suite"
14-
156
- name: test-4.0-standalone
167
tags: [4.0, standalone]
178
commands:
@@ -93,15 +84,6 @@ tasks:
9384
TOPOLOGY: server
9485
- func: "run driver test suite"
9586

96-
- name: test-3.6-replicaset
97-
tags: [3.6, replicaset]
98-
commands:
99-
- func: "bootstrap mongo-orchestration"
100-
vars:
101-
MONGODB_VERSION: 3.6
102-
TOPOLOGY: replica_set
103-
- func: "run driver test suite"
104-
10587
- name: test-4.0-replicaset
10688
tags: [4.0, replicaset]
10789
commands:
@@ -183,15 +165,6 @@ tasks:
183165
TOPOLOGY: replica_set
184166
- func: "run driver test suite"
185167

186-
- name: test-3.6-sharded
187-
tags: [3.6, sharded]
188-
commands:
189-
- func: "bootstrap mongo-orchestration"
190-
vars:
191-
MONGODB_VERSION: 3.6
192-
TOPOLOGY: sharded_cluster
193-
- func: "run driver test suite"
194-
195168
- name: test-4.0-sharded
196169
tags: [4.0, sharded]
197170
commands:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For more details, including features, runnable examples, troubleshooting resourc
88
## Installation
99
### Requirements
1010
- Rust 1.64+ (See the [MSRV policy](#minimum-supported-rust-version-msrv-policy) for more information)
11-
- MongoDB 3.6+
11+
- MongoDB 4.0+
1212

1313
#### Supported Platforms
1414

src/sdam/description/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ use crate::{
1313
serde_util,
1414
};
1515

16-
const DRIVER_MIN_DB_VERSION: &str = "3.6";
17-
const DRIVER_MIN_WIRE_VERSION: i32 = 6;
16+
const DRIVER_MIN_DB_VERSION: &str = "4.0";
17+
const DRIVER_MIN_WIRE_VERSION: i32 = 7;
1818
const DRIVER_MAX_WIRE_VERSION: i32 = 21;
1919

2020
/// Enum representing the possible types of servers that the driver can connect to.

src/test/spec/json/server-discovery-and-monitoring/README.rst

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,32 @@ Run the following test(s) on MongoDB 4.4+.
262262
mode: "off",
263263
});
264264

265+
Heartbeat Tests
266+
~~~~~~~~~~~~~~~
267+
268+
1. Test that ``ServerHeartbeatStartedEvent`` is emitted before the monitoring socket was created
269+
270+
#. Create a mock TCP server (example shown below) that pushes a ``client connected`` event to a shared array when a client connects and a ``client hello received`` event when the server receives the client hello and then closes the connection::
271+
272+
let events = [];
273+
server = createServer(clientSocket => {
274+
events.push('client connected');
275+
276+
clientSocket.on('data', () => {
277+
events.push('client hello received');
278+
clientSocket.destroy();
279+
});
280+
});
281+
server.listen(9999);
282+
283+
#. Create a client with ``serverSelectionTimeoutMS: 500`` and listen to ``ServerHeartbeatStartedEvent`` and ``ServerHeartbeatFailedEvent``, pushing the event name to the same shared array as the mock TCP server
284+
285+
#. Attempt to connect client to previously created TCP server, catching the error when the client fails to connect
286+
287+
#. Assert that the first four elements in the array are: ::
288+
289+
['serverHeartbeatStartedEvent', 'client connected', 'client hello received', 'serverHeartbeatFailedEvent']
290+
265291
.. Section for links.
266292
267-
.. _Server Description Equality: /source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#server-description-equality
293+
.. _Server Description Equality: /source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#server-description-equality

src/test/spec/json/server-discovery-and-monitoring/rs/compatible.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"b:27017"
1717
],
1818
"minWireVersion": 0,
19-
"maxWireVersion": 6
19+
"maxWireVersion": 21
2020
}
2121
],
2222
[

src/test/spec/json/server-discovery-and-monitoring/rs/compatible.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ phases: [
1212
setName: "rs",
1313
hosts: ["a:27017", "b:27017"],
1414
minWireVersion: 0,
15-
maxWireVersion: 6
15+
maxWireVersion: 21
1616
}],
1717
["b:27017", {
1818
ok: 1,

src/test/spec/json/server-discovery-and-monitoring/rs/compatible_unknown.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"b:27017"
1717
],
1818
"minWireVersion": 0,
19-
"maxWireVersion": 6
19+
"maxWireVersion": 21
2020
}
2121
]
2222
],

src/test/spec/json/server-discovery-and-monitoring/rs/compatible_unknown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ phases: [
1212
setName: "rs",
1313
hosts: ["a:27017", "b:27017"],
1414
minWireVersion: 0,
15-
maxWireVersion: 6
15+
maxWireVersion: 21
1616
}],
1717
],
1818
outcome: {

src/test/spec/json/server-discovery-and-monitoring/sharded/compatible.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"isWritablePrimary": true,
2424
"msg": "isdbgrid",
2525
"minWireVersion": 0,
26-
"maxWireVersion": 6
26+
"maxWireVersion": 21
2727
}
2828
]
2929
],

src/test/spec/json/server-discovery-and-monitoring/sharded/compatible.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ phases: [
1717
isWritablePrimary: true,
1818
msg: "isdbgrid",
1919
minWireVersion: 0,
20-
maxWireVersion: 6
20+
maxWireVersion: 21
2121
}]
2222
],
2323
outcome: {

src/test/spec/json/server-discovery-and-monitoring/single/compatible.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"helloOk": true,
1212
"isWritablePrimary": true,
1313
"minWireVersion": 0,
14-
"maxWireVersion": 6
14+
"maxWireVersion": 21
1515
}
1616
]
1717
],

src/test/spec/json/server-discovery-and-monitoring/single/compatible.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ phases: [
88
helloOk: true,
99
isWritablePrimary: true,
1010
minWireVersion: 0,
11-
maxWireVersion: 6
11+
maxWireVersion: 21
1212
}]
1313
],
1414
outcome: {

src/test/spec/json/server-discovery-and-monitoring/single/too_old_then_upgraded.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"description": "Standalone with default maxWireVersion of 0 is upgraded to one with maxWireVersion 6",
2+
"description": "Standalone with default maxWireVersion of 0 is upgraded to one with maxWireVersion 21",
33
"uri": "mongodb://a",
44
"phases": [
55
{
@@ -35,7 +35,7 @@
3535
"helloOk": true,
3636
"isWritablePrimary": true,
3737
"minWireVersion": 0,
38-
"maxWireVersion": 6
38+
"maxWireVersion": 21
3939
}
4040
]
4141
],

src/test/spec/json/server-discovery-and-monitoring/single/too_old_then_upgraded.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
description: "Standalone with default maxWireVersion of 0 is upgraded to one with maxWireVersion 6"
1+
description: "Standalone with default maxWireVersion of 0 is upgraded to one with maxWireVersion 21"
22
uri: "mongodb://a"
33
phases: [
44
{
@@ -29,7 +29,7 @@ phases: [
2929
helloOk: true,
3030
isWritablePrimary: true,
3131
minWireVersion: 0,
32-
maxWireVersion: 6
32+
maxWireVersion: 21
3333
}]
3434
],
3535
outcome: {

0 commit comments

Comments
 (0)