diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 0df4bdcef..8d77e58c0 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2031,6 +2031,17 @@ tasks: - func: "attach benchmark test results" - func: "send dashboard data" + - name: "perf-8.0-standalone" + tags: ["perf"] + commands: + - func: "bootstrap mongo-orchestration" + vars: + VERSION: "8.0" + TOPOLOGY: "server" + - func: "run perf tests" + - func: "attach benchmark test results" + - func: "send dashboard data" + - name: "assign-pr-reviewer" tags: ["pr"] allowed_requesters: ["patch", "github_pr"] @@ -3041,6 +3052,7 @@ buildvariants: tasks: - name: "perf-6.0-standalone" - name: "perf-6.0-standalone-ssl" + - name: "perf-8.0-standalone" # Platform notes # i386 builds of OpenSSL or Cyrus SASL are not available diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index ba04e8e41..036b2c4b7 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -96,7 +96,7 @@ jobs: - name: Start MongoDB uses: supercharge/mongodb-github-action@1.10.0 with: - mongodb-version: 4.4 + mongodb-version: '8.0.0-rc4' - name: Run tests run: | hatch run doctest:test diff --git a/doc/api/pymongo/asynchronous/mongo_client.rst b/doc/api/pymongo/asynchronous/mongo_client.rst index afbd802ff..75952f1b6 100644 --- a/doc/api/pymongo/asynchronous/mongo_client.rst +++ b/doc/api/pymongo/asynchronous/mongo_client.rst @@ -35,5 +35,6 @@ .. automethod:: get_database .. automethod:: server_info .. automethod:: watch + .. automethod:: bulk_write .. automethod:: __getitem__ .. automethod:: __getattr__ diff --git a/doc/api/pymongo/mongo_client.rst b/doc/api/pymongo/mongo_client.rst index 37ec8ae00..0409e7ef6 100644 --- a/doc/api/pymongo/mongo_client.rst +++ b/doc/api/pymongo/mongo_client.rst @@ -35,5 +35,6 @@ .. automethod:: get_database .. automethod:: server_info .. automethod:: watch + .. automethod:: bulk_write .. automethod:: __getitem__ .. automethod:: __getattr__ diff --git a/doc/changelog.rst b/doc/changelog.rst index d14a466cd..6a9744cfd 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -16,7 +16,19 @@ PyMongo 4.9 brings a number of improvements including: :class:`~pymongo.asynchronous.cursor.AsyncCursor`, and :class:`~pymongo.asynchronous.command_cursor.AsyncCommandCursor` as an asynchronous-friendly alternative to ``list(cursor)``. - +- Added :meth:`~pymongo.mongo_client.MongoClient.bulk_write` to :class:`~pymongo.mongo_client.MongoClient` + and :class:`~pymongo.asynchronous.mongo_client.AsyncMongoClient`, + enabling users to perform insert, update, and delete operations + against mixed namespaces in a minimized number of round trips. + Please see :doc:`examples/client_bulk` for more information. +- Added support for the ``namespace`` parameter to the + :class:`~pymongo.operations.InsertOne`, + :class:`~pymongo.operations.ReplaceOne`, + :class:`~pymongo.operations.UpdateOne`, + :class:`~pymongo.operations.UpdateMany`, + :class:`~pymongo.operations.DeleteOne`, and + :class:`~pymongo.operations.DeleteMany` operations, so + they can be used in the new :meth:`~pymongo.mongo_client.MongoClient.bulk_write`. Issues Resolved ............... diff --git a/doc/examples/client_bulk.rst b/doc/examples/client_bulk.rst new file mode 100644 index 000000000..d2b4a70e2 --- /dev/null +++ b/doc/examples/client_bulk.rst @@ -0,0 +1,188 @@ +Client Bulk Write Operations +============================= + +.. testsetup:: + + from pymongo import MongoClient + + client = MongoClient() + client.drop_database("client_bulk_example") + db = client.client_bulk_example + client.db.drop_collection("test_one") + client.db.drop_collection("test_two") + client.db.drop_collection("test_three") + client.db.drop_collection("test_four") + client.db.drop_collection("test_five") + client.db.drop_collection("test_six") + +The :meth:`~pymongo.mongo_client.MongoClient.bulk_write` +method has been added to :class:`~pymongo.mongo_client.MongoClient` in PyMongo 4.9. +This method enables users to perform batches of write operations **across +multiple namespaces** in a minimized number of round trips, and +to receive detailed results for each operation performed. + +.. note:: This method requires MongoDB server version 8.0+. + +Basic Usage +------------ + +A list of insert, update, and delete operations can be passed into the +:meth:`~pymongo.mongo_client.MongoClient.bulk_write` method. Each request +must include the namespace on which to perform the operation. + +PyMongo will automatically split the given requests into smaller sub-batches based on +the maximum message size accepted by MongoDB, supporting very large bulk write operations. + +The return value is an instance of +:class:`~pymongo.results.ClientBulkWriteResult`. + +.. _summary_client_bulk: + +Summary Results +................. + +By default, the returned :class:`~pymongo.results.ClientBulkWriteResult` instance will contain a +summary of the types of operations performed in the bulk write, along with their respective counts. + +.. doctest:: + :options: +NORMALIZE_WHITESPACE + + >>> from pymongo import InsertOne, DeleteOne, UpdateOne + >>> models = [ + ... InsertOne(namespace="db.test_one", document={"_id": 1}), + ... InsertOne(namespace="db.test_two", document={"_id": 2}), + ... DeleteOne(namespace="db.test_one", filter={"_id": 1}), + ... UpdateOne( + ... namespace="db.test_two", + ... filter={"_id": 4}, + ... update={"$inc": {"j": 1}}, + ... upsert=True, + ... ), + ... ] + >>> result = client.bulk_write(models) + >>> result.inserted_count + 2 + >>> result.deleted_count + 1 + >>> result.modified_count + 0 + >>> result.upserted_count + 1 + +.. _verbose_client_bulk: + +Verbose Results +................. + +If the ``verbose_results`` parameter is set to True, the returned :class:`~pymongo.results.ClientBulkWriteResult` +instance will also include detailed results about each successful operation performed as part of the bulk write. + +.. doctest:: + :options: +NORMALIZE_WHITESPACE + + >>> from pymongo import InsertOne, DeleteMany, ReplaceOne, UpdateMany + >>> models = [ + ... DeleteMany( + ... namespace="db.test_two", filter={} + ... ), # Delete all documents from the previous example + ... InsertOne(namespace="db.test_one", document={"_id": 1}), + ... InsertOne(namespace="db.test_one", document={"_id": 2}), + ... InsertOne(namespace="db.test_two", document={"_id": 3}), + ... UpdateMany(namespace="db.test_one", filter={}, update={"$set": {"foo": "bar"}}), + ... ReplaceOne( + ... namespace="db.test_two", filter={"j": 1}, replacement={"_id": 4}, upsert=True + ... ), + ... ] + >>> result = client.bulk_write(models, verbose_results=True) + >>> result.delete_results + {0: DeleteResult({'ok': 1.0, 'idx': 0, 'n': 2}, ...)} + >>> result.insert_results + {1: InsertOneResult(1, ...), + 2: InsertOneResult(2, ...), + 3: InsertOneResult(3, ...)} + >>> result.update_results + {4: UpdateResult({'ok': 1.0, 'idx': 4, 'n': 2, 'nModified': 2}, ...), + 5: UpdateResult({'ok': 1.0, 'idx': 5, 'n': 1, 'nModified': 0, 'upserted': {'_id': 4}}, ...)} + + +Handling Errors +---------------- + +If any errors occur during the bulk write, a :class:`~pymongo.errors.ClientBulkWriteException` will be raised. +If a server, connection, or network error occurred, the ``error`` field of the exception will contain +that error. + +Individual write errors or write concern errors get recorded in the ``write_errors`` and ``write_concern_errors`` fields of the exception. +The ``partial_result`` field gets populated with the results of any operations that were successfully completed before the exception was raised. + +.. _ordered_client_bulk: + +Ordered Operations +.................... + +In an ordered bulk write (the default), if an individual write fails, no further operations will get executed. +For example, a duplicate key error on the third operation below aborts the remaining two operations. + +.. doctest:: + :options: +NORMALIZE_WHITESPACE + + >>> from pymongo import InsertOne, DeleteOne + >>> from pymongo.errors import ClientBulkWriteException + >>> models = [ + ... InsertOne(namespace="db.test_three", document={"_id": 3}), + ... InsertOne(namespace="db.test_four", document={"_id": 4}), + ... InsertOne(namespace="db.test_three", document={"_id": 3}), # Duplicate _id + ... InsertOne(namespace="db.test_four", document={"_id": 5}), + ... DeleteOne(namespace="db.test_three", filter={"_id": 3}), + ... ] + >>> try: + ... client.bulk_write(models) + ... except ClientBulkWriteException as cbwe: + ... exception = cbwe + ... + >>> exception.write_errors + [{'ok': 0.0, + 'idx': 2, + 'code': 11000, + 'errmsg': 'E11000 duplicate key error ... dup key: { _id: 3 }', ... + 'op': {'insert': 'db.test_three', 'document': {'_id': 3}}}] + >>> exception.partial_result.inserted_count + 2 + >>> exception.partial_result.deleted_count + 0 + +.. _unordered_client_bulk: + +Unordered Operations +..................... + +If the ``ordered`` parameter is set to False, all operations in the bulk write will be attempted, regardless of any individual write errors that occur. +For example, the fourth and fifth write operations below get executed successfully, despite the duplicate key error on the third operation. + +.. doctest:: + :options: +NORMALIZE_WHITESPACE + + >>> from pymongo import InsertOne, DeleteOne + >>> from pymongo.errors import ClientBulkWriteException + >>> models = [ + ... InsertOne(namespace="db.test_five", document={"_id": 5}), + ... InsertOne(namespace="db.test_six", document={"_id": 6}), + ... InsertOne(namespace="db.test_five", document={"_id": 5}), # Duplicate _id + ... InsertOne(namespace="db.test_six", document={"_id": 7}), + ... DeleteOne(namespace="db.test_five", filter={"_id": 5}), + ... ] + >>> try: + ... client.bulk_write(models, ordered=False) + ... except ClientBulkWriteException as cbwe: + ... exception = cbwe + ... + >>> exception.write_errors + [{'ok': 0.0, + 'idx': 2, + 'code': 11000, + 'errmsg': 'E11000 duplicate key error ... dup key: { _id: 5 }', ... + 'op': {'insert': 'db.test_five', 'document': {'_id': 5}}}] + >>> exception.partial_result.inserted_count + 3 + >>> exception.partial_result.deleted_count + 1 diff --git a/doc/examples/index.rst b/doc/examples/index.rst index 75d208f20..ac450470e 100644 --- a/doc/examples/index.rst +++ b/doc/examples/index.rst @@ -22,6 +22,7 @@ MongoDB, you can start it like so: copydb custom_type bulk + client_bulk datetimes geo gevent diff --git a/pymongo/asynchronous/client_bulk.py b/pymongo/asynchronous/client_bulk.py index 671d989c2..1f3cca2f6 100644 --- a/pymongo/asynchronous/client_bulk.py +++ b/pymongo/asynchronous/client_bulk.py @@ -550,7 +550,8 @@ class _AsyncClientBulk: if result.get("error"): error = result["error"] retryable_top_level_error = ( - isinstance(error.details, dict) + hasattr(error, "details") + and isinstance(error.details, dict) and error.details.get("code", 0) in _RETRYABLE_ERROR_CODES ) retryable_network_error = isinstance( diff --git a/pymongo/asynchronous/mongo_client.py b/pymongo/asynchronous/mongo_client.py index fbbd9a4ee..e1a9d7735 100644 --- a/pymongo/asynchronous/mongo_client.py +++ b/pymongo/asynchronous/mongo_client.py @@ -2274,8 +2274,8 @@ class AsyncMongoClient(common.BaseObject, Generic[_DocumentType]): 1 >>> result.modified_count 0 - >>> result.upserted_ids - {3: ObjectId('54f62ee28891e756a6e1abd5')} + >>> result.upserted_count + 1 >>> async for doc in db.test.find({}): ... print(doc) ... @@ -2312,6 +2312,8 @@ class AsyncMongoClient(common.BaseObject, Generic[_DocumentType]): :return: An instance of :class:`~pymongo.results.ClientBulkWriteResult`. + .. seealso:: For more info, see :doc:`/examples/client_bulk`. + .. seealso:: :ref:`writes-and-ids` .. note:: requires MongoDB server version 8.0+. @@ -2562,7 +2564,9 @@ class _ClientConnectionRetryable(Generic[T]): if not self._retryable: raise if isinstance(exc, ClientBulkWriteException) and exc.error: - retryable_write_error_exc = exc.error.has_error_label("RetryableWriteError") + retryable_write_error_exc = isinstance( + exc.error, PyMongoError + ) and exc.error.has_error_label("RetryableWriteError") else: retryable_write_error_exc = exc.has_error_label("RetryableWriteError") if retryable_write_error_exc: diff --git a/pymongo/errors.py b/pymongo/errors.py index 1c51708c7..2cd1081e3 100644 --- a/pymongo/errors.py +++ b/pymongo/errors.py @@ -342,10 +342,10 @@ class ClientBulkWriteException(OperationFailure): return self.details.get("writeConcernErrors", []) @property - def write_errors(self) -> Optional[Mapping[int, WriteError]]: + def write_errors(self) -> Optional[list[WriteError]]: """Errors that occurred during the execution of individual write operations. - This map will contain at most one entry if the bulk write was ordered. + This list will contain at most one entry if the bulk write was ordered. """ return self.details.get("writeErrors", {}) diff --git a/pymongo/message.py b/pymongo/message.py index 90fac8545..6a21409c5 100644 --- a/pymongo/message.py +++ b/pymongo/message.py @@ -985,11 +985,10 @@ _OP_MSG_OVERHEAD = 1000 def _client_construct_op_msg( - command: Mapping[str, Any], - to_send_ops: list[Mapping[str, Any]], - to_send_ns: list[Mapping[str, Any]], + command_encoded: bytes, + to_send_ops_encoded: list[bytes], + to_send_ns_encoded: list[bytes], ack: bool, - opts: CodecOptions, buf: _BytesIO, ) -> int: # Write flags @@ -998,7 +997,7 @@ def _client_construct_op_msg( # Type 0 Section buf.write(b"\x00") - buf.write(_dict_to_bson(command, False, opts)) + buf.write(command_encoded) # Type 1 Section for ops buf.write(b"\x01") @@ -1007,8 +1006,8 @@ def _client_construct_op_msg( buf.write(b"\x00\x00\x00\x00") buf.write(b"ops\x00") # Write all the ops documents - for op in to_send_ops: - buf.write(_dict_to_bson(op, False, opts)) + for op_encoded in to_send_ops_encoded: + buf.write(op_encoded) resume_location = buf.tell() # Write type 1 section size length = buf.tell() @@ -1023,8 +1022,8 @@ def _client_construct_op_msg( buf.write(b"\x00\x00\x00\x00") buf.write(b"nsInfo\x00") # Write all the nsInfo documents - for ns in to_send_ns: - buf.write(_dict_to_bson(ns, False, opts)) + for ns_encoded in to_send_ns_encoded: + buf.write(ns_encoded) # Write type 1 section size length = buf.tell() buf.seek(size_location) @@ -1045,19 +1044,23 @@ def _client_batched_op_msg_impl( def _check_doc_size_limits( op_type: str, - document: Mapping[str, Any], + doc_size: int, limit: int, - ) -> int: - doc_size = len(_dict_to_bson(document, False, opts)) + ) -> None: if doc_size > limit: _raise_document_too_large(op_type, doc_size, limit) - return doc_size max_bson_size = ctx.max_bson_size max_write_batch_size = ctx.max_write_batch_size max_message_size = ctx.max_message_size - # Don't include bulkWrite-command-agnostic fields in document size calculations. + command_encoded = _dict_to_bson(command, False, opts) + # When OP_MSG is used unacknowledged we have to check command + # document size client-side or applications won't be notified. + if not ack: + _check_doc_size_limits("bulkWrite", len(command_encoded), max_bson_size + _COMMAND_OVERHEAD) + + # Don't include bulkWrite-command-agnostic fields in batch-splitting calculations. abridged_keys = ["bulkWrite", "errorsOnly", "ordered"] if command.get("bypassDocumentValidation"): abridged_keys.append("bypassDocumentValidation") @@ -1068,17 +1071,14 @@ def _client_batched_op_msg_impl( command_abridged = {key: command[key] for key in abridged_keys} command_len_abridged = len(_dict_to_bson(command_abridged, False, opts)) - # When OP_MSG is used unacknowledged we have to check command - # document size client-side or applications won't be notified. - if not ack: - _check_doc_size_limits("bulkWrite", command_abridged, max_bson_size + _COMMAND_OVERHEAD) - # Maximum combined size of the ops and nsInfo document sequences. max_doc_sequences_bytes = max_message_size - (_OP_MSG_OVERHEAD + command_len_abridged) ns_info = {} to_send_ops: list[Mapping[str, Any]] = [] to_send_ns: list[Mapping[str, int]] = [] + to_send_ops_encoded: list[bytes] = [] + to_send_ns_encoded: list[bytes] = [] total_ops_length = 0 total_ns_length = 0 idx = 0 @@ -1088,11 +1088,13 @@ def _client_batched_op_msg_impl( # Check insert/replace document size if unacknowledged. if real_op_type == "insert": if not ack: - _check_doc_size_limits(real_op_type, op_doc["document"], max_bson_size) + doc_size = len(_dict_to_bson(op_doc["document"], False, opts)) + _check_doc_size_limits(real_op_type, doc_size, max_bson_size) if real_op_type == "replace": op_type = "update" if not ack: - _check_doc_size_limits(real_op_type, op_doc["updateMods"], max_bson_size) + doc_size = len(_dict_to_bson(op_doc["updateMods"], False, opts)) + _check_doc_size_limits(real_op_type, doc_size, max_bson_size) ns_doc_to_send = None ns_length = 0 @@ -1108,30 +1110,40 @@ def _client_batched_op_msg_impl( op_doc_to_send[op_type] = ns_info[namespace] # type: ignore[index] # Encode current operation doc and, if newly added, namespace doc. - op_length = len(_dict_to_bson(op_doc_to_send, False, opts)) + op_doc_encoded = _dict_to_bson(op_doc_to_send, False, opts) + op_length = len(op_doc_encoded) if ns_doc_to_send: - ns_length = len(_dict_to_bson(ns_doc_to_send, False, opts)) + ns_doc_encoded = _dict_to_bson(ns_doc_to_send, False, opts) + ns_length = len(ns_doc_encoded) # Check operation document size if unacknowledged. if not ack: - _check_doc_size_limits(op_type, op_doc_to_send, max_bson_size + _COMMAND_OVERHEAD) + _check_doc_size_limits(op_type, op_length, max_bson_size + _COMMAND_OVERHEAD) new_message_size = total_ops_length + total_ns_length + op_length + ns_length # We have enough data, return this batch. if new_message_size > max_doc_sequences_bytes: break + + # Add op and ns documents to this batch. to_send_ops.append(op_doc_to_send) + to_send_ops_encoded.append(op_doc_encoded) total_ops_length += op_length if ns_doc_to_send: to_send_ns.append(ns_doc_to_send) + to_send_ns_encoded.append(ns_doc_encoded) total_ns_length += ns_length + idx += 1 + # We have enough documents, return this batch. if idx == max_write_batch_size: break # Construct the entire OP_MSG. - length = _client_construct_op_msg(command, to_send_ops, to_send_ns, ack, opts, buf) + length = _client_construct_op_msg( + command_encoded, to_send_ops_encoded, to_send_ns_encoded, ack, buf + ) return to_send_ops, to_send_ns, length diff --git a/pymongo/synchronous/client_bulk.py b/pymongo/synchronous/client_bulk.py index 229abd433..5f969804d 100644 --- a/pymongo/synchronous/client_bulk.py +++ b/pymongo/synchronous/client_bulk.py @@ -548,7 +548,8 @@ class _ClientBulk: if result.get("error"): error = result["error"] retryable_top_level_error = ( - isinstance(error.details, dict) + hasattr(error, "details") + and isinstance(error.details, dict) and error.details.get("code", 0) in _RETRYABLE_ERROR_CODES ) retryable_network_error = isinstance( diff --git a/pymongo/synchronous/mongo_client.py b/pymongo/synchronous/mongo_client.py index 186316562..287ad6af7 100644 --- a/pymongo/synchronous/mongo_client.py +++ b/pymongo/synchronous/mongo_client.py @@ -2263,8 +2263,8 @@ class MongoClient(common.BaseObject, Generic[_DocumentType]): 1 >>> result.modified_count 0 - >>> result.upserted_ids - {3: ObjectId('54f62ee28891e756a6e1abd5')} + >>> result.upserted_count + 1 >>> for doc in db.test.find({}): ... print(doc) ... @@ -2301,6 +2301,8 @@ class MongoClient(common.BaseObject, Generic[_DocumentType]): :return: An instance of :class:`~pymongo.results.ClientBulkWriteResult`. + .. seealso:: For more info, see :doc:`/examples/client_bulk`. + .. seealso:: :ref:`writes-and-ids` .. note:: requires MongoDB server version 8.0+. @@ -2549,7 +2551,9 @@ class _ClientConnectionRetryable(Generic[T]): if not self._retryable: raise if isinstance(exc, ClientBulkWriteException) and exc.error: - retryable_write_error_exc = exc.error.has_error_label("RetryableWriteError") + retryable_write_error_exc = isinstance( + exc.error, PyMongoError + ) and exc.error.has_error_label("RetryableWriteError") else: retryable_write_error_exc = exc.has_error_label("RetryableWriteError") if retryable_write_error_exc: diff --git a/test/asynchronous/test_client_bulk_write.py b/test/asynchronous/test_client_bulk_write.py index eea0b4e8e..20e6ab7c9 100644 --- a/test/asynchronous/test_client_bulk_write.py +++ b/test/asynchronous/test_client_bulk_write.py @@ -19,12 +19,18 @@ import sys sys.path[0:0] = [""] -from test.asynchronous import AsyncIntegrationTest, async_client_context, unittest +from test.asynchronous import ( + AsyncIntegrationTest, + async_client_context, + unittest, +) from test.utils import ( OvertCommandListener, async_rs_or_single_client, ) +from unittest.mock import patch +from pymongo.asynchronous.client_bulk import _AsyncClientBulk from pymongo.encryption_options import _HAVE_PYMONGOCRYPT, AutoEncryptionOpts from pymongo.errors import ( ClientBulkWriteException, @@ -53,6 +59,20 @@ class TestClientBulkWrite(AsyncIntegrationTest): context.exception._message, ) + @async_client_context.require_version_min(8, 0, 0, -24) + async def test_handles_non_pymongo_error(self): + with patch.object( + _AsyncClientBulk, "write_command", return_value={"error": TypeError("mock type error")} + ): + client = await async_rs_or_single_client() + self.addAsyncCleanup(client.close) + + models = [InsertOne(namespace="db.coll", document={"a": "b"})] + with self.assertRaises(ClientBulkWriteException) as context: + await client.bulk_write(models=models) + self.assertIsInstance(context.exception.error, TypeError) + self.assertFalse(hasattr(context.exception.error, "details")) + # https://github.com/mongodb/specifications/tree/master/source/crud/tests class TestClientBulkWriteCRUD(AsyncIntegrationTest): diff --git a/test/discovery_and_monitoring/rs/discover_arbiters.json b/test/discovery_and_monitoring/rs/discover_arbiters.json index 53709b0ce..803462b15 100644 --- a/test/discovery_and_monitoring/rs/discover_arbiters.json +++ b/test/discovery_and_monitoring/rs/discover_arbiters.json @@ -18,7 +18,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_arbiters_replicaset.json b/test/discovery_and_monitoring/rs/discover_arbiters_replicaset.json index 64fb49f4f..e58d7c7fb 100644 --- a/test/discovery_and_monitoring/rs/discover_arbiters_replicaset.json +++ b/test/discovery_and_monitoring/rs/discover_arbiters_replicaset.json @@ -18,7 +18,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_ghost.json b/test/discovery_and_monitoring/rs/discover_ghost.json index 2e24c83e0..3b7fc836e 100644 --- a/test/discovery_and_monitoring/rs/discover_ghost.json +++ b/test/discovery_and_monitoring/rs/discover_ghost.json @@ -12,7 +12,7 @@ "isWritablePrimary": false, "isreplicaset": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_ghost_replicaset.json b/test/discovery_and_monitoring/rs/discover_ghost_replicaset.json index cf5fe83a5..1a8457983 100644 --- a/test/discovery_and_monitoring/rs/discover_ghost_replicaset.json +++ b/test/discovery_and_monitoring/rs/discover_ghost_replicaset.json @@ -12,7 +12,7 @@ "isWritablePrimary": false, "isreplicaset": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_hidden.json b/test/discovery_and_monitoring/rs/discover_hidden.json index e4a90f1f9..10bd51ede 100644 --- a/test/discovery_and_monitoring/rs/discover_hidden.json +++ b/test/discovery_and_monitoring/rs/discover_hidden.json @@ -18,7 +18,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_hidden_replicaset.json b/test/discovery_and_monitoring/rs/discover_hidden_replicaset.json index 04420596f..63cf55867 100644 --- a/test/discovery_and_monitoring/rs/discover_hidden_replicaset.json +++ b/test/discovery_and_monitoring/rs/discover_hidden_replicaset.json @@ -18,7 +18,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_passives.json b/test/discovery_and_monitoring/rs/discover_passives.json index 30258409f..0a292c675 100644 --- a/test/discovery_and_monitoring/rs/discover_passives.json +++ b/test/discovery_and_monitoring/rs/discover_passives.json @@ -18,7 +18,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -56,7 +56,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_passives_replicaset.json b/test/discovery_and_monitoring/rs/discover_passives_replicaset.json index 266eaa523..c48fd4762 100644 --- a/test/discovery_and_monitoring/rs/discover_passives_replicaset.json +++ b/test/discovery_and_monitoring/rs/discover_passives_replicaset.json @@ -18,7 +18,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -56,7 +56,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_primary.json b/test/discovery_and_monitoring/rs/discover_primary.json index 2d1292bbd..04e7a4984 100644 --- a/test/discovery_and_monitoring/rs/discover_primary.json +++ b/test/discovery_and_monitoring/rs/discover_primary.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_primary_replicaset.json b/test/discovery_and_monitoring/rs/discover_primary_replicaset.json index 54dfefba5..3cdcfdcee 100644 --- a/test/discovery_and_monitoring/rs/discover_primary_replicaset.json +++ b/test/discovery_and_monitoring/rs/discover_primary_replicaset.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_rsother.json b/test/discovery_and_monitoring/rs/discover_rsother.json index 4ab25667f..9c3b8d8b7 100644 --- a/test/discovery_and_monitoring/rs/discover_rsother.json +++ b/test/discovery_and_monitoring/rs/discover_rsother.json @@ -17,7 +17,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_rsother_replicaset.json b/test/discovery_and_monitoring/rs/discover_rsother_replicaset.json index e3958d70a..3da9efb06 100644 --- a/test/discovery_and_monitoring/rs/discover_rsother_replicaset.json +++ b/test/discovery_and_monitoring/rs/discover_rsother_replicaset.json @@ -18,7 +18,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -34,7 +34,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_secondary.json b/test/discovery_and_monitoring/rs/discover_secondary.json index 22325d4e0..64a1ce31e 100644 --- a/test/discovery_and_monitoring/rs/discover_secondary.json +++ b/test/discovery_and_monitoring/rs/discover_secondary.json @@ -17,7 +17,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discover_secondary_replicaset.json b/test/discovery_and_monitoring/rs/discover_secondary_replicaset.json index d903b6444..d230f976a 100644 --- a/test/discovery_and_monitoring/rs/discover_secondary_replicaset.json +++ b/test/discovery_and_monitoring/rs/discover_secondary_replicaset.json @@ -17,7 +17,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/discovery.json b/test/discovery_and_monitoring/rs/discovery.json index 50e126922..e9deaa758 100644 --- a/test/discovery_and_monitoring/rs/discovery.json +++ b/test/discovery_and_monitoring/rs/discovery.json @@ -18,7 +18,7 @@ "c:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -59,7 +59,7 @@ "d:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -103,7 +103,7 @@ "e:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -147,7 +147,7 @@ "c:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/equal_electionids.json b/test/discovery_and_monitoring/rs/equal_electionids.json index 17df3207f..f1deedf9f 100644 --- a/test/discovery_and_monitoring/rs/equal_electionids.json +++ b/test/discovery_and_monitoring/rs/equal_electionids.json @@ -20,7 +20,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -39,7 +39,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/hosts_differ_from_seeds.json b/test/discovery_and_monitoring/rs/hosts_differ_from_seeds.json index 4e02304c6..085e81e26 100644 --- a/test/discovery_and_monitoring/rs/hosts_differ_from_seeds.json +++ b/test/discovery_and_monitoring/rs/hosts_differ_from_seeds.json @@ -15,7 +15,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/incompatible_arbiter.json b/test/discovery_and_monitoring/rs/incompatible_arbiter.json index f0539cb33..bda18d9f6 100644 --- a/test/discovery_and_monitoring/rs/incompatible_arbiter.json +++ b/test/discovery_and_monitoring/rs/incompatible_arbiter.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ diff --git a/test/discovery_and_monitoring/rs/incompatible_ghost.json b/test/discovery_and_monitoring/rs/incompatible_ghost.json index 824e953f9..9d82e3168 100644 --- a/test/discovery_and_monitoring/rs/incompatible_ghost.json +++ b/test/discovery_and_monitoring/rs/incompatible_ghost.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ diff --git a/test/discovery_and_monitoring/rs/incompatible_other.json b/test/discovery_and_monitoring/rs/incompatible_other.json index 6f301ef5d..149ba0114 100644 --- a/test/discovery_and_monitoring/rs/incompatible_other.json +++ b/test/discovery_and_monitoring/rs/incompatible_other.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ diff --git a/test/discovery_and_monitoring/rs/ls_timeout.json b/test/discovery_and_monitoring/rs/ls_timeout.json index 96389d3b7..c68790ddf 100644 --- a/test/discovery_and_monitoring/rs/ls_timeout.json +++ b/test/discovery_and_monitoring/rs/ls_timeout.json @@ -20,7 +20,7 @@ "setName": "rs", "logicalSessionTimeoutMinutes": 3, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -58,7 +58,7 @@ "isWritablePrimary": false, "isreplicaset": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -104,7 +104,7 @@ "setName": "rs", "arbiterOnly": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -152,7 +152,7 @@ "setName": "rs", "logicalSessionTimeoutMinutes": 2, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -194,7 +194,7 @@ "hidden": true, "logicalSessionTimeoutMinutes": 1, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -244,7 +244,7 @@ "setName": "rs", "logicalSessionTimeoutMinutes": null, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/member_reconfig.json b/test/discovery_and_monitoring/rs/member_reconfig.json index 0e2c2c462..a05fed0ef 100644 --- a/test/discovery_and_monitoring/rs/member_reconfig.json +++ b/test/discovery_and_monitoring/rs/member_reconfig.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -49,7 +49,7 @@ "a:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/member_standalone.json b/test/discovery_and_monitoring/rs/member_standalone.json index 0756003a8..db100db9f 100644 --- a/test/discovery_and_monitoring/rs/member_standalone.json +++ b/test/discovery_and_monitoring/rs/member_standalone.json @@ -11,7 +11,7 @@ "helloOk": true, "isWritablePrimary": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -40,7 +40,7 @@ "a:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/new_primary.json b/test/discovery_and_monitoring/rs/new_primary.json index ed1a6245f..1a84c69c9 100644 --- a/test/discovery_and_monitoring/rs/new_primary.json +++ b/test/discovery_and_monitoring/rs/new_primary.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -50,7 +50,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/new_primary_new_electionid.json b/test/discovery_and_monitoring/rs/new_primary_new_electionid.json index ccb3a41f7..509720d44 100644 --- a/test/discovery_and_monitoring/rs/new_primary_new_electionid.json +++ b/test/discovery_and_monitoring/rs/new_primary_new_electionid.json @@ -20,7 +20,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -67,7 +67,7 @@ "$oid": "000000000000000000000002" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -114,7 +114,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/new_primary_new_setversion.json b/test/discovery_and_monitoring/rs/new_primary_new_setversion.json index 415a0f66a..96533c61e 100644 --- a/test/discovery_and_monitoring/rs/new_primary_new_setversion.json +++ b/test/discovery_and_monitoring/rs/new_primary_new_setversion.json @@ -20,7 +20,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -67,7 +67,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -114,7 +114,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/new_primary_wrong_set_name.json b/test/discovery_and_monitoring/rs/new_primary_wrong_set_name.json index d7b19cfe8..774b3a573 100644 --- a/test/discovery_and_monitoring/rs/new_primary_wrong_set_name.json +++ b/test/discovery_and_monitoring/rs/new_primary_wrong_set_name.json @@ -16,7 +16,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -49,7 +49,7 @@ ], "setName": "wrong", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/non_rs_member.json b/test/discovery_and_monitoring/rs/non_rs_member.json index 538077ef0..6bf10bd62 100644 --- a/test/discovery_and_monitoring/rs/non_rs_member.json +++ b/test/discovery_and_monitoring/rs/non_rs_member.json @@ -10,7 +10,7 @@ "ok": 1, "helloOk": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/normalize_case.json b/test/discovery_and_monitoring/rs/normalize_case.json index 96a944f0c..62915495e 100644 --- a/test/discovery_and_monitoring/rs/normalize_case.json +++ b/test/discovery_and_monitoring/rs/normalize_case.json @@ -21,7 +21,7 @@ "C:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/normalize_case_me.json b/test/discovery_and_monitoring/rs/normalize_case_me.json index ab1720cef..0d9ba6213 100644 --- a/test/discovery_and_monitoring/rs/normalize_case_me.json +++ b/test/discovery_and_monitoring/rs/normalize_case_me.json @@ -22,7 +22,7 @@ "C:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -67,7 +67,7 @@ "C:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/null_election_id-pre-6.0.json b/test/discovery_and_monitoring/rs/null_election_id-pre-6.0.json index f1fa2e252..9e7ccc6e7 100644 --- a/test/discovery_and_monitoring/rs/null_election_id-pre-6.0.json +++ b/test/discovery_and_monitoring/rs/null_election_id-pre-6.0.json @@ -18,7 +18,7 @@ "setVersion": 1, "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 7 } ] ], @@ -66,7 +66,7 @@ "$oid": "000000000000000000000002" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -116,7 +116,7 @@ "setVersion": 1, "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 7 } ] ], @@ -167,7 +167,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 7 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_becomes_ghost.json b/test/discovery_and_monitoring/rs/primary_becomes_ghost.json index 9c54b3985..e34280e88 100644 --- a/test/discovery_and_monitoring/rs/primary_becomes_ghost.json +++ b/test/discovery_and_monitoring/rs/primary_becomes_ghost.json @@ -15,7 +15,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -41,7 +41,7 @@ "isWritablePrimary": false, "isreplicaset": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_becomes_mongos.json b/test/discovery_and_monitoring/rs/primary_becomes_mongos.json index ac416e57d..79510d939 100644 --- a/test/discovery_and_monitoring/rs/primary_becomes_mongos.json +++ b/test/discovery_and_monitoring/rs/primary_becomes_mongos.json @@ -15,7 +15,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -41,7 +41,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_becomes_standalone.json b/test/discovery_and_monitoring/rs/primary_becomes_standalone.json index a64524d0c..abcc1e2d0 100644 --- a/test/discovery_and_monitoring/rs/primary_becomes_standalone.json +++ b/test/discovery_and_monitoring/rs/primary_becomes_standalone.json @@ -15,7 +15,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -38,7 +38,7 @@ { "ok": 1, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_changes_set_name.json b/test/discovery_and_monitoring/rs/primary_changes_set_name.json index bf70ca301..3b564d2c9 100644 --- a/test/discovery_and_monitoring/rs/primary_changes_set_name.json +++ b/test/discovery_and_monitoring/rs/primary_changes_set_name.json @@ -15,7 +15,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -44,7 +44,7 @@ ], "setName": "wrong", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_disconnect.json b/test/discovery_and_monitoring/rs/primary_disconnect.json index 3db854f08..73a01a82a 100644 --- a/test/discovery_and_monitoring/rs/primary_disconnect.json +++ b/test/discovery_and_monitoring/rs/primary_disconnect.json @@ -15,7 +15,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_disconnect_electionid.json b/test/discovery_and_monitoring/rs/primary_disconnect_electionid.json index 3a80b150f..5a91188ea 100644 --- a/test/discovery_and_monitoring/rs/primary_disconnect_electionid.json +++ b/test/discovery_and_monitoring/rs/primary_disconnect_electionid.json @@ -20,7 +20,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -39,7 +39,7 @@ "$oid": "000000000000000000000002" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -115,7 +115,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -159,7 +159,7 @@ "$oid": "000000000000000000000003" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -203,7 +203,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_disconnect_setversion.json b/test/discovery_and_monitoring/rs/primary_disconnect_setversion.json index 32e03fb7d..f7417ad77 100644 --- a/test/discovery_and_monitoring/rs/primary_disconnect_setversion.json +++ b/test/discovery_and_monitoring/rs/primary_disconnect_setversion.json @@ -20,7 +20,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -39,7 +39,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -115,7 +115,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -159,7 +159,7 @@ "$oid": "000000000000000000000002" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -203,7 +203,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_hint_from_secondary_with_mismatched_me.json b/test/discovery_and_monitoring/rs/primary_hint_from_secondary_with_mismatched_me.json index bc02cc957..1ca72225a 100644 --- a/test/discovery_and_monitoring/rs/primary_hint_from_secondary_with_mismatched_me.json +++ b/test/discovery_and_monitoring/rs/primary_hint_from_secondary_with_mismatched_me.json @@ -18,7 +18,7 @@ "setName": "rs", "primary": "b:27017", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -48,7 +48,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_mismatched_me.json b/test/discovery_and_monitoring/rs/primary_mismatched_me.json index 2d2c0f40d..6bb6226f8 100644 --- a/test/discovery_and_monitoring/rs/primary_mismatched_me.json +++ b/test/discovery_and_monitoring/rs/primary_mismatched_me.json @@ -31,7 +31,7 @@ "ok": 1, "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ] diff --git a/test/discovery_and_monitoring/rs/primary_reports_new_member.json b/test/discovery_and_monitoring/rs/primary_reports_new_member.json index ac0d9374f..ed28c48c8 100644 --- a/test/discovery_and_monitoring/rs/primary_reports_new_member.json +++ b/test/discovery_and_monitoring/rs/primary_reports_new_member.json @@ -17,7 +17,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -51,7 +51,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -86,7 +86,7 @@ "c:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -127,7 +127,7 @@ "c:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_to_no_primary_mismatched_me.json b/test/discovery_and_monitoring/rs/primary_to_no_primary_mismatched_me.json index 6dbd73dad..798a648d1 100644 --- a/test/discovery_and_monitoring/rs/primary_to_no_primary_mismatched_me.json +++ b/test/discovery_and_monitoring/rs/primary_to_no_primary_mismatched_me.json @@ -17,7 +17,7 @@ "me": "a:27017", "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -52,7 +52,7 @@ "me": "c:27017", "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/primary_wrong_set_name.json b/test/discovery_and_monitoring/rs/primary_wrong_set_name.json index cc0691fb8..1366e3899 100644 --- a/test/discovery_and_monitoring/rs/primary_wrong_set_name.json +++ b/test/discovery_and_monitoring/rs/primary_wrong_set_name.json @@ -15,7 +15,7 @@ ], "setName": "wrong", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/repeated.json b/test/discovery_and_monitoring/rs/repeated.json index 610aeae0a..3ce0948ab 100644 --- a/test/discovery_and_monitoring/rs/repeated.json +++ b/test/discovery_and_monitoring/rs/repeated.json @@ -18,7 +18,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -49,7 +49,7 @@ "helloOk": true, "isWritablePrimary": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -84,7 +84,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -120,7 +120,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/replicaset_rsnp.json b/test/discovery_and_monitoring/rs/replicaset_rsnp.json index 3148e1c14..1cd732b82 100644 --- a/test/discovery_and_monitoring/rs/replicaset_rsnp.json +++ b/test/discovery_and_monitoring/rs/replicaset_rsnp.json @@ -11,7 +11,7 @@ "helloOk": true, "isWritablePrimary": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/response_from_removed.json b/test/discovery_and_monitoring/rs/response_from_removed.json index 87a66d9e7..fa46a14ce 100644 --- a/test/discovery_and_monitoring/rs/response_from_removed.json +++ b/test/discovery_and_monitoring/rs/response_from_removed.json @@ -15,7 +15,7 @@ "a:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -46,7 +46,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/sec_not_auth.json b/test/discovery_and_monitoring/rs/sec_not_auth.json index a39855e65..ccbe7a08a 100644 --- a/test/discovery_and_monitoring/rs/sec_not_auth.json +++ b/test/discovery_and_monitoring/rs/sec_not_auth.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -32,7 +32,7 @@ "c:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/secondary_ignore_ok_0-pre-6.0.json b/test/discovery_and_monitoring/rs/secondary_ignore_ok_0-pre-6.0.json index 054425c84..f27060533 100644 --- a/test/discovery_and_monitoring/rs/secondary_ignore_ok_0-pre-6.0.json +++ b/test/discovery_and_monitoring/rs/secondary_ignore_ok_0-pre-6.0.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -32,7 +32,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -59,7 +59,7 @@ { "ok": 0, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/secondary_ignore_ok_0.json b/test/discovery_and_monitoring/rs/secondary_ignore_ok_0.json index ee9519930..9ffff58ef 100644 --- a/test/discovery_and_monitoring/rs/secondary_ignore_ok_0.json +++ b/test/discovery_and_monitoring/rs/secondary_ignore_ok_0.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -32,7 +32,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -59,7 +59,7 @@ { "ok": 0, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/secondary_mismatched_me.json b/test/discovery_and_monitoring/rs/secondary_mismatched_me.json index 6f1b9b598..790e4bfca 100644 --- a/test/discovery_and_monitoring/rs/secondary_mismatched_me.json +++ b/test/discovery_and_monitoring/rs/secondary_mismatched_me.json @@ -32,7 +32,7 @@ "ok": 1, "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ] diff --git a/test/discovery_and_monitoring/rs/secondary_wrong_set_name.json b/test/discovery_and_monitoring/rs/secondary_wrong_set_name.json index 8d2f152f5..1f86b5054 100644 --- a/test/discovery_and_monitoring/rs/secondary_wrong_set_name.json +++ b/test/discovery_and_monitoring/rs/secondary_wrong_set_name.json @@ -16,7 +16,7 @@ ], "setName": "wrong", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/secondary_wrong_set_name_with_primary.json b/test/discovery_and_monitoring/rs/secondary_wrong_set_name_with_primary.json index b7ef2d6d6..6b8991415 100644 --- a/test/discovery_and_monitoring/rs/secondary_wrong_set_name_with_primary.json +++ b/test/discovery_and_monitoring/rs/secondary_wrong_set_name_with_primary.json @@ -16,7 +16,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -51,7 +51,7 @@ ], "setName": "wrong", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/setversion_without_electionid-pre-6.0.json b/test/discovery_and_monitoring/rs/setversion_without_electionid-pre-6.0.json index c2e2fe5b9..e62c6963e 100644 --- a/test/discovery_and_monitoring/rs/setversion_without_electionid-pre-6.0.json +++ b/test/discovery_and_monitoring/rs/setversion_without_electionid-pre-6.0.json @@ -17,7 +17,7 @@ "setName": "rs", "setVersion": 2, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 7 } ] ], @@ -56,7 +56,7 @@ "setName": "rs", "setVersion": 1, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 7 } ] ], diff --git a/test/discovery_and_monitoring/rs/stepdown_change_set_name.json b/test/discovery_and_monitoring/rs/stepdown_change_set_name.json index e9075f97f..6de995518 100644 --- a/test/discovery_and_monitoring/rs/stepdown_change_set_name.json +++ b/test/discovery_and_monitoring/rs/stepdown_change_set_name.json @@ -15,7 +15,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -45,7 +45,7 @@ ], "setName": "wrong", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/too_new.json b/test/discovery_and_monitoring/rs/too_new.json index 0433d27a3..696246f8e 100644 --- a/test/discovery_and_monitoring/rs/too_new.json +++ b/test/discovery_and_monitoring/rs/too_new.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ diff --git a/test/discovery_and_monitoring/rs/too_old.json b/test/discovery_and_monitoring/rs/too_old.json index 461d00acc..8100a663f 100644 --- a/test/discovery_and_monitoring/rs/too_old.json +++ b/test/discovery_and_monitoring/rs/too_old.json @@ -16,7 +16,7 @@ "b:27017" ], "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ diff --git a/test/discovery_and_monitoring/rs/unexpected_mongos.json b/test/discovery_and_monitoring/rs/unexpected_mongos.json index cc19a961f..c6ffb321c 100644 --- a/test/discovery_and_monitoring/rs/unexpected_mongos.json +++ b/test/discovery_and_monitoring/rs/unexpected_mongos.json @@ -12,7 +12,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/rs/use_setversion_without_electionid-pre-6.0.json b/test/discovery_and_monitoring/rs/use_setversion_without_electionid-pre-6.0.json index 5c58b6561..2f9b567b8 100644 --- a/test/discovery_and_monitoring/rs/use_setversion_without_electionid-pre-6.0.json +++ b/test/discovery_and_monitoring/rs/use_setversion_without_electionid-pre-6.0.json @@ -20,7 +20,7 @@ "$oid": "000000000000000000000001" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 7 } ] ], @@ -64,7 +64,7 @@ "setName": "rs", "setVersion": 2, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 7 } ] ], @@ -108,7 +108,7 @@ "$oid": "000000000000000000000002" }, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 7 } ] ], diff --git a/test/discovery_and_monitoring/rs/wrong_set_name.json b/test/discovery_and_monitoring/rs/wrong_set_name.json index 9654ff7b7..d0764d24d 100644 --- a/test/discovery_and_monitoring/rs/wrong_set_name.json +++ b/test/discovery_and_monitoring/rs/wrong_set_name.json @@ -17,7 +17,7 @@ ], "setName": "wrong", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/sharded/discover_single_mongos.json b/test/discovery_and_monitoring/sharded/discover_single_mongos.json index 9e877a084..bf7e57521 100644 --- a/test/discovery_and_monitoring/sharded/discover_single_mongos.json +++ b/test/discovery_and_monitoring/sharded/discover_single_mongos.json @@ -12,7 +12,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/sharded/ls_timeout_mongos.json b/test/discovery_and_monitoring/sharded/ls_timeout_mongos.json index 93fa398d5..3da0f84ca 100644 --- a/test/discovery_and_monitoring/sharded/ls_timeout_mongos.json +++ b/test/discovery_and_monitoring/sharded/ls_timeout_mongos.json @@ -13,7 +13,7 @@ "msg": "isdbgrid", "logicalSessionTimeoutMinutes": 1, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -25,7 +25,7 @@ "msg": "isdbgrid", "logicalSessionTimeoutMinutes": 2, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -56,7 +56,7 @@ "msg": "isdbgrid", "logicalSessionTimeoutMinutes": 1, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -67,7 +67,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/sharded/mongos_disconnect.json b/test/discovery_and_monitoring/sharded/mongos_disconnect.json index 50a93eda5..29b335186 100644 --- a/test/discovery_and_monitoring/sharded/mongos_disconnect.json +++ b/test/discovery_and_monitoring/sharded/mongos_disconnect.json @@ -12,7 +12,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -23,7 +23,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -76,7 +76,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/sharded/multiple_mongoses.json b/test/discovery_and_monitoring/sharded/multiple_mongoses.json index 311592d71..ae0c2d9cd 100644 --- a/test/discovery_and_monitoring/sharded/multiple_mongoses.json +++ b/test/discovery_and_monitoring/sharded/multiple_mongoses.json @@ -12,7 +12,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -23,7 +23,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/sharded/non_mongos_removed.json b/test/discovery_and_monitoring/sharded/non_mongos_removed.json index d74375ebb..4698f576d 100644 --- a/test/discovery_and_monitoring/sharded/non_mongos_removed.json +++ b/test/discovery_and_monitoring/sharded/non_mongos_removed.json @@ -12,7 +12,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -26,7 +26,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/sharded/too_old.json b/test/discovery_and_monitoring/sharded/too_old.json index 688e1db0f..b918715ad 100644 --- a/test/discovery_and_monitoring/sharded/too_old.json +++ b/test/discovery_and_monitoring/sharded/too_old.json @@ -12,7 +12,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 2, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ diff --git a/test/discovery_and_monitoring/single/direct_connection_external_ip.json b/test/discovery_and_monitoring/single/direct_connection_external_ip.json index 90676a8f9..1461b4c46 100644 --- a/test/discovery_and_monitoring/single/direct_connection_external_ip.json +++ b/test/discovery_and_monitoring/single/direct_connection_external_ip.json @@ -15,7 +15,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/direct_connection_mongos.json b/test/discovery_and_monitoring/single/direct_connection_mongos.json index 25fe96518..72be02086 100644 --- a/test/discovery_and_monitoring/single/direct_connection_mongos.json +++ b/test/discovery_and_monitoring/single/direct_connection_mongos.json @@ -12,7 +12,7 @@ "isWritablePrimary": true, "msg": "isdbgrid", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/direct_connection_replicaset.json b/test/discovery_and_monitoring/single/direct_connection_replicaset.json index cd8660888..82a51d390 100644 --- a/test/discovery_and_monitoring/single/direct_connection_replicaset.json +++ b/test/discovery_and_monitoring/single/direct_connection_replicaset.json @@ -12,7 +12,7 @@ "isWritablePrimary": true, "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/direct_connection_rsarbiter.json b/test/discovery_and_monitoring/single/direct_connection_rsarbiter.json index e20495605..e06d28436 100644 --- a/test/discovery_and_monitoring/single/direct_connection_rsarbiter.json +++ b/test/discovery_and_monitoring/single/direct_connection_rsarbiter.json @@ -17,7 +17,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/direct_connection_rsprimary.json b/test/discovery_and_monitoring/single/direct_connection_rsprimary.json index 409e8502b..45eb1602f 100644 --- a/test/discovery_and_monitoring/single/direct_connection_rsprimary.json +++ b/test/discovery_and_monitoring/single/direct_connection_rsprimary.json @@ -16,7 +16,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/direct_connection_rssecondary.json b/test/discovery_and_monitoring/single/direct_connection_rssecondary.json index 305f283b5..b1bef8a49 100644 --- a/test/discovery_and_monitoring/single/direct_connection_rssecondary.json +++ b/test/discovery_and_monitoring/single/direct_connection_rssecondary.json @@ -17,7 +17,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/direct_connection_standalone.json b/test/discovery_and_monitoring/single/direct_connection_standalone.json index b47278482..e71ba07e7 100644 --- a/test/discovery_and_monitoring/single/direct_connection_standalone.json +++ b/test/discovery_and_monitoring/single/direct_connection_standalone.json @@ -11,7 +11,7 @@ "helloOk": true, "isWritablePrimary": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/direct_connection_wrong_set_name.json b/test/discovery_and_monitoring/single/direct_connection_wrong_set_name.json index 71080e681..8014a0a53 100644 --- a/test/discovery_and_monitoring/single/direct_connection_wrong_set_name.json +++ b/test/discovery_and_monitoring/single/direct_connection_wrong_set_name.json @@ -16,7 +16,7 @@ ], "setName": "wrong", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], @@ -45,7 +45,7 @@ ], "setName": "rs", "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/discover_standalone.json b/test/discovery_and_monitoring/single/discover_standalone.json index 858cbdaf6..d78c81654 100644 --- a/test/discovery_and_monitoring/single/discover_standalone.json +++ b/test/discovery_and_monitoring/single/discover_standalone.json @@ -11,7 +11,7 @@ "helloOk": true, "isWritablePrimary": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/ls_timeout_standalone.json b/test/discovery_and_monitoring/single/ls_timeout_standalone.json index 87b3e4e8a..236eabe00 100644 --- a/test/discovery_and_monitoring/single/ls_timeout_standalone.json +++ b/test/discovery_and_monitoring/single/ls_timeout_standalone.json @@ -12,7 +12,7 @@ "isWritablePrimary": true, "logicalSessionTimeoutMinutes": 7, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/not_ok_response.json b/test/discovery_and_monitoring/single/not_ok_response.json index 8e7c2a10e..cfaac3564 100644 --- a/test/discovery_and_monitoring/single/not_ok_response.json +++ b/test/discovery_and_monitoring/single/not_ok_response.json @@ -11,7 +11,7 @@ "helloOk": true, "isWritablePrimary": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], [ @@ -21,7 +21,7 @@ "helloOk": true, "isWritablePrimary": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/standalone_removed.json b/test/discovery_and_monitoring/single/standalone_removed.json index 57f8f861b..675cdbb00 100644 --- a/test/discovery_and_monitoring/single/standalone_removed.json +++ b/test/discovery_and_monitoring/single/standalone_removed.json @@ -11,7 +11,7 @@ "helloOk": true, "isWritablePrimary": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/discovery_and_monitoring/single/standalone_using_legacy_hello.json b/test/discovery_and_monitoring/single/standalone_using_legacy_hello.json index 46660fa8d..488cac491 100644 --- a/test/discovery_and_monitoring/single/standalone_using_legacy_hello.json +++ b/test/discovery_and_monitoring/single/standalone_using_legacy_hello.json @@ -10,7 +10,7 @@ "ok": 1, "ismaster": true, "minWireVersion": 0, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] ], diff --git a/test/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.json b/test/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.json index 5afebbbdc..db8b061b3 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.json +++ b/test/max_staleness/ReplicaSetNoPrimary/DefaultNoMaxStaleness.json @@ -7,7 +7,7 @@ "type": "RSSecondary", "avg_rtt_ms": 50, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -19,7 +19,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -37,7 +37,7 @@ "type": "RSSecondary", "avg_rtt_ms": 50, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -49,7 +49,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -63,7 +63,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.json b/test/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.json index 492d8a2f6..10b6f2878 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.json +++ b/test/max_staleness/ReplicaSetNoPrimary/LastUpdateTime.json @@ -13,7 +13,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -25,7 +25,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "c:27017", @@ -37,7 +37,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] }, @@ -56,7 +56,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -68,7 +68,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], "in_latency_window": [ @@ -82,7 +82,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] } diff --git a/test/max_staleness/ReplicaSetNoPrimary/Nearest.json b/test/max_staleness/ReplicaSetNoPrimary/Nearest.json index 6602561c1..38b998650 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/Nearest.json +++ b/test/max_staleness/ReplicaSetNoPrimary/Nearest.json @@ -13,7 +13,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -25,7 +25,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "c:27017", @@ -37,7 +37,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] }, @@ -56,7 +56,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -68,7 +68,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], "in_latency_window": [ @@ -82,7 +82,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] } diff --git a/test/max_staleness/ReplicaSetNoPrimary/Nearest2.json b/test/max_staleness/ReplicaSetNoPrimary/Nearest2.json index 16d9a673b..586b47ccd 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/Nearest2.json +++ b/test/max_staleness/ReplicaSetNoPrimary/Nearest2.json @@ -13,7 +13,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -25,7 +25,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "c:27017", @@ -37,7 +37,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] }, @@ -56,7 +56,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -68,7 +68,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], "in_latency_window": [ @@ -82,7 +82,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] } diff --git a/test/max_staleness/ReplicaSetNoPrimary/OneKnownTwoUnavailable.json b/test/max_staleness/ReplicaSetNoPrimary/OneKnownTwoUnavailable.json index 54f318872..15a62090e 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/OneKnownTwoUnavailable.json +++ b/test/max_staleness/ReplicaSetNoPrimary/OneKnownTwoUnavailable.json @@ -17,7 +17,7 @@ { "address": "c:27017", "type": "RSSecondary", - "maxWireVersion": 6, + "maxWireVersion": 21, "avg_rtt_ms": 5, "lastWrite": { "lastWriteDate": { @@ -35,7 +35,7 @@ { "address": "c:27017", "type": "RSSecondary", - "maxWireVersion": 6, + "maxWireVersion": 21, "avg_rtt_ms": 5, "lastWrite": { "lastWriteDate": { @@ -48,7 +48,7 @@ { "address": "c:27017", "type": "RSSecondary", - "maxWireVersion": 6, + "maxWireVersion": 21, "avg_rtt_ms": 5, "lastWrite": { "lastWriteDate": { diff --git a/test/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred.json b/test/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred.json index 7956b8e51..7c036f725 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred.json +++ b/test/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred.json @@ -8,7 +8,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -20,7 +20,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -39,7 +39,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -53,7 +53,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" diff --git a/test/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.json b/test/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.json index 453dce660..56fcb156b 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.json +++ b/test/max_staleness/ReplicaSetNoPrimary/PrimaryPreferred_tags.json @@ -13,7 +13,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } @@ -28,7 +28,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "nyc" } @@ -58,7 +58,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } @@ -75,7 +75,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } diff --git a/test/max_staleness/ReplicaSetNoPrimary/Secondary.json b/test/max_staleness/ReplicaSetNoPrimary/Secondary.json index b383f275d..5a4b0c822 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/Secondary.json +++ b/test/max_staleness/ReplicaSetNoPrimary/Secondary.json @@ -8,7 +8,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "125002" @@ -23,7 +23,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -38,7 +38,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -53,7 +53,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -80,7 +80,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -97,7 +97,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" diff --git a/test/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred.json b/test/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred.json index 7bce7d0aa..19a948e92 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred.json +++ b/test/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred.json @@ -7,7 +7,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -19,7 +19,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -38,7 +38,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -52,7 +52,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" diff --git a/test/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.json b/test/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.json index 32c9ca770..b4633d88f 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.json +++ b/test/max_staleness/ReplicaSetNoPrimary/SecondaryPreferred_tags.json @@ -8,7 +8,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "125002" @@ -23,7 +23,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -38,7 +38,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -53,7 +53,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -80,7 +80,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -97,7 +97,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" diff --git a/test/max_staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.json b/test/max_staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.json index fd84cd119..ccb916f10 100644 --- a/test/max_staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.json +++ b/test/max_staleness/ReplicaSetNoPrimary/ZeroMaxStaleness.json @@ -7,7 +7,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -19,7 +19,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.json b/test/max_staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.json index 35eaa9d69..00137cf69 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.json +++ b/test/max_staleness/ReplicaSetWithPrimary/DefaultNoMaxStaleness.json @@ -7,7 +7,7 @@ "type": "RSPrimary", "avg_rtt_ms": 50, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -19,7 +19,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -37,7 +37,7 @@ "type": "RSPrimary", "avg_rtt_ms": 50, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -49,7 +49,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -63,7 +63,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/ReplicaSetWithPrimary/LastUpdateTime.json b/test/max_staleness/ReplicaSetWithPrimary/LastUpdateTime.json index 18450beae..9d1db2de6 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/LastUpdateTime.json +++ b/test/max_staleness/ReplicaSetWithPrimary/LastUpdateTime.json @@ -13,7 +13,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -25,7 +25,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "c:27017", @@ -37,7 +37,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] }, @@ -56,7 +56,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -68,7 +68,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], "in_latency_window": [ @@ -82,7 +82,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] } diff --git a/test/max_staleness/ReplicaSetWithPrimary/LongHeartbeat.json b/test/max_staleness/ReplicaSetWithPrimary/LongHeartbeat.json index b9fb407f9..b0636236c 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/LongHeartbeat.json +++ b/test/max_staleness/ReplicaSetWithPrimary/LongHeartbeat.json @@ -8,7 +8,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -20,7 +20,7 @@ "type": "RSSecondary", "avg_rtt_ms": 50, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -39,7 +39,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -51,7 +51,7 @@ "type": "RSSecondary", "avg_rtt_ms": 50, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -65,7 +65,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/ReplicaSetWithPrimary/LongHeartbeat2.json b/test/max_staleness/ReplicaSetWithPrimary/LongHeartbeat2.json index b695e1cae..76edfcb83 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/LongHeartbeat2.json +++ b/test/max_staleness/ReplicaSetWithPrimary/LongHeartbeat2.json @@ -8,7 +8,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -20,7 +20,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.json b/test/max_staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.json index 9b798d37d..aa936e3c6 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.json +++ b/test/max_staleness/ReplicaSetWithPrimary/MaxStalenessTooSmall.json @@ -8,7 +8,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -20,7 +20,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json b/test/max_staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json index 1fa7bb4dd..c24752a7f 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json +++ b/test/max_staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json @@ -7,7 +7,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -19,7 +19,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/ReplicaSetWithPrimary/Nearest.json b/test/max_staleness/ReplicaSetWithPrimary/Nearest.json index 198be4a68..d3a9535b0 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/Nearest.json +++ b/test/max_staleness/ReplicaSetWithPrimary/Nearest.json @@ -13,7 +13,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -25,7 +25,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "c:27017", @@ -37,7 +37,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] }, @@ -56,7 +56,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -68,7 +68,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], "in_latency_window": [ @@ -82,7 +82,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] } diff --git a/test/max_staleness/ReplicaSetWithPrimary/Nearest2.json b/test/max_staleness/ReplicaSetWithPrimary/Nearest2.json index 3ae629c89..f91706e80 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/Nearest2.json +++ b/test/max_staleness/ReplicaSetWithPrimary/Nearest2.json @@ -13,7 +13,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -25,7 +25,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "c:27017", @@ -37,7 +37,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] }, @@ -56,7 +56,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -68,7 +68,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ], "in_latency_window": [ @@ -82,7 +82,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 } ] } diff --git a/test/max_staleness/ReplicaSetWithPrimary/Nearest_tags.json b/test/max_staleness/ReplicaSetWithPrimary/Nearest_tags.json index 675df8263..4ed0b9ed2 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/Nearest_tags.json +++ b/test/max_staleness/ReplicaSetWithPrimary/Nearest_tags.json @@ -13,7 +13,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } @@ -28,7 +28,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "nyc" } @@ -58,7 +58,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } @@ -75,7 +75,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } diff --git a/test/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred.json b/test/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred.json index 795b47a11..7945530e6 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred.json +++ b/test/max_staleness/ReplicaSetWithPrimary/PrimaryPreferred.json @@ -8,7 +8,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -20,7 +20,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -39,7 +39,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -53,7 +53,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred.json b/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred.json index 5455708a7..b433d6a43 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred.json +++ b/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred.json @@ -7,7 +7,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -19,7 +19,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -38,7 +38,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -52,7 +52,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" diff --git a/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.json b/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.json index 6670b54c8..e594af783 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.json +++ b/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags.json @@ -8,7 +8,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "125002" @@ -20,7 +20,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -35,7 +35,7 @@ "type": "RSSecondary", "avg_rtt_ms": 50, "lastUpdateTime": 1, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -50,7 +50,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -65,7 +65,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -92,7 +92,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -107,7 +107,7 @@ "type": "RSSecondary", "avg_rtt_ms": 50, "lastUpdateTime": 1, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -124,7 +124,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" diff --git a/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.json b/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.json index 642fee1fb..bc0953c65 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.json +++ b/test/max_staleness/ReplicaSetWithPrimary/SecondaryPreferred_tags2.json @@ -13,7 +13,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -25,7 +25,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } @@ -40,7 +40,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "nyc" } @@ -70,7 +70,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } @@ -87,7 +87,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } diff --git a/test/max_staleness/ReplicaSetWithPrimary/Secondary_tags.json b/test/max_staleness/ReplicaSetWithPrimary/Secondary_tags.json index 502120dce..2817cf922 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/Secondary_tags.json +++ b/test/max_staleness/ReplicaSetWithPrimary/Secondary_tags.json @@ -8,7 +8,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "125002" @@ -20,7 +20,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -35,7 +35,7 @@ "type": "RSSecondary", "avg_rtt_ms": 50, "lastUpdateTime": 1, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -50,7 +50,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -65,7 +65,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -92,7 +92,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -107,7 +107,7 @@ "type": "RSSecondary", "avg_rtt_ms": 50, "lastUpdateTime": 1, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1000001" @@ -124,7 +124,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" diff --git a/test/max_staleness/ReplicaSetWithPrimary/Secondary_tags2.json b/test/max_staleness/ReplicaSetWithPrimary/Secondary_tags2.json index 6978a1807..7aa487a07 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/Secondary_tags2.json +++ b/test/max_staleness/ReplicaSetWithPrimary/Secondary_tags2.json @@ -13,7 +13,7 @@ "$numberLong": "125002" } }, - "maxWireVersion": 6 + "maxWireVersion": 21 }, { "address": "b:27017", @@ -25,7 +25,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } @@ -40,7 +40,7 @@ "$numberLong": "1" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "nyc" } @@ -70,7 +70,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } @@ -87,7 +87,7 @@ "$numberLong": "2" } }, - "maxWireVersion": 6, + "maxWireVersion": 21, "tags": { "data_center": "tokyo" } diff --git a/test/max_staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.json b/test/max_staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.json index e1e4a7ffb..fff5609fc 100644 --- a/test/max_staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.json +++ b/test/max_staleness/ReplicaSetWithPrimary/ZeroMaxStaleness.json @@ -7,7 +7,7 @@ "type": "RSPrimary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "2" @@ -19,7 +19,7 @@ "type": "RSSecondary", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/Sharded/SmallMaxStaleness.json b/test/max_staleness/Sharded/SmallMaxStaleness.json index 91d89720d..98e05be36 100644 --- a/test/max_staleness/Sharded/SmallMaxStaleness.json +++ b/test/max_staleness/Sharded/SmallMaxStaleness.json @@ -8,7 +8,7 @@ "type": "Mongos", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -20,7 +20,7 @@ "type": "Mongos", "avg_rtt_ms": 50, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -39,7 +39,7 @@ "type": "Mongos", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -51,7 +51,7 @@ "type": "Mongos", "avg_rtt_ms": 50, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -65,7 +65,7 @@ "type": "Mongos", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/Single/SmallMaxStaleness.json b/test/max_staleness/Single/SmallMaxStaleness.json index b8d2db24b..d94873985 100644 --- a/test/max_staleness/Single/SmallMaxStaleness.json +++ b/test/max_staleness/Single/SmallMaxStaleness.json @@ -8,7 +8,7 @@ "type": "Standalone", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -27,7 +27,7 @@ "type": "Standalone", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" @@ -41,7 +41,7 @@ "type": "Standalone", "avg_rtt_ms": 5, "lastUpdateTime": 0, - "maxWireVersion": 6, + "maxWireVersion": 21, "lastWrite": { "lastWriteDate": { "$numberLong": "1" diff --git a/test/max_staleness/Unknown/SmallMaxStaleness.json b/test/max_staleness/Unknown/SmallMaxStaleness.json index 8d69f46a1..0e609bcf9 100644 --- a/test/max_staleness/Unknown/SmallMaxStaleness.json +++ b/test/max_staleness/Unknown/SmallMaxStaleness.json @@ -6,7 +6,7 @@ { "address": "a:27017", "type": "Unknown", - "maxWireVersion": 6 + "maxWireVersion": 21 } ] }, diff --git a/test/performance/perf_test.py b/test/performance/perf_test.py index a0aad3628..9beadb122 100644 --- a/test/performance/perf_test.py +++ b/test/performance/perf_test.py @@ -46,7 +46,7 @@ import tempfile import threading import time import warnings -from typing import Any, List, Optional +from typing import Any, List, Optional, Union import pytest @@ -61,7 +61,12 @@ from test import client_context, unittest from bson import decode, encode, json_util from gridfs import GridFSBucket -from pymongo import MongoClient +from pymongo import ( + DeleteOne, + InsertOne, + MongoClient, + ReplaceOne, +) pytestmark = pytest.mark.perf @@ -390,6 +395,15 @@ class SmallDocInsertTest(TestDocument): self.documents = [self.document.copy() for _ in range(NUM_DOCS)] +class SmallDocMixedTest(TestDocument): + dataset = "small_doc.json" + + def setUp(self): + super().setUp() + self.data_size = len(encode(self.document)) * NUM_DOCS * 2 + self.documents = [self.document.copy() for _ in range(NUM_DOCS)] + + class TestSmallDocInsertOne(SmallDocInsertTest, unittest.TestCase): def do_task(self): insert_one = self.corpus.insert_one @@ -429,11 +443,69 @@ class TestSmallDocBulkInsert(SmallDocInsertTest, unittest.TestCase): self.corpus.insert_many(self.documents, ordered=True) +class TestSmallDocClientBulkInsert(SmallDocInsertTest, unittest.TestCase): + @client_context.require_version_min(8, 0, 0, -24) + def setUp(self): + super().setUp() + self.models = [] + for doc in self.documents: + self.models.append(InsertOne(namespace="perftest.corpus", document=doc.copy())) + + @client_context.require_version_min(8, 0, 0, -24) + def do_task(self): + self.client.bulk_write(self.models, ordered=True) + + +class TestSmallDocBulkMixedOps(SmallDocMixedTest, unittest.TestCase): + def setUp(self): + super().setUp() + self.models: list[Union[InsertOne, ReplaceOne, DeleteOne]] = [] + for doc in self.documents: + self.models.append(InsertOne(document=doc.copy())) + self.models.append(ReplaceOne(filter={}, replacement=doc.copy(), upsert=True)) + self.models.append(DeleteOne(filter={})) + + def do_task(self): + self.corpus.bulk_write(self.models, ordered=True) + + +class TestSmallDocClientBulkMixedOps(SmallDocMixedTest, unittest.TestCase): + @client_context.require_version_min(8, 0, 0, -24) + def setUp(self): + super().setUp() + self.models: list[Union[InsertOne, ReplaceOne, DeleteOne]] = [] + for doc in self.documents: + self.models.append(InsertOne(namespace="perftest.corpus", document=doc.copy())) + self.models.append( + ReplaceOne( + namespace="perftest.corpus", filter={}, replacement=doc.copy(), upsert=True + ) + ) + self.models.append(DeleteOne(namespace="perftest.corpus", filter={})) + + @client_context.require_version_min(8, 0, 0, -24) + def do_task(self): + self.client.bulk_write(self.models, ordered=True) + + class TestLargeDocBulkInsert(LargeDocInsertTest, unittest.TestCase): def do_task(self): self.corpus.insert_many(self.documents, ordered=True) +class TestLargeDocClientBulkInsert(LargeDocInsertTest, unittest.TestCase): + @client_context.require_version_min(8, 0, 0, -24) + def setUp(self): + super().setUp() + self.models = [] + for doc in self.documents: + self.models.append(InsertOne(namespace="perftest.corpus", document=doc.copy())) + + @client_context.require_version_min(8, 0, 0, -24) + def do_task(self): + self.client.bulk_write(self.models, ordered=True) + + class GridFsTest(PerformanceTest): def setUp(self): super().setUp() diff --git a/test/test_client_bulk_write.py b/test/test_client_bulk_write.py index 8f6aad0cf..686b60642 100644 --- a/test/test_client_bulk_write.py +++ b/test/test_client_bulk_write.py @@ -19,11 +19,16 @@ import sys sys.path[0:0] = [""] -from test import IntegrationTest, client_context, unittest +from test import ( + IntegrationTest, + client_context, + unittest, +) from test.utils import ( OvertCommandListener, rs_or_single_client, ) +from unittest.mock import patch from pymongo.encryption_options import _HAVE_PYMONGOCRYPT, AutoEncryptionOpts from pymongo.errors import ( @@ -34,6 +39,7 @@ from pymongo.errors import ( ) from pymongo.monitoring import * from pymongo.operations import * +from pymongo.synchronous.client_bulk import _ClientBulk from pymongo.write_concern import WriteConcern _IS_SYNC = True @@ -53,6 +59,20 @@ class TestClientBulkWrite(IntegrationTest): context.exception._message, ) + @client_context.require_version_min(8, 0, 0, -24) + def test_handles_non_pymongo_error(self): + with patch.object( + _ClientBulk, "write_command", return_value={"error": TypeError("mock type error")} + ): + client = rs_or_single_client() + self.addCleanup(client.close) + + models = [InsertOne(namespace="db.coll", document={"a": "b"})] + with self.assertRaises(ClientBulkWriteException) as context: + client.bulk_write(models=models) + self.assertIsInstance(context.exception.error, TypeError) + self.assertFalse(hasattr(context.exception.error, "details")) + # https://github.com/mongodb/specifications/tree/master/source/crud/tests class TestClientBulkWriteCRUD(IntegrationTest):