Skip to content

Commit 0aab1ee

Browse files
GODRIVER-2099 Set minWireVersion to 6 (MongoDB 3.6) (#1063)
1 parent 4bd2795 commit 0aab1ee

18 files changed

+107
-165
lines changed

.evergreen/config.yml

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,22 +2007,6 @@ axes:
20072007
display_name: "3.6"
20082008
variables:
20092009
VERSION: "3.6"
2010-
- id: "3.4"
2011-
display_name: "3.4"
2012-
variables:
2013-
VERSION: "3.4"
2014-
- id: "3.2"
2015-
display_name: "3.2"
2016-
variables:
2017-
VERSION: "3.2"
2018-
- id: "3.0"
2019-
display_name: "3.0"
2020-
variables:
2021-
VERSION: "3.0"
2022-
- id: "2.6"
2023-
display_name: "2.6"
2024-
variables:
2025-
VERSION: "2.6"
20262010
- id: "rapid"
20272011
display_name: "rapid"
20282012
variables:
@@ -2032,24 +2016,6 @@ axes:
20322016
variables:
20332017
VERSION: "latest"
20342018

2035-
# OSes that support versions of MongoDB >= 2.6 with SSL.
2036-
- id: os-ssl-legacy
2037-
display_name: OS
2038-
values:
2039-
- id: "ubuntu1404-go-1-16"
2040-
display_name: "Ubuntu 14.04"
2041-
run_on: ubuntu1404-test
2042-
variables:
2043-
# The latest Go version available on the Ubuntu 14.04 Evergreen CI image is Go 1.16.
2044-
GO_DIST: "/opt/golang/go1.16"
2045-
# The GCC toolchain that comes with Ubuntu 14.04 is incompatible with the standard binary
2046-
# release of Go 1.16. As a result, Cgo builds on Ubuntu 14.04 fail with a linking error
2047-
# (see https://github.com/golang/go/issues/43996). On Ubuntu 14.04, we only run tests for
2048-
# server v2.6 and 3.X, which don't support client-side encryption. Exclude all build tags
2049-
# to prevent attempting to link the client-side encryption (libmongocrypt) binaries when
2050-
# running Go tests.
2051-
GO_BUILD_TAGS: ""
2052-
20532019
# OSes that require >= 3.2 for SSL
20542020
- id: os-ssl-32
20552021
display_name: OS
@@ -2273,30 +2239,6 @@ buildvariants:
22732239
tasks:
22742240
- name: "test-atlas-data-lake"
22752241

2276-
- matrix_name: "tests-legacy-auth-ssl"
2277-
matrix_spec: { version: ["2.6", "3.0"], os-ssl-legacy: "*" }
2278-
display_name: "${version} ${os-ssl-legacy}"
2279-
tasks:
2280-
- name: ".test !.enterprise-auth !.compression !.mongocryptd"
2281-
2282-
- matrix_name: "tests-legacy-noauth-nossl"
2283-
matrix_spec: { version: ["2.6", "3.0"], os-ssl-32: "*" }
2284-
display_name: "${version} ${os-ssl-32}"
2285-
tasks:
2286-
- name: ".test !.authssl !.enterprise-auth !.compression !.mongocryptd"
2287-
2288-
- matrix_name: "tests-nonlegacy-servers"
2289-
matrix_spec: { version: "3.2", os-ssl-32: "*" }
2290-
display_name: "${version} ${os-ssl-32}"
2291-
tasks:
2292-
- name: ".test !.enterprise-auth !.compression"
2293-
2294-
- matrix_name: "tests-nonlegacy-servers-with-snappy-support"
2295-
matrix_spec: { version: "3.4", os-ssl-32: "*" }
2296-
display_name: "${version} ${os-ssl-32}"
2297-
tasks:
2298-
- name: ".test !.enterprise-auth !.zlib !.zstd"
2299-
23002242
- matrix_name: "tests-36-with-zlib-support"
23012243
matrix_spec: { version: ["3.6"], os-ssl-32: "*" }
23022244
display_name: "${version} ${os-ssl-32}"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The MongoDB supported driver for Go.
2323
## Requirements
2424

2525
- Go 1.10 or higher if using the driver as a dependency. Go 1.18 or higher if building the driver yourself. We aim to support the latest versions of Go.
26-
- MongoDB 2.6 and higher.
26+
- MongoDB 3.6 and higher.
2727

2828
-------------------------
2929
## Installation

mongo/description/server.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func NewServer(addr address.Address, response bson.Raw) Server {
7272
var ok bool
7373
var isReplicaSet, isWritablePrimary, hidden, secondary, arbiterOnly bool
7474
var msg string
75-
var version VersionRange
75+
var versionRange VersionRange
7676
for _, element := range elements {
7777
switch element.Key() {
7878
case "arbiters":
@@ -189,13 +189,13 @@ func NewServer(addr address.Address, response bson.Raw) Server {
189189
}
190190
desc.CanonicalAddr = address.Address(me).Canonicalize()
191191
case "maxWireVersion":
192-
version.Max, ok = element.Value().AsInt32OK()
192+
versionRange.Max, ok = element.Value().AsInt32OK()
193193
if !ok {
194194
desc.LastError = fmt.Errorf("expected 'maxWireVersion' to be an integer but it's a BSON %s", element.Value().Type)
195195
return desc
196196
}
197197
case "minWireVersion":
198-
version.Min, ok = element.Value().AsInt32OK()
198+
versionRange.Min, ok = element.Value().AsInt32OK()
199199
if !ok {
200200
desc.LastError = fmt.Errorf("expected 'minWireVersion' to be an integer but it's a BSON %s", element.Value().Type)
201201
return desc
@@ -321,7 +321,7 @@ func NewServer(addr address.Address, response bson.Raw) Server {
321321
desc.Kind = Mongos
322322
}
323323

324-
desc.WireVersion = &version
324+
desc.WireVersion = &versionRange
325325

326326
return desc
327327
}

testdata/server-discovery-and-monitoring/monitoring/replica_set_with_no_primary.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"b:27017"
2020
],
2121
"minWireVersion": 0,
22-
"maxWireVersion": 4
22+
"maxWireVersion": 6
2323
}
2424
]
2525
],

testdata/server-discovery-and-monitoring/monitoring/replica_set_with_no_primary.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,110 @@
11
description: "Monitoring a topology that is a replica set with no primary connected"
22
uri: "mongodb://a,b"
3-
phases:
4-
-
5-
responses:
6-
-
3+
phases:
4+
-
5+
responses:
6+
-
77
- "a:27017"
8-
-
8+
-
99
ok: 1
1010
helloOk: true
1111
isWritablePrimary: false
1212
secondary: true
1313
setName: "rs"
1414
setVersion: 1
1515
primary: "b:27017"
16-
hosts:
16+
hosts:
1717
- "a:27017"
1818
- "b:27017"
1919
minWireVersion: 0
20-
maxWireVersion: 4
21-
outcome:
22-
events:
23-
-
24-
topology_opening_event:
20+
maxWireVersion: 6
21+
outcome:
22+
events:
23+
-
24+
topology_opening_event:
2525
topologyId: "42"
26-
-
27-
topology_description_changed_event:
26+
-
27+
topology_description_changed_event:
2828
topologyId: "42"
29-
previousDescription:
29+
previousDescription:
3030
topologyType: "Unknown"
3131
servers: []
32-
newDescription:
32+
newDescription:
3333
topologyType: "Unknown"
34-
servers:
35-
-
34+
servers:
35+
-
3636
address: "a:27017"
3737
arbiters: []
3838
hosts: []
3939
passives: []
4040
type: "Unknown"
41-
-
41+
-
4242
address: "b:27017"
4343
arbiters: []
4444
hosts: []
4545
passives: []
4646
type: "Unknown"
47-
-
48-
server_opening_event:
47+
-
48+
server_opening_event:
4949
topologyId: "42"
5050
address: "a:27017"
51-
-
52-
server_opening_event:
51+
-
52+
server_opening_event:
5353
topologyId: "42"
5454
address: "b:27017"
55-
-
56-
server_description_changed_event:
55+
-
56+
server_description_changed_event:
5757
topologyId: "42"
5858
address: "a:27017"
59-
previousDescription:
59+
previousDescription:
6060
address: "a:27017"
6161
arbiters: []
6262
hosts: []
6363
passives: []
6464
type: "Unknown"
65-
newDescription:
65+
newDescription:
6666
address: "a:27017"
6767
arbiters: []
68-
hosts:
68+
hosts:
6969
- "a:27017"
7070
- "b:27017"
7171
passives: []
7272
primary: "b:27017"
7373
setName: "rs"
7474
type: "RSSecondary"
75-
-
76-
topology_description_changed_event:
75+
-
76+
topology_description_changed_event:
7777
topologyId: "42"
78-
previousDescription:
78+
previousDescription:
7979
topologyType: "Unknown"
80-
servers:
81-
-
80+
servers:
81+
-
8282
address: "a:27017"
8383
arbiters: []
8484
hosts: []
8585
passives: []
8686
type: "Unknown"
87-
-
87+
-
8888
address: "b:27017"
8989
arbiters: []
9090
hosts: []
9191
passives: []
9292
type: "Unknown"
93-
newDescription:
93+
newDescription:
9494
topologyType: "ReplicaSetNoPrimary"
9595
setName: "rs"
96-
servers:
97-
-
96+
servers:
97+
-
9898
address: "a:27017"
9999
arbiters: []
100-
hosts:
100+
hosts:
101101
- "a:27017"
102102
- "b:27017"
103103
passives: []
104104
primary: "b:27017"
105105
setName: "rs"
106106
type: "RSSecondary"
107-
-
107+
-
108108
address: "b:27017"
109109
arbiters: []
110110
hosts: []

testdata/server-discovery-and-monitoring/monitoring/replica_set_with_primary.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"b:27017"
1919
],
2020
"minWireVersion": 0,
21-
"maxWireVersion": 4
21+
"maxWireVersion": 6
2222
}
2323
]
2424
],

0 commit comments

Comments
 (0)