Skip to content

Commit 1bdfd8f

Browse files
committed
CDRIVER-4009 bump wire version for 5.0
1 parent 8b6ab76 commit 1bdfd8f

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

src/libmongoc/src/mongoc/mongoc-client-private.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ BSON_BEGIN_DECLS
4343

4444
/* protocol versions this driver can speak */
4545
#define WIRE_VERSION_MIN 3
46-
#define WIRE_VERSION_MAX 9
46+
#define WIRE_VERSION_MAX 13
4747

4848
/* first version that supported "find" and "getMore" commands */
4949
#define WIRE_VERSION_FIND_CMD 4
@@ -92,6 +92,8 @@ BSON_BEGIN_DECLS
9292
#define WIRE_VERSION_HEDGED_READS 9
9393
/* first version to support estimatedDocumentCount with collStats */
9494
#define WIRE_VERSION_4_9 12
95+
/* version corresponding to server 5.0 release */
96+
#define WIRE_VERSION_5_0 13
9597

9698
struct _mongoc_collection_t;
9799

src/libmongoc/tests/test-libmongoc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,6 +2477,7 @@ WIRE_VERSION_CHECKS (6)
24772477
WIRE_VERSION_CHECKS (7)
24782478
WIRE_VERSION_CHECKS (8)
24792479
WIRE_VERSION_CHECKS (9)
2480+
/* wire versions 10, 11, 12 were internal to the 5.0 release cycle */
24802481
WIRE_VERSION_CHECKS (13)
24812482

24822483
int

src/libmongoc/tests/test-libmongoc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ WIRE_VERSION_CHECK_DECLS (6)
188188
WIRE_VERSION_CHECK_DECLS (7)
189189
WIRE_VERSION_CHECK_DECLS (8)
190190
WIRE_VERSION_CHECK_DECLS (9)
191+
/* wire versions 10, 11, 12 were internal to the 5.0 release cycle */
191192
WIRE_VERSION_CHECK_DECLS (13)
192193

193194
#undef WIRE_VERSION_CHECK_DECLS

src/libmongoc/tests/test-mongoc-client.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,8 @@ test_wire_version (void)
842842
mock_server_auto_hello (server,
843843
"{'ok': 1.0,"
844844
" 'isWritablePrimary': true,"
845-
" 'minWireVersion': 10,"
846-
" 'maxWireVersion': 11}");
845+
" 'minWireVersion': 20,"
846+
" 'maxWireVersion': 21}");
847847

848848
mock_server_run (server);
849849
uri = mongoc_uri_copy (mock_server_get_uri (server));

src/libmongoc/tests/test-mongoc-topology.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,8 +1651,8 @@ test_incompatible_error (void)
16511651
mock_server_auto_hello (server,
16521652
"{'ok': 1.0,"
16531653
" 'isWritablePrimary': true,"
1654-
" 'minWireVersion': 10,"
1655-
" 'maxWireVersion': 11}");
1654+
" 'minWireVersion': 20,"
1655+
" 'maxWireVersion': 21}");
16561656

16571657
/* wait until it's time for next heartbeat */
16581658
_mongoc_usleep (600 * 1000);
@@ -1664,7 +1664,7 @@ test_incompatible_error (void)
16641664
NULL,
16651665
&error));
16661666

1667-
msg = bson_strdup_printf ("requires wire version 10, but this version"
1667+
msg = bson_strdup_printf ("requires wire version 20, but this version"
16681668
" of libmongoc only supports up to %d",
16691669
WIRE_VERSION_MAX);
16701670

0 commit comments

Comments
 (0)