From 556f640772b6750f9a97d29bee11c1294bb1c7bf Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Tue, 9 Jan 2024 09:20:39 -0800 Subject: [PATCH 001/308] DOCSP-29667-bulk-command-remove-content (#5778) * DOCSP-29667-bulk-command-remove-content * DOCSP-29667-bulk-command-remove-content --------- Co-authored-by: jason-price-mongodb --- config/redirects | 3 - source/includes/bulkWrite-introduction.rst | 5 - source/reference/command.txt | 9 - source/reference/command/bulkWrite.txt | 686 ------------------ .../reference/command/nav-administration.txt | 8 - .../method/db.collection.bulkWrite.txt | 2 - source/release-notes/7.2.txt | 5 - 7 files changed, 718 deletions(-) delete mode 100644 source/includes/bulkWrite-introduction.rst delete mode 100644 source/reference/command/bulkWrite.txt diff --git a/config/redirects b/config/redirects index 8904d2c67c2..33abdf99a8d 100644 --- a/config/redirects +++ b/config/redirects @@ -2535,9 +2535,6 @@ raw: ${prefix}/${version}/applications/drivers -> ${base}/drivers/ # DOCSP-32198 Redirect removed page [v7.0-*]: ${prefix}/${version}/tutorial/upgrade-revision -> ${base}/${version}/release-notes/ -## DOCSP-29667 New page for bulkWrite -[*-v7.1): ${prefix}/${version}/reference/command/bulkWrite -> ${base}/${version}/reference/command/ - # DOCSP-31908 Removing free monitoring pages after decomission [*]: ${prefix}/${version}/reference/method/db.enableFreeMonitoring -> ${base}/${version}/administration/free-monitoring/ [*]: ${prefix}/${version}/reference/method/db.disableFreeMonitoring -> ${base}/${version}/administration/free-monitoring/ diff --git a/source/includes/bulkWrite-introduction.rst b/source/includes/bulkWrite-introduction.rst deleted file mode 100644 index afd6fba8a9c..00000000000 --- a/source/includes/bulkWrite-introduction.rst +++ /dev/null @@ -1,5 +0,0 @@ -Starting in MongoDB 7.2, you can use the new :dbcommand:`bulkWrite` -command to perform many insert, update, and delete operations on -multiple collections in one request. The existing -:method:`db.collection.bulkWrite` method only allows you to modify one -collection in one request. diff --git a/source/reference/command.txt b/source/reference/command.txt index 0fd34b19355..899aa5c0a86 100644 --- a/source/reference/command.txt +++ b/source/reference/command.txt @@ -130,15 +130,6 @@ Query and Write Operation Commands - {+atlas+} Support - * - :dbcommand:`bulkWrite` - - - Performs many insert, update, and delete operations on multiple - collections in one request. - - .. versionadded:: 7.2 - - - No - * - :dbcommand:`delete` - Deletes one or more documents. diff --git a/source/reference/command/bulkWrite.txt b/source/reference/command/bulkWrite.txt deleted file mode 100644 index 243508458e6..00000000000 --- a/source/reference/command/bulkWrite.txt +++ /dev/null @@ -1,686 +0,0 @@ -========= -bulkWrite -========= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Definition ----------- - -.. dbcommand:: bulkWrite - -.. versionadded:: 7.2 - -.. include:: /includes/bulkWrite-introduction.rst - -To specify each collection in the ``bulkWrite`` command, use a -:term:`namespace` (database and collection name). - -Syntax ------- - -The command has this syntax: - -.. code-block:: javascript - - db.adminCommand( { - bulkWrite: 1, - - // Include the insert, update, and delete operations - // in the ops array - ops: [ - { - insert: , // Namespace ID index for insert operation. - // Must match a namespace ID index in - // ns specified later in the nsInfo array. - document: - }, - { - update: , // Namespace ID index for update operation - filter: , - updateMods: , - arrayFilters: [ , , ... ], - multi: , - hint: , - constants: , - collation: - }, - { - delete: , // Namespace ID index for delete operation - filter: , - multi: , - hint: , - collation: - }, - ... - // Additional insert, update, and delete operations in any order - ... - ], - - // Include the namespaces with collections to modify - // in the nsInfo array. You can add multiple namespaces here. - nsInfo: [ - { - ns: , // Namespace (database and collection name) to modify. - // Each operation namespace ID index - // specified in the earlier ops array must - // match a namespace ID index here. - collectionUUID: , - encryptionInformation: - }, - ... - // Additional namespaces - ... - ], - - // Additional fields - ordered: , - bypassDocumentValidation: , - comment: , - let: , - cursor: { batchSize: }, - writeConcern: - } ) - -In the command syntax, you can specify multiple: - -- Insert, update, and delete operations in any order in the ``ops`` - array. -- Namespaces for the operations in the ``nsInfo`` array. To match the - operation to the namespace, use the same namespace ID index. Indexes - start at ``0``. You can use :term:`sharded ` collections. - -Command Fields --------------- - -The command takes the following fields: - -.. list-table:: - :header-rows: 1 - :widths: 10 15 10 65 - - * - Field - - Type - - Necessity - - Description - - * - ``insert`` - - integer - - Required - - Namespace ID index for an insert operation, which must match a - namespace ID index in the ``ns`` field in the ``nsInfo`` array. - Indexes start at ``0``. - - * - ``document`` - - document - - Required - - Document to insert into the collection. - - * - ``update`` - - integer - - Required - - Namespace ID index for an update operation, which must match a - namespace ID index in the ``ns`` field in the ``nsInfo`` array. - Indexes start at ``0``. - - * - ``filter`` - - document - - Optional - - :ref:`Query selector ` to limit the documents for - the update or delete operation. - - * - ``updateMods`` - - document - - Optional - - Update operation to perform on the collection. You can specify one - of these: - - - A document with :ref:`update operator ` - expressions. - - - An :ref:`aggregation pipeline ` in the - form ``[ , , ... ]`` with stages for the - updates. - - * - ``arrayFilters`` - - document array - - Optional - - Array of filter documents that specify the documents to - modify for an update operation on an array field. - - For details, see :ref:`findAndModify-command-arrayFilters`. - - * - ``multi`` - - boolean - - Optional - - .. include:: /includes/bulkWrite-multi-field.rst - - Default is ``false``. - - * - ``hint`` - - document - - Optional - - :ref:`Index ` to use for the document ``filter``. If the - index doesn't exist, the update operation returns an error. - - * - ``constants`` - - document - - Optional - - Constants for an :ref:`aggregation pipeline - ` custom update. - - * - ``collation`` - - document - - Optional - - :ref:`Collation ` for an update or delete operation. - - * - ``delete`` - - integer - - Required - - Namespace ID index for a delete operation, which must match a - namespace ID index in the ``ns`` field in the ``nsInfo`` array. - Indexes start at ``0``. - - * - ``ns`` - - string - - Required - - Namespace (database and collection) for the operations. Set the - namespace ID index for each operation in ``ops`` to the matching - namespace array index in ``ns``. Indexes start at ``0``. - - * - ``collectionUUID`` - - string - - Optional - - :abbr:`UUID (Universally unique identifier)` hexadecimal value - that specifies the collection for the operations. - - * - ``encryptionInformation`` - - document - - Optional - - Encryption information schema and tokens for the operation. For - details, see :ref:`csfle-fundamentals-create-schema`. - - * - ``ordered`` - - boolean - - Optional - - If ``true``, perform ordered operations. Otherwise, perform - unordered operations. - - Ordered operations run in series. If an error occurs, any - remaining operations are cancelled. - - Unordered operations run in parallel. If an error occurs, any - remaining statements are run. The operations may be reordered by - the server to increase performance. Therefore, your applications - should not depend on the order of operation execution. - - Default is ``true``. - - * - ``bypassDocumentValidation`` - - boolean - - Optional - - If ``true``, the operation bypasses the :doc:`document validation - rules `. If ``false``, the documents must - be valid. - - Default is ``false``. - - * - ``comment`` - - string - - Optional - - .. include:: /includes/extracts/comment-content.rst - - * - ``let`` - - document - - Optional - - Document with a list of constants to reference in the operation. - For ``let`` examples, see :ref:`update-variables-example` and - :ref:`delete-let-example`. - - * - ``cursor batchSize`` - - integer - - Optional - - :term:`Cursor ` batch size for the ``bulkWrite`` command's - returned results. For details, see :method:`cursor.batchSize()`. - - * - ``writeConcern`` - - string - - Optional - - :ref:`Write concern ` for the operation. Omit to - use the server default. - -.. _bulkWrite-output: - -Output ------- - -The command returns a document with these fields: - -.. list-table:: - :header-rows: 1 - :widths: 25 25 50 - - * - Field - - Type - - Description - - * - ``cursor`` - - document - - Cursor with the command results. - - * - ``cursor.id`` - - integer - - Cursor identifier. - - * - ``cursor.firstBatch`` - - document array - - Results of the operations. - - * - ``cursor.firstBatch.ok`` - - integer - - ``1`` indicates the operation was successful. Otherwise, ``0``. - - * - ``cursor.firstBatch.idx`` - - integer - - Operation index number, which corresponds to the operation in the - ``ops`` array. The first operation has an ``idx`` value of ``0``. - - * - ``cursor.firstBatch.code`` - - integer - - Code number for an error. - - * - ``cursor.firstBatch.errmsg`` - - string - - Description for an error. - - * - ``cursor.firstBatch.keyPattern`` - - string - - Document index key specification for an error. - - * - ``cursor.firstBatch.keyValue`` - - string - - Document index key value for an error. - - * - ``cursor.firstBatch.n`` - - integer - - Total number of documents affected by an operation. - - * - ``cursor.firstBatch.nModified`` - - integer - - Number of documents modified by an update operation. - - * - ``numErrors`` - - integer - - Number of errors for the ``bulkWrite`` command. - - * - ``ok`` - - integer - - ``1`` indicates the ``bulkWrite`` command was successful. - Otherwise, ``0``. - -.. note:: - - The output fields may vary depending on the operations you run in the - ``bulkWrite`` command. - -Behavior --------- - -This section describes the ``bulkWrite`` command behavior. - -Multiple Document Field and Retryable Writes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/bulkWrite-multi-field.rst - -To enable retryable writes, see :ref:`retryable writes -`. - -You can use ``bulkWrite`` insert operations with retryable writes and -the ``multi`` field set to ``true``. - -You can use ``bulkWrite`` update and delete operations with the -``multi`` field set to ``true``. But, you cannot use update or delete -operations with both ``multi`` set to ``true`` and retryable writes. - -Operation Performance -~~~~~~~~~~~~~~~~~~~~~ - -If you run multiple operations in one ``bulkWrite`` command, you will -obtain similar performance if you run the same operations individually -in separate insert, update, and delete commands. - -Examples --------- - -This section contains ``bulkWrite`` command examples. - -Single Namespace Bulk Write Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following ``bulkWrite`` example modifies a single namespace: - -.. procedure:: - :style: normal - - .. step:: Create the pizzas example collection - - Run: - - .. include:: /includes/pizza-example-collection.rst - - .. step:: Modify the pizzas example collection - - Run the following ``bulkWrite`` command to perform insert, update, - and delete operations on the ``pizzas`` collection: - - .. code-block:: javascript - - db.adminCommand( { - bulkWrite: 1, - - // The ops array contains the insert, update, and delete - // operations. - ops: [ - - // Specify the namespace ID index immediately after - // the insert, update, and delete text. - // For example, "insert: 0" specifies the 0 namespace ID index, - // which is the "test.pizzas" namespace in nsInfo at the end - // of the example. - - // Insert a pizza. - { insert: 0, document: { _id: 4, type: "sausage", - size: "small", price: 12 } }, - - // Update the price for medium pizzas. - { update: 0, filter: { size: "medium" }, - updateMods: { $set: { price: 15 } } }, - - // Delete the pizza with an _id of 2. - { delete: 0, filter: { _id: 2 } } - ], - - // The nsInfo array contains the namespace to apply the - // previous operations to. - nsInfo: [ - { ns: "test.pizzas" } // Namespace ID index is 0. - ] - } ) - - The ``pizzas`` collection is in the default ``test`` database, so - the ``ns`` namespace is ``"test.pizzas"``. The namespace ID index - is ``0``, which is set in the first field of the insert, update, - and delete operations in the ``ops`` array. - - .. step:: Examine the output - - The following ``bulkWrite`` example output, with various ``ok: 1`` - fields and ``numErrors: 0``, indicates all operations were - successful: - - .. code-block:: javascript - :copyable: false - - { - cursor: { - id: Long("0"), - firstBatch: [ - { ok: 1, idx: 0, n: 1 }, - { ok: 1, idx: 1, n: 1, nModified: 1 }, - { ok: 1, idx: 2, n: 1 } - ] - }, - numErrors: 0, - ok: 1 - } - - For details about the output fields, see the earlier - :ref:`bulkWrite-output` section. - -Multiple Namespaces Bulk Write Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can specify multiple namespaces in a ``bulkWrite`` command. - -The following ``bulkWrite`` example contains insert, update, and delete -operations for two namespaces: - -.. procedure:: - :style: normal - - .. step:: Create the pizzas example collection - - If you already have the ``pizzas`` collection in your ``test`` - database, use the :method:`db.collection.drop` method to drop it - first and then run: - - .. include:: /includes/pizza-example-collection.rst - - .. step:: Create the pizza orders example collection - - Run: - - .. code-block:: javascript - - db.pizzaOrders.insertMany( [ - { _id: 0, type: "pepperoni", number: 5, - orderDate: new Date( "2023-01-15T12:00:00Z" ) }, - { _id: 1, type: "cheese", number: 15, - orderDate: new Date( "2023-01-23T11:12:32Z" ) }, - { _id: 2, type: "vegan", number: 20, - orderDate: new Date( "2023-03-20T10:01:12Z" ) } - ] ) - - .. step:: Modify the example collections - - Run the following ``bulkWrite`` command to perform insert, update, - and delete operations on the example collections: - - .. code-block:: javascript - - db.adminCommand( { - bulkWrite: 1, - - // The ops array contains the insert, update, and delete - // operations. - ops: [ - - // Specify the namespace ID indexes immediately after - // the insert, update, and delete. For example, "insert: 0" - // specifies the 0 namespace ID index, which is the "test.pizzas" - // namespace. And, "insert: 1" specifies "test.pizzaOrders". - - // Insert pizzas. - // Namespace ID is 0 for "test.pizzas", which - // is specified as "insert: 0". - { insert: 0, document: { _id: 5, type: "sausage", - size: "small", price: 12 } }, - { insert: 0, document: { _id: 6, type: "vegan cheese", - size: "large", price: 25 } }, - - // Update the price for cheese pizzas. - { update: 0, filter: { type: "cheese" }, - updateMods: { $set: { price: 15 } } }, - - // Delete pizzas with a price less than 7. - { delete: 0, filter: { price: { $lt: 7 } } }, - - // Insert pizza orders. - // Namespace ID is 1 for "test.pizzaOrders". - { insert: 1, document: { _id: 3, type: "sausage", number: 7, - orderDate: new Date( "2023-04-15T12:02:15Z" ) } }, - { insert: 1, document: { _id: 4, type: "vegan", number: 16, - orderDate: new Date( "2023-05-12T11:03:11Z" ) } }, - - // Update the number of pizza orders for cheese pizzas. - { update: 1, filter: { type: "cheese" }, - updateMods: { $set: { number: 50 } } }, - - // Delete the pizza order with an _id of 2. - { delete: 1, filter: { _id: 2 } }, - - // Delete pizza orders placed before March 15, 2023. - { delete: 1, filter: { orderDate: - { $lte: ISODate( "2023-03-15T00:00:00Z" ) } } } - ], - - // Namespaces - nsInfo: [ - { ns: "test.pizzas" }, // Namespace ID index is 0. - { ns: "test.pizzaOrders" } // Namespace ID index is 1. - ] - } ) - - .. step:: Examine the output - - The following ``bulkWrite`` example output indicates the - operations were successful: - - .. code-block:: javascript - :copyable: false - - { - cursor: { - id: Long("0"), - firstBatch: [ - { ok: 1, idx: 0, n: 1 }, - { ok: 1, idx: 1, n: 1 }, - { ok: 1, idx: 2, n: 1, nModified: 1 }, - { ok: 1, idx: 3, n: 1 }, - { ok: 1, idx: 4, n: 1 }, - { ok: 1, idx: 5, n: 1 }, - { ok: 1, idx: 6, n: 1, nModified: 1 }, - { ok: 1, idx: 7, n: 1 }, - { ok: 1, idx: 8, n: 1 } - ] - }, - numErrors: 0, - ok: 1 - } - -Operations with Errors Bulk Write Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following ``bulkWrite`` example contains operations with errors and -operations that don't change any documents: - -.. procedure:: - :style: normal - - .. step:: Create the pizzas example collection - - If you already have the ``pizzas`` collection in your ``test`` - database, use the :method:`db.collection.drop` method to drop it - first and then run: - - .. include:: /includes/pizza-example-collection.rst - - .. step:: Attempt to modify the pizzas example collection - - Run the following ``bulkWrite`` command to perform insert, update, - and delete operations on the ``pizzas`` collection: - - .. code-block:: javascript - - db.adminCommand( { - bulkWrite: 1, - - // The ops array contains the insert, update, and delete - // operations. - ops: [ - - // The namespace ID indexes are specified immediately after - // the insert, update, and delete text. - // For example, "insert: 0" specifies the 0 namespace ID index, - // which is the "test.pizzas" namespace in nsInfo. - - // Attempt to add a duplicate document with an - // _id of 1, which already exists and causes an error. - { insert: 0, document: { _id: 1, type: "tomato", - size: "small", price: 12 } }, - - // Attempt to add another duplicate document. - { insert: 0, document: { _id: 2, type: "pepper", - size: "small", price: 12 } }, - - // Attempt to change the price for extra large pizzas, - // which don't exist. This doesn't cause an error but - // doesn't update any documents. - { update: 0, filter: { size: "extra large" }, - updateMods: { $set: { price: 15 } } }, - - // Attempt to remove a document that doesn't exist. - // This doesn't cause an error but doesn't delete any documents. - { delete: 0, filter: { _id: 8 } } - ], - - // The nsInfo array contains the namespace to apply the - // previous operations to. - nsInfo: [ - { ns: "test.pizzas" } // Namespace ID index is 0. - ], - - // Set the ordered field to false to run the remaining operations - // after an operation returns an error. - ordered: false - } ) - - .. step:: Examine the output - - The following ``bulkWrite`` example output shows the errors: - - .. code-block:: javascript - :copyable: false - - { - cursor: { - id: Long("0"), - firstBatch: [ - { - ok: 0, - idx: 0, - code: 11000, - errmsg: 'E11000 duplicate key error collection: - test.pizzas index: _id_ dup key: { _id: 1 }', - keyPattern: { _id: 1 }, - keyValue: { _id: 1 }, - n: 0 - }, - { - ok: 0, - idx: 1, - code: 11000, - errmsg: 'E11000 duplicate key error collection: - test.pizzas index: _id_ dup key: { _id: 2 }', - keyPattern: { _id: 1 }, - keyValue: { _id: 2 }, - n: 0 - }, - { ok: 1, idx: 2, n: 0, nModified: 0 }, - { ok: 1, idx: 3, n: 0 } - ] - }, - numErrors: 2, - ok: 1 - } - - For details about the output fields, including the error codes and - messages, see the earlier :ref:`bulkWrite-output` section. - -Learn More ----------- - -- :ref:`server-sessions` -- :ref:`query-selectors` -- :ref:`aggregation-pipeline` -- :ref:`indexes` -- :ref:`collation` -- :ref:`retryable-writes` -- :ref:`transactions` diff --git a/source/reference/command/nav-administration.txt b/source/reference/command/nav-administration.txt index c5ef706cb81..fe4ba9d5930 100644 --- a/source/reference/command/nav-administration.txt +++ b/source/reference/command/nav-administration.txt @@ -20,13 +20,6 @@ Administration Commands - Description - * - :dbcommand:`bulkWrite` - - - Performs many insert, update, and delete operations on multiple - collections in one request. - - .. versionadded:: 7.2 - * - :dbcommand:`cloneCollectionAsCapped` - Copies a non-capped collection as a new :term:`capped collection`. @@ -182,7 +175,6 @@ Administration Commands :titlesonly: :hidden: - /reference/command/bulkWrite /reference/command/cloneCollectionAsCapped /reference/command/collMod /reference/command/compact diff --git a/source/reference/method/db.collection.bulkWrite.txt b/source/reference/method/db.collection.bulkWrite.txt index b1a8e0994da..bb13d35df8e 100644 --- a/source/reference/method/db.collection.bulkWrite.txt +++ b/source/reference/method/db.collection.bulkWrite.txt @@ -31,8 +31,6 @@ Definition - An array containing an ``_id`` for each successfully inserted or upserted documents. -.. include:: /includes/bulkWrite-introduction.rst - Compatibility ------------- diff --git a/source/release-notes/7.2.txt b/source/release-notes/7.2.txt index 983eba7686a..a54dbb454b5 100644 --- a/source/release-notes/7.2.txt +++ b/source/release-notes/7.2.txt @@ -19,11 +19,6 @@ Release Notes for MongoDB 7.2 (Release Candidate) General Changes --------------- -New Bulk Write Command -~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/bulkWrite-introduction.rst - .. _7.2-mongos-db-aggregation-validation: Database Validation on ``mongos`` Aggregation Queries From ebd3318eac57a7f0bab603635bde2559bc0e3e7d Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:41:35 -0600 Subject: [PATCH 002/308] DOCSP-35223 7.0.5 Release Notes (Final) (#5773) * DOCSP-35223 7.0.5 Release Notes (Final) * Fixes per Maria Prinus --- source/includes/changelogs/releases/7.0.5.rst | 7 +++++-- source/release-notes/7.0.txt | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/includes/changelogs/releases/7.0.5.rst b/source/includes/changelogs/releases/7.0.5.rst index eac67a2a865..cef13708985 100644 --- a/source/includes/changelogs/releases/7.0.5.rst +++ b/source/includes/changelogs/releases/7.0.5.rst @@ -20,8 +20,6 @@ Sharding verbose - :issue:`SERVER-83061` Remove partially-released vestiges of ShardRole API from 7.0 -- :issue:`SERVER-83146` Bulk write operation might fail with - NamespaceNotFound Query ~~~~~ @@ -45,6 +43,7 @@ Internals locks during shutdown and rollback - :issue:`SERVER-70974` Fix early-exits triggered when user specifies TCP Fast Open server parameters +- :issue:`SERVER-75033` Capture core dumps from test failures on macOS - :issue:`SERVER-76560` Time series collections not always honoring expireAfterSeconds correctly - :issue:`SERVER-77311` Add a new log message when a secondary node is @@ -124,6 +123,8 @@ Internals response status check - :issue:`SERVER-82143` Make clientId OIDC IdP configuration field optional +- :issue:`SERVER-82197` Incorrect query results in SBE if $group spills + in presence of collation - :issue:`SERVER-82223` Commit handler in FCV op observer is susceptible to interruption - :issue:`SERVER-82313` Fix cancelling txn api from the caller @@ -209,6 +210,8 @@ Internals - :issue:`SERVER-84087` Make sure ExecutorPool gets terminated after migrations have completed - :issue:`SERVER-84148` Fix timing issue in fle2_compact_setfcv.js test +- :issue:`SERVER-84337` Backport new variants added to perf.yml over to + sys-perf-7.0 and sys-perf-4.4 - :issue:`WT-7929` Investigate a solution to avoid FTDC stalls during checkpoint - :issue:`WT-11584` Fix test_checkpoint_stats test diff --git a/source/release-notes/7.0.txt b/source/release-notes/7.0.txt index 49e25d48fb1..18ad0c1dc13 100644 --- a/source/release-notes/7.0.txt +++ b/source/release-notes/7.0.txt @@ -42,8 +42,8 @@ Patch Releases .. _7.0.5-release-notes: -7.0.5 - Upcoming -~~~~~~~~~~~~~~~~ +7.0.5 - Jan 5, 2024 +~~~~~~~~~~~~~~~~~~~ Issues fixed: From bd1e91d11dda1cf1d072b5e4825e58f918fb9d3f Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Tue, 9 Jan 2024 09:44:35 -0800 Subject: [PATCH 003/308] DOCSP-35317 5.0.24 Release Notes (#5749) * DOCSP-35317 5.0.24 Release Notes * * * fix affected versions --- .../includes/changelogs/releases/5.0.24.rst | 150 ++++++++++++++++++ source/release-notes/5.0-changelog.txt | 2 + source/release-notes/5.0.txt | 20 ++- 3 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 source/includes/changelogs/releases/5.0.24.rst diff --git a/source/includes/changelogs/releases/5.0.24.rst b/source/includes/changelogs/releases/5.0.24.rst new file mode 100644 index 00000000000..eccb4489093 --- /dev/null +++ b/source/includes/changelogs/releases/5.0.24.rst @@ -0,0 +1,150 @@ +.. _5.0.24-changelog: + +5.0.24 Changelog +---------------- + +Sharding +~~~~~~~~ + +- :issue:`SERVER-50792` Return more useful errors when a shard key index + can't be found for shardCollection/refineCollectionShardKey +- :issue:`SERVER-73763` Resharding does not extend zone ranges for + config.tag docs, leading to config server primary fassert loop from + duplicate key error +- :issue:`SERVER-82838` ReshardingOplogApplier uses {w: "majority", + wtimeout: 60000} write concern when persisting resharding oplog + application progress +- :issue:`SERVER-82883` Recovering TransactionCoordinator on stepup may + block acquiring read/write tickets while participants are in the + prepared state +- :issue:`SERVER-82953` + CreateCollectionCoordinator::checkIfOptionsConflict should be more + verbose +- :issue:`SERVER-83146` Bulk write operation might fail with + NamespaceNotFound + +Replication +~~~~~~~~~~~ + +- :issue:`SERVER-55465` Fix Invariant upon failed request for a vote + from the current primary in the election dry-run of catchup takeover +- :issue:`SERVER-70155` Add duration of how long an oplog slot is kept + open to mongod "Slow query" log lines + +Catalog +~~~~~~~ + +:issue:`SERVER-82129` FCV 5.0 Upgrade fails due to +config.cache.collections missing UUIDs for most collections + +Storage +~~~~~~~ + +:issue:`SERVER-33494` WT SizeStorer never deletes old entries + +Internals +~~~~~~~~~ + +- :issue:`SERVER-65666` Do not create chunks on draining shards when + sharding a new collection +- :issue:`SERVER-67766` Log index and collection successful drop +- :issue:`SERVER-69063` Fix TCP keepalive option setting +- :issue:`SERVER-69615` Rollback fuzzing in WiredTiger leads to size + storer marked dirty at shutdown +- :issue:`SERVER-74074` Exclude auth consistency workloads from + concurrency simultaneous suites +- :issue:`SERVER-77311` Add a new log message when a secondary node is + skipping a two-phase index build with a subset of indexes built +- :issue:`SERVER-77506` Sharded multi-document transactions can mismatch + data and ShardVersion +- :issue:`SERVER-77926` Add LSAN suppressions for executor worker + threads +- :issue:`SERVER-78009` shardSvrCommitReshardCollection command should + fail recoverably if the node is shutting down +- :issue:`SERVER-79864` TTL deleter does not correctly handle time + series collections with extended range dates +- :issue:`SERVER-79982` Batched catalog writers can run concurrently + with HistoricalCatalogIdTracker::cleanup() and lead to incorrect PIT + find results. +- :issue:`SERVER-80789` Make AutoGetOplog behave consistently in replica + set node started as standalone +- :issue:`SERVER-80886` $out may fail with a StaleDbVersion after a + movePrimary +- :issue:`SERVER-80974` Unclean shutdown while dropping local.* + collection and indexes can make the catalog inconsistent +- :issue:`SERVER-81143` export_import_concurrency.js should check for + code 2 when killing child resmoke client +- :issue:`SERVER-81442` Poke WT oplog reclamation thread periodically +- :issue:`SERVER-81573` ExpressionNary::optimize crashes on initialized + children in v4.4 and 5.0 +- :issue:`SERVER-81878` startupRecoveryForRestore may not play nicely + with collection drop applied during startup recovery +- :issue:`SERVER-81949` Sync from 10gen/mongo to mongodb/mongo on v4.4 + with copybara +- :issue:`SERVER-82043` Enhancement of Commit Message Validation for + 10gen/mongo Commits +- :issue:`SERVER-82111` In sharded_agg_helpers.cpp move invariant below + response status check +- :issue:`SERVER-82223` Commit handler in FCV op observer is susceptible + to interruption +- :issue:`SERVER-82391` [v4.4] Only allow github Apps Copybara Syncer: + 10gen-to-Mongodb to syncs new commits to mongodb/mongo +- :issue:`SERVER-82447` $project incorrectly pushed down on timeseries + when $project uses $getField on a measurement field +- :issue:`SERVER-82449` [v4.4] Optimize copybara sync behavior for + specific no-change scenarios +- :issue:`SERVER-82555` Use shallow clone to speed up performance tests +- :issue:`SERVER-82640` Upload mongod --version output to S3 during + server compilation in Evergreen +- :issue:`SERVER-82708` Update variants used to performance test stable + branches +- :issue:`SERVER-82730` The validate cmd can invariant on corrupted + keystrings +- :issue:`SERVER-83091` $or query can trigger an infinite loop during + plan enumeration +- :issue:`SERVER-83099` LDAPTimer::setTimeout may run callback inline +- :issue:`SERVER-83161` Fix concurrent read to _errMsg from + MigrationDestinationManager without acquiring mutex +- :issue:`SERVER-83283` Modify copybara script to send slack message on + failure +- :issue:`SERVER-83336` Temporarily disable + wt_size_storer_cleanup_replica_set.js on macOS +- :issue:`SERVER-83354` Schedule copybara instance after each commit + made +- :issue:`SERVER-83485` Fix multikey-path serialization code used during + validation +- :issue:`SERVER-83494` [7.0] Fix range deleter unit test case +- :issue:`SERVER-83592` Add resmoke flag --enable_enterprise_tests + enable enterprise js tests +- :issue:`SERVER-83655` Restore legal client ns exception for + admin.system.new_users +- :issue:`SERVER-83830` On Enterprise build creating a collection in a + replica set with the storageEngine.inMemory option breaks secondaries +- :issue:`SERVER-83874` Move primary operation doesn't drop + db.system.views on the donor +- :issue:`SERVER-83916` Add LSAN Suppression for threads leaked by + unjoined thread pools +- :issue:`SERVER-84013` Incorrect results for index scan plan on query + with duplicate predicates in nested $or +- :issue:`SERVER-84353` The test for stepDown deadlock with read ticket + exhaustion is flaky +- :issue:`SERVER-84457` [v5.0] Explicitly declare type of term field in + sync source resolver query +- :issue:`SERVER-84576` [v5.0] Update 5.0 Readme +- :issue:`WT-7929` Investigate a solution to avoid FTDC stalls during + checkpoint +- :issue:`WT-9257` test_checkpoint WT_NOTFOUND failure on CS +- :issue:`WT-9821` Add option to verify to report all data corruption in + a file +- :issue:`WT-10601` Fix wt verify -c failure when first block on page is + corrupt +- :issue:`WT-10961` Fix OOO keys caused by racing deletion and insertion + on left subtrees +- :issue:`WT-10972` Eliminate long periods of silence when recovering + with recovery_progress verbose messages enabled +- :issue:`WT-11280` Generation tracking might not be properly + synchronized +- :issue:`WT-11774` Add diagnostic stat to investigate eviction server's + inability to queue pages +- :issue:`WT-12036` Workaround for lock contention on Windows + diff --git a/source/release-notes/5.0-changelog.txt b/source/release-notes/5.0-changelog.txt index 11ec532456b..c9553a5b31b 100644 --- a/source/release-notes/5.0-changelog.txt +++ b/source/release-notes/5.0-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/5.0.24.rst + .. include:: /includes/changelogs/releases/5.0.23.rst .. include:: /includes/changelogs/releases/5.0.22.rst diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index a8334559643..97857b9e400 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -46,12 +46,30 @@ Patch Releases - 5.0.0 - 5.0.1 * - :issue:`SERVER-68511` - - 5.0.0 - 5.0.14 + - 5.0.0 - 5.0.10 * - :issue:`SERVER-80203` - 5.0.6 - 5.0.21 (Time Series collections sharded by metaField embedded objects) +.. _5.0.24-release-notes: + +5.0.24 - Upcoming +~~~~~~~~~~~~~~~~~ + +- :issue:`SERVER-50792` Return more useful errors when a shard key index can't + be found for shardCollection/refineCollectionShardKey +- :issue:`SERVER-77506` Sharded multi-document transactions can mismatch data + and ShardVersion +- :issue:`SERVER-81878` startupRecoveryForRestore may not play nicely with + collection drop applied during startup recovery +- :issue:`SERVER-83091` $or query can trigger an infinite loop during plan + enumeration +- :issue:`WT-7929` Investigate a solution to avoid FTDC stalls during checkpoint +- `All JIRA issues closed in 5.0.24 + `_ +- :ref:`5.0.24-changelog` + .. _5.0.23-release-notes: 5.0.23 - Nov 27, 2023 From bba405b92ef9b11539a715bcb3ba616b9e3de693 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Tue, 9 Jan 2024 10:02:30 -0800 Subject: [PATCH 004/308] Add tcmallocAggressiveMemoryDecommit (#5650) * add tcmallocAggressiveMemoryDecommit * wordsmithing * external review suggestions and clarifications * writing review * Update source/reference/parameters.txt Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> * Update source/reference/parameters.txt Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> * fix formatting * final? review * Update source/reference/parameters.txt Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> * final changes, I hope... * fix formatting --------- Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> --- source/reference/parameters.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 4b6167290f0..c2a32f0d9e6 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -1844,6 +1844,30 @@ General Parameters .. seealso: :ref:`storage-node-watchdog` +.. parameter:: tcmallocAggressiveMemoryDecommit + + *Type*: integer (``0`` or ``1`` only) + + Default: 1 + + If you enable `tmallocAggressiveMemoryDecommit`, MongoDB: + + - releases a :term:`chunk ` of memory to system, and + + - attempts to return all neighboring free chunks. + + A value of ``1`` enables ``tcmallocAggressiveMemoryDecommit``; + ``0`` disables this parameter. + + If you enable this parameter, the system will require new memory allocations + for use. Consider enabling ``tcmallocAggressiveMemoryDecommit`` + only on memory-constrained systems and after pursuing other memory and + performance options. + + Despite the potential performance degradation when using + ``tcmallocAggressiveMemoryDecommit``, it is often preferred over using + :parameter:`tcmallocReleaseRate`. + .. parameter:: tcmallocReleaseRate .. versionadded:: 4.2.3 @@ -1860,6 +1884,12 @@ General Parameters return memory faster; decrease it to return memory slower. Reasonable rates are in the range [0,10]." + .. note:: + + Consider using :parameter:`tcmallocAggressiveMemoryDecommit` instead of + :parameter:`tcmallocReleaseRate`, unless you see a significant performance + degradation when using ``tcmallocAggressiveMemoryDecommit``. + To modify the release rate during run time, you can use the :dbcommand:`setParameter` command; for example: From 7851610470d7cd94e2ad635336796a2d60f7ae52 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:27:11 -0800 Subject: [PATCH 005/308] fix single-hash issue (#5789) --- source/reference/parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index c2a32f0d9e6..427ea804185 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -1850,7 +1850,7 @@ General Parameters Default: 1 - If you enable `tmallocAggressiveMemoryDecommit`, MongoDB: + If you enable ``tmallocAggressiveMemoryDecommit``, MongoDB: - releases a :term:`chunk ` of memory to system, and From 0cc8d2a71ef313a3af4f4c821850527105d36b48 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Wed, 10 Jan 2024 09:16:55 -0800 Subject: [PATCH 006/308] DOCSP-35006-glossary-4 (#5642) * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 --------- Co-authored-by: jason-price-mongodb --- source/reference/glossary.txt | 532 +++++++++++++++++----------------- 1 file changed, 272 insertions(+), 260 deletions(-) diff --git a/source/reference/glossary.txt b/source/reference/glossary.txt index e0507b7e2ae..e8d444a02f7 100644 --- a/source/reference/glossary.txt +++ b/source/reference/glossary.txt @@ -25,7 +25,7 @@ Glossary :sorted: $cmd - A special virtual :term:`collection` that exposes MongoDB's + A virtual :term:`collection` that exposes MongoDB's :term:`database commands `. To use database commands, see :ref:`issue-commands`. @@ -35,7 +35,7 @@ Glossary think of the ``_id`` field as the document's :term:`primary key`. If you create a new document without an ``_id`` field, MongoDB automatically creates the field and assigns a unique - BSON :term:`ObjectId`. + BSON :term:`ObjectId` to the field. accumulator An :term:`expression` in an :term:`aggregation pipeline` that @@ -55,20 +55,23 @@ Glossary see :ref:`admin-commands`. aggregation - Any of a variety of operations that reduces and summarizes large + An operation that reduces and summarizes large sets of data. MongoDB's :method:`~db.collection.aggregate()` and :method:`~db.collection.mapReduce()` methods are two examples of aggregation operations. For more information, see :ref:`aggregation`. aggregation pipeline - The set of MongoDB operators that let you calculate aggregate - values without having to use :term:`map-reduce`. For a list of - operators, see :doc:`/reference/aggregation`. + Consists of one or more stages that process documents. Aggregation + operators calculate aggregate values without having to use + :term:`map-reduce`. For a list of operators, see + :doc:`/reference/aggregation`. arbiter - A member of a :term:`replica set` that exists solely to vote in - :term:`elections `. Arbiters do not replicate data. See + A :term:`replica set` member that exists just to vote in + :term:`elections `. Arbiters do not replicate data. An + arbiter participates in elections for a :term:`primary` but cannot + become a primary. For more details, see :ref:`replica-set-arbiter-configuration`. Atlas @@ -76,8 +79,8 @@ Glossary is a cloud-hosted database-as-a-service. atomic operation - An atomic operation is a write operation which either completes - entirely, or does not complete at all. In the case of + An atomic operation is a write operation that either completes + entirely or doesn't complete at all. For :ref:`distributed transactions `, which involve writes to multiple documents, all writes to each document must succeed for the transaction to succeed. Atomic operations cannot @@ -110,7 +113,7 @@ Glossary Backup cursors are for internal use only. blocking sort - A sort that must be performed in memory before output is returned. + A sort that must be performed in memory before the output is returned. Blocking sorts may impact performance for large data sets. Use an :term:`indexed sort` to avoid a blocking sort. @@ -119,14 +122,14 @@ Glossary bounded collection scan A plan used by the :doc:`query optimizer ` that - eliminates documents with specific field value ranges. For + excludes documents with specific field value ranges. For example, if a range of date field values is outside of a specified - date range, the documents in that range are eliminated from the + date range, the documents in that range are excluded from the query plan. See :ref:`explain-output-collection-scan`. BSON A serialization format used to store :term:`documents ` and make - remote procedure calls in MongoDB. "BSON" is a portmanteau of the words + remote procedure calls in MongoDB. "BSON" is a combination of the words "binary" and "JSON". Think of BSON as a binary representation of JSON (JavaScript Object Notation) documents. See :ref:`bson-types` and @@ -138,7 +141,7 @@ Glossary B-tree A data structure commonly used by database management systems to - store indexes. MongoDB uses B-trees for its indexes. + store indexes. MongoDB uses B-tree indexes. CAP Theorem Given three properties of computing systems, consistency, @@ -148,7 +151,7 @@ Glossary capped collection A fixed-sized :term:`collection ` that automatically - overwrites its oldest entries when it reaches its maximum size. + overwrites its oldest entries when the collection reaches its maximum size. The MongoDB :term:`oplog` that is used in :term:`replication` is a capped collection. See :doc:`/core/capped-collections`. @@ -158,11 +161,11 @@ Glossary and has a cardinality of 3. See :ref:`shard-key-cardinality`. cartesian product - The result of combining two data sets such that the combined set + The result of combining two data sets where the combined set contains every possible combination of values. cfq - Complete Fairness Queueing (cfq) is a I/O operation scheduler + Complete Fairness Queueing (cfq) is an I/O operation scheduler that allocates bandwidth for incoming request processes. checksum @@ -170,20 +173,22 @@ Glossary The :term:`md5` algorithm is sometimes used as a checksum. chunk - A contiguous range of :term:`shard key` values within a particular + A contiguous range of :term:`shard key` values within a :term:`shard`. Chunk ranges are inclusive of the lower boundary and exclusive of the upper boundary. MongoDB splits chunks when - they grow beyond the configured chunk size, which by default is - 128 megabytes. MongoDB migrates chunks when a shard contains too - many chunks of a collection relative to other shards. See - :ref:`sharding-data-partitioning` and :ref:`sharding-balancing`. + they grow bigger than the configured chunk size. The default chunk + size is 128 megabytes. MongoDB migrates chunks when a shard + contains too many chunks of a collection relative to other shards. + For more details, see :ref:`sharding-data-partitioning`, + :ref:`sharding-balancing`, :ref:`sharded-cluster-balancer`, and + :ref:`release-notes-6.1-balancing-policy-changes`. client The application layer that uses a database for data persistence and storage. :term:`Drivers ` provide the interface level between the application layer and the database server. - Client can also refer to a single thread or process. + A client can also be a single thread or process. client affinity A consistent client connection to a specified data source. @@ -206,16 +211,16 @@ Glossary collection A grouping of MongoDB :term:`documents `. A collection - is the equivalent of an :term:`RDBMS` table. A collection exists - within a single :term:`database`. Collections do not enforce a - schema. Documents within a collection can have different fields. - Typically, all documents in a collection have a similar or related + is the equivalent of an :term:`RDBMS` table. A collection is + in a single :term:`database`. Collections do not enforce a + schema. Documents in a collection can have different fields. + Typically, documents in a collection have a similar or related purpose. See :ref:`faq-dev-namespace`. collection scan Collection scans are a query execution strategy where MongoDB must inspect every document in a collection to see if it matches the - query criteria. These queries are very inefficient and do not use + query criteria. These queries are very inefficient and don't use indexes. See :doc:`/core/query-optimization` for details about query execution strategies. @@ -229,7 +234,7 @@ Glossary During an :ref:`index build ` the :ref:`commit quorum ` specifies how many secondaries must be ready to commit their local - index build before the primary node will execute the commit. + index build before the primary node performs the commit. compound index An :term:`index` consisting of two or more keys. See @@ -238,20 +243,20 @@ Glossary concurrency control Concurrency control ensures that database operations can be executed concurrently without compromising correctness. - Pessimistic concurrency control, such as used in systems - with :term:`locks `, will block any potentially - conflicting operations even if they may not turn out to - actually conflict. Optimistic concurrency control, the approach - used by :ref:`WiredTiger `, will delay - checking until after a conflict may have occurred, aborting and - retrying one of the operations involved in any :term:`write - conflict` that arises. + Pessimistic concurrency control, such as that used in systems + with :term:`locks `, blocks any potentially + conflicting operations even if they may not conflict. + Optimistic concurrency control, the approach + used by :ref:`WiredTiger `, delays + checking until after a conflict may have occurred, ending and + retrying one of the operations in any :term:`write + conflict`. config database - An internal database that holds the metadata associated with a - :term:`sharded cluster`. Applications and administrators should - not modify the ``config`` database in the course of normal - operation. See :doc:`/reference/config-database`. + An internal database with metadata for a :term:`sharded cluster`. + Typically, you don't modify the ``config`` database. For more + information about the ``config`` database, see + :doc:`/reference/config-database`. config server A :binary:`~bin.mongod` instance that stores all the metadata @@ -259,7 +264,7 @@ Glossary See :ref:`sharding-config-server`. connection pool - A cache of database connections maintained by the driver. These + A cache of database connections maintained by the driver. The cached connections are re-used when connections to the database are required, instead of opening new connections. @@ -276,31 +281,30 @@ Glossary Read, Update, and Delete. See :ref:`crud`. CSV - A text-based data format consisting of comma-separated values. - This format is commonly used to exchange data between relational - databases since the format is well-suited to tabular data. You can + A text data format with comma-separated values. + CSV files can be used to exchange data between relational + databases because CSV files have tabular data. You can import CSV files using :binary:`~bin.mongoimport`. cursor A pointer to the result set of a :term:`query`. Clients can iterate through a cursor to retrieve results. By default, cursors not opened within a session automatically timeout after 10 - minutes of inactivity. Cursors opened under a session close with + minutes of inactivity. Cursors opened in a session close with the end or timeout of the session. See :ref:`read-operations-cursors`. Customer Master Key - A key that is used to encrypt your :term:`Data Encryption Key`. - The customer master key should be hosted in a remote key + A key that encrypts your :term:`Data Encryption Key`. + The customer master key must be hosted in a remote key provider. daemon - The conventional name for a background, non-interactive - process. + A background, non-interactive process. data directory - The file-system location where the :binary:`~bin.mongod` stores data - files. The :setting:`~storage.dbPath` option specifies the data directory. + The file system location where :binary:`~bin.mongod` stores data + files. :setting:`~storage.dbPath` specifies the data directory. Data Encryption Key A key you use to encrypt the fields in your MongoDB @@ -324,9 +328,9 @@ Glossary :doc:`/data-center-awareness`. database - A physical container for :term:`collections `. - Each database gets its own set of files on the file - system. A single MongoDB server typically has multiple + A container for :term:`collections `. + Each database has a set of files in the file + system. One MongoDB server typically has multiple databases. database command @@ -352,12 +356,12 @@ Glossary delayed member A :term:`replica set` member that cannot become primary and applies operations at a specified delay. The delay is useful for - protecting data from human error (i.e. unintentionally deleted + protecting data from human error (unintentionally deleted databases) or updates that have unforeseen effects on the production database. See :ref:`replica-set-delayed-members`. DEK - Abbreviation of Data Encryption Key, see + Data Encryption Key. For more details, see :term:`Data Encryption Key`. document @@ -379,21 +383,20 @@ Glossary driver A client library for interacting with MongoDB in a particular - language. See :driver:`driver `. + computer language. See :driver:`driver `. durable - A write operation is durable when it will persist across a - shutdown (or crash) and restart of one or more server processes. - For a single :binary:`~bin.mongod` server, a write operation is - considered durable when it has been written to the server's - :term:`journal` file. For a :doc:`replica set - `, a write operation is - considered durable once the write operation is durable on a - majority of voting nodes; i.e. written to a majority of voting - nodes' journals. + A write operation is durable when it persists after a shutdown (or + crash) and restart of one or more server processes. For a single + :binary:`~bin.mongod` server, a write operation is considered + durable when it has been written to the server's :term:`journal` + file. For a :doc:`replica set `, a write operation + is considered durable after the write operation achieves + durability on a majority of voting nodes and written to a majority + of voting nodes' journals. election - The process by which members of a :term:`replica set` select a + The process where members of a :term:`replica set` select a :term:`primary` on startup and in the event of a failure. See :ref:`replica-set-elections`. @@ -408,20 +411,20 @@ Glossary where the number of seconds or milliseconds since this point is counted. envelope encryption - An encryption practice where data is encrypted using a - :term:`Data Encryption Key` and the data encryption key is + An encryption procedure where data is encrypted using a + :term:`Data Encryption Key` and the data encryption key is encrypted by another key called the :term:`Customer Master Key`. - Encrypted keys are stored within a MongoDB collection referred to - as the KeyVault as :term:`BSON` documents. + The encrypted keys are stored as :term:`BSON` documents in a + MongoDB collection called the KeyVault. eventual consistency A property of a distributed system that allows changes to the system to propagate gradually. In a database system, this means - that readable members are not required to reflect the latest - writes at all times. + that readable members aren't required to have the latest + updates. expression - In the context of an :term:`aggregation pipeline`, expressions are + In an :term:`aggregation pipeline`, expressions are the stateless transformations that operate on the data that passes through a :term:`pipeline`. See :ref:`aggregation-pipeline`. @@ -436,19 +439,21 @@ Glossary databases. See :ref:`document-structure`. field path - Path to a field in the document. To specify a field path, use a + Path to a field in a document. To specify a field path, use a string that prefixes the field name with a dollar sign (``$``). firewall - A system level networking filter that restricts access based on, - among other things, IP address. Firewalls form a part of an - effective network security strategy. See - :ref:`security-firewalls`. + A system level network filter that restricts access based on + IP addresses and other parameters. Firewalls are part of a + secure network. See :ref:`security-firewalls`. fsync - A system call that flushes all dirty, in-memory pages to - disk. MongoDB calls ``fsync()`` on its database files at least - every 60 seconds. See :dbcommand:`fsync`. + A system call that flushes all dirty, in-memory pages to storage. + As applications write data, MongoDB records the data in the + storage layer and then writes the data to disk within the + ``syncPeriodSecs`` interval, which is 60 seconds by default. Run + ``fsync`` if you want to flush writes to disk ahead of that + interval. For details, see :dbcommand:`fsync`. geohash A geohash value is a binary representation of the location on a @@ -467,25 +472,25 @@ Glossary GridFS A convention for storing large files in a MongoDB database. All of - the official MongoDB drivers support this convention, as does the + the official MongoDB drivers support the GridFS convention, as does the :binary:`~bin.mongofiles` program. See :doc:`/core/gridfs`. hashed shard key - A special type of :term:`shard key` that uses a hash of the value + A type of :term:`shard key` that uses a hash of the value in the shard key field to distribute documents among members of the :term:`sharded cluster`. See :ref:`index-type-hashed`. health manager A health manager runs health checks on a :term:`health manager facet` at a specified :ref:`intensity level - `. Health manager checks run at + `. The health manager checks are run at specified time intervals. A health manager can be configured to move a failing :ref:`mongos ` out of a cluster - automatically. + automatically. health manager facet - A specific set of features and functionality that a :term:`health - manager` can be configured to run health checks against. For + A set of features that a :term:`health + manager` can be configured to run health checks for. For example, you can configure a health manager to monitor and manage DNS or LDAP cluster health issues automatically. See :ref:`health-managers-facets` for details. @@ -497,33 +502,33 @@ Glossary high availability High availability indicates a system designed for durability, - redundancy, and automatic failover such that the applications - supported by the system can operate continuously and without - downtime for a long period of time. MongoDB + redundancy, and automatic failover. Applications + supported by the system can operate without + downtime for a long time period. MongoDB :ref:`replica sets ` support - high availability when deployed according to our documented + high availability when deployed according to the :ref:`best practices `. For guidance on replica set deployment architecture, see :ref:`replica-set-architecture`. idempotent - The quality of an operation to produce the same result given the - same input, whether run once or run multiple times. + An operation produces the same result with the + same input when run multiple times. index A data structure that optimizes queries. See :doc:`/indexes`. index bounds The range of index values that MongoDB searches when using an - index to fulfill a query. To learn more, see + index to run a query. To learn more, see :ref:`multikey-index-bounds`. init script - A simple shell script used by a Linux platform's + A shell script used by a Linux platform's :term:`init system` to start, restart, or stop a :term:`daemon` - process. If you installed MongoDB via a package manager, an init - script has been provided for your system as part of the + process. If you installed MongoDB using a package manager, an init + script is provided for your system as part of the installation. See the respective :ref:`Installation Guide ` for your operating system. @@ -533,12 +538,11 @@ Glossary after the kernel starts, and manages all other processes on the system. The init system uses an :term:`init script` to start, restart, or stop a :term:`daemon` process, such as - :binary:`~bin.mongod` or :binary:`~bin.mongos`. Recent versions of - Linux tend to use the **systemd** init system, which uses the - ``systemctl`` command, while older versions tend to use the - **System V** init system, which uses the ``service`` command. - See the respective Installation Guide for - your operating system. + :binary:`~bin.mongod` or :binary:`~bin.mongos`. Recent Linux + versions typically use the **systemd** init system and the + ``systemctl`` command. Older Linux versions typically use the + **System V** init system and the ``service`` command. See + the Installation Guide for your operating system. initial sync The :term:`replica set` operation that replicates data from an @@ -546,45 +550,43 @@ Glossary :ref:`replica-set-initial-sync`. intent lock - A :term:`lock` on a resource that indicates that the holder - of the lock will read (intent shared) or write (intent + A :term:`lock` on a resource that indicates the lock holder + will read from (intent shared) or write to (intent exclusive) the resource using :term:`concurrency control` at a finer granularity than that of the resource with the intent lock. Intent locks allow concurrent readers and writers of a - resource. See :ref:`faq-concurrency-locking`. + resource. See :ref:`faq-concurrency-locking`. In-Use Encryption - Encryption that secures data while being transmitted, stored, and + Encryption that secures data when transmitted, stored, and processed, and enables supported queries on that encrypted data. MongoDB provides two approaches to In-Use Encryption: :ref:`{+qe+} ` and :ref:`{+csfle+} `. IPv6 - A revision to the IP (Internet Protocol) standard that - provides a significantly larger address space to more effectively - support the number of hosts on the contemporary Internet. + A revision to the IP (Internet Protocol) standard with a + large address space to support Internet hosts. ISODate The international date format used by :binary:`~bin.mongosh` - to display dates. The format is: ``YYYY-MM-DD HH:MM.SS.millis``. + to display dates. The format is ``YYYY-MM-DD HH:MM.SS.millis``. indexed sort - A sort in which an index provides the sorted result. Sort operations that + A sort where an index provides the sorted result. Sort operations that use an index often have better performance than a :term:`blocking sort`. See :ref:`Use Indexed to Sort Query Results ` for more information. interrupt point - A point in an operation's lifecycle when it can - safely abort. MongoDB only terminates an operation + A point in an operation when it can + safely end. MongoDB only ends an operation at designated interrupt points. See :doc:`/tutorial/terminate-running-operations`. JavaScript - A popular scripting language originally designed for web - browsers. :mongosh:`mongosh `, the legacy - :binary:`mongo ` shell, and certain server-side + A scripting language. :mongosh:`mongosh `, the legacy + :binary:`mongo ` shell, and certain server functions use a JavaScript interpreter. See :doc:`/core/server-side-javascript` for more information. @@ -598,7 +600,7 @@ Glossary See :doc:`/core/journaling/`. JSON - JavaScript Object Notation. A human-readable, plain text format + JavaScript Object Notation. A plain text format for expressing structured data with support in many programming languages. For more information, see ``_. Certain MongoDB tools render an approximation of MongoDB @@ -611,30 +613,35 @@ Glossary ``_. JSONP - :term:`JSON` with Padding. Refers to a method of injecting JSON + :term:`JSON` with padding. Refers to a method of injecting JSON into applications. **Presents potential security concerns**. + jumbo chunk + A :term:`chunk` that grows beyond the :ref:`specified chunk size + ` and cannot split into smaller chunks. For + more details, see :ref:`jumbo-chunks`. + key material The random string of bits used by an encryption algorithm to encrypt and decrypt data. Key Vault Collection - A MongoDB collection used to store the encrypted + A MongoDB collection that stores the encrypted :term:`Data Encryption Keys ` as :term:`BSON` documents. least privilege - An authorization policy that gives a user only the amount of access - that is essential to that user's work and no more. + An authorization policy that grants a user only the access + that is essential to that user's work. legacy coordinate pairs - The format used for :term:`geospatial` data prior to MongoDB + The format used for :term:`geospatial` data before MongoDB version 2.4. This format stores geospatial data as points on a - planar coordinate system (e.g. ``[ x, y ]``). See + planar coordinate system (for example, ``[ x, y ]``). See :doc:`/geospatial-queries`. LineString - A LineString is defined by an array of two or more positions. A + A LineString is an array of two or more positions. A closed LineString with four or more positions is called a LinearRing, as described in the GeoJSON LineString specification: ``_. To use a @@ -643,11 +650,16 @@ Glossary lock MongoDB uses locks to ensure that :doc:`concurrency ` - does not affect correctness. MongoDB uses :term:`read locks + does not affect correctness. MongoDB uses :term:`read locks `, :term:`write locks ` and :term:`intent locks `. For more information, see :ref:`faq-concurrency-locking`. + log files + Contain server events, such as incoming connections, commands run, + and issues encountered. For more details, see + :ref:`log-messages-ref`. + LVM Logical volume manager. LVM is a program that abstracts disk images from physical devices and provides a number of raw disk @@ -656,26 +668,29 @@ Glossary :ref:`lvm-backup-and-restore`. mapping type - A Structure in programming languages that associate keys with - values, where keys may nest other pairs of keys and values - (e.g. dictionaries, hashes, maps, and associative arrays). + A structure in programming languages that associate keys with + values. Keys may contain embedded pairs of keys and values + (for example, dictionaries, hashes, maps, and associative arrays). The properties of these structures depend on the language - specification and implementation. Generally the order of keys in + specification and implementation. Typically, the order of keys in mapping types is arbitrary and not guaranteed. map-reduce - A data processing and aggregation paradigm consisting of a "map" - phase that selects data and a "reduce" phase that transforms the + An aggregation process that has a "map" + phase that selects the data and a "reduce" phase that transforms the data. In MongoDB, you can run arbitrary aggregations over data - using map-reduce. For map-reduce implementation, see + using map-reduce. For the map-reduce implementation, see :doc:`/core/map-reduce`. For all approaches to aggregation, see :ref:`aggregation`. md5 - A hashing algorithm used to efficiently provide - reproducible unique strings to identify and :term:`checksum` - data. MongoDB uses md5 to identify chunks of data for - :term:`GridFS`. See :doc:`/reference/command/filemd5`. + A hashing algorithm that calculates a :term:`checksum` for the + supplied data. The algorithm returns a unique value + to identify the data. MongoDB uses md5 to identify chunks of data + for :term:`GridFS`. See :doc:`/reference/command/filemd5`. + + mean + Average of a set of numbers. median In a dataset, the median is the percentile value where 50% of the @@ -697,6 +712,9 @@ Glossary :binary:`~bin.mongofiles` tool provides an option to specify a MIME type to describe a file inserted into :term:`GridFS` storage. + mode + Number that occurs most frequently in a set of numbers. + mongo The legacy MongoDB shell. The :binary:`~bin.mongo` process starts the legacy shell as a :term:`daemon` connected to either a @@ -710,15 +728,15 @@ Glossary mongod The MongoDB database server. The :binary:`~bin.mongod` process starts the MongoDB server as a :term:`daemon`. The MongoDB server - manages data requests and formats and manages background - operations. See :doc:`/reference/program/mongod`. + manages data requests and background operations. See + :doc:`/reference/program/mongod`. mongos The MongoDB sharded cluster query router. The :binary:`~bin.mongos` process starts the MongoDB router as a :term:`daemon`. The MongoDB router acts as an interface between an application and a MongoDB :term:`sharded cluster` and - handles all routing and load balancing across the cluster. See + handles all routing and load balancing across the cluster. See :doc:`/reference/program/mongos`. mongosh @@ -730,14 +748,13 @@ Glossary :binary:`~bin.mongo` as the preferred shell. namespace - The canonical name for a collection or index in MongoDB. - The namespace is a combination of the database name and - the name of the collection or index, like so: - ``[database-name].[collection-or-index-name]``. All documents + A namespace is a combination of the database name and + the name of the collection or index: + ``.``. All documents belong to a namespace. See :ref:`faq-dev-namespace`. natural order - The order in which the database refers to documents on disk. This is the + The order that the database stores documents on disk. Natural order is the default sort order. See :operator:`$natural` and :ref:`return-natural-order`. @@ -746,14 +763,16 @@ Glossary partitions such that nodes in one partition cannot communicate with the nodes in the other partition. - Sometimes, partitions are partial or asymmetric. An example of a - partial partition would be a division of the nodes of a network + Sometimes, partitions are partial or asymmetric. An example + partial partition is the a division of the nodes of a network into three sets, where members of the first set cannot - communicate with members of the second set, and vice versa, but - all nodes can communicate with members of the third set. In an + communicate with members of the second set, and the reverse, but + all nodes can communicate with members of the third set. + + In an asymmetric partition, communication may be possible only when it originates with certain nodes. For example, nodes on one side of - the partition can communicate to the other side only if they + the partition can communicate with the other side only if they originate the communications channel. node @@ -769,9 +788,9 @@ Glossary See :term:`natural order`. ObjectId - A special 12-byte :term:`BSON` type that guarantees uniqueness - within the :term:`collection`. The ObjectId is generated based on - timestamp, machine ID, process ID, and a process-local incremental + A 12-byte :term:`BSON` type that is unique + within a :term:`collection`. The ObjectId is generated using the + timestamp, computer ID, process ID, and a local process incremental counter. MongoDB uses ObjectId values as the default values for :term:`_id` fields. @@ -797,10 +816,10 @@ Glossary See :doc:`/core/replica-set-oplog`. oplog hole - A temporary gap in the oplog due to oplog writes not occurring in + A temporary gap in the oplog because the oplog writes aren't in sequence. Replica set :ref:`primaries ` apply oplog entries in parallel as a batch operation. As a result, - temporary gaps in the oplog can occur from entries that are not + temporary gaps in the oplog can occur from entries that aren't yet written from a batch. oplog window @@ -825,9 +844,9 @@ Glossary orphaned document In a sharded cluster, orphaned documents are those documents on a - shard that also exist in chunks on other shards as a result of - failed migrations or incomplete migration cleanup due to abnormal - shutdown. + shard that also exist in chunks on other shards. This is caused by + a failed migration or an incomplete migration cleanup because of + an atypical shutdown. Starting in MongoDB 4.4, orphaned documents are cleaned up automatically after a chunk migration completes. You no longer @@ -835,7 +854,7 @@ Glossary documents. orphaned cursor - A cursor that is not properly closed or iterated over + A cursor that is not correctly closed or iterated over in your application code. Orphaned cursors can cause performance issues in your MongoDB deployment. @@ -845,8 +864,8 @@ Glossary ``0``. See :doc:`/core/replica-set-priority-0-member`. percentile - In a dataset, a given percentile is a value where that percentage - of the data falls at or below that value. For details, see + In a dataset, a percentile is a value where that percentage + of the data is at or below the specified value. For details, see :ref:`percentile-calculation-considerations`. PID @@ -862,7 +881,7 @@ Glossary the input of another. pipeline - A series of operations in an :term:`aggregation` process. + A series of operations in an :term:`aggregation`. See :ref:`aggregation-pipeline`. Point @@ -888,10 +907,10 @@ Glossary :ref:`db.collection.watch-change-streams-pre-and-post-images-example`. powerOf2Sizes - A per-collection setting that changes and normalizes the way - MongoDB allocates space for each :term:`document`, in an effort to - maximize storage reuse and to reduce fragmentation. This is the - default for :ref:`TTL Collections `. See + A setting for each collection that allocates space for each + :term:`document` to maximize storage reuse and reduce + fragmentation. ``powerOf2Sizes`` is the default for :ref:`TTL + Collections `. To change collection settings, see :dbcommand:`collMod`. prefix compression @@ -919,13 +938,13 @@ Glossary :ref:`replica-set-primary-member`. primary key - A record's unique immutable identifier. In an :term:`RDBMS`, the primary + A record's unique immutable identifier. In :term:`RDBMS` software, the primary key is typically an integer stored in each row's ``id`` field. - In MongoDB, the :term:`_id` field holds a document's primary - key which is usually a BSON :term:`ObjectId`. + In MongoDB, the :term:`_id` field stores a document's primary + key, which is typically a BSON :term:`ObjectId`. primary shard - The :term:`shard` that holds all the un-sharded collections. See + The :term:`shard` that stores all the unsharded collections. See :ref:`primary-shard`. priority @@ -939,23 +958,23 @@ Glossary :ref:`privilege `. projection - A document given to a :term:`query` that specifies which fields - MongoDB returns in the result set. See :ref:`projection`. For a - list of projection operators, see + A document supplied to a :term:`query` that specifies the fields + MongoDB returns in the result set. For more information about projections, + see :ref:`projection` and :doc:`/reference/operator/projection`. query - A read request. MongoDB uses a :term:`JSON`-like query language - that includes a variety of :term:`query operators ` with + A read request. MongoDB uses a :term:`JSON` form of query language + that includes :term:`query operators ` with names that begin with a ``$`` character. In - :binary:`~bin.mongosh`, you can issue queries using the + :binary:`~bin.mongosh`, you can run queries using the :method:`db.collection.find()` and :method:`db.collection.findOne()` methods. See :ref:`read-operations-queries`. query framework A combination of the :term:`query optimizer` and query execution engine - used to process an operation. + that processes an operation. query operator A keyword beginning with ``$`` in a query. For example, @@ -965,19 +984,23 @@ Glossary query optimizer A process that generates query plans. For each query, the optimizer generates a plan that matches the query to the index - that will return results as efficiently as possible. The + that returns the results as efficiently as possible. The optimizer reuses the query plan each time the query runs. If a collection changes significantly, the optimizer creates a new query plan. See :ref:`read-operations-query-optimization`. + query plan + Most efficient execution plan chosen by the query planner. For + more details, see :ref:`query-plans-query-optimization`. + query shape A combination of query predicate, sort, projection, and :ref:`collation `. The query shape allows MongoDB to identify logically equivalent queries and analyze their performance. For the query predicate, only the structure of the predicate, - including the field names, are significant; the values in the - query predicate are insignificant. As such, a query predicate ``{ + including the field names, are significant. The values in the + query predicate are insignificant. Therefore, a query predicate ``{ type: 'food' }`` is equivalent to the query predicate ``{ type: 'utensil' }`` for a query shape. @@ -1013,19 +1036,14 @@ Glossary RDBMS Relational Database Management System. A database management - system based on the relational model, typically using - :term:`SQL` as the query language. + system based on the relational model, typically using :term:`SQL` + as the query language. recovering A :term:`replica set` member status indicating that a member - is not ready to begin normal activities of a secondary or primary. + is not ready to begin activities of a secondary or primary. Recovering members are unavailable for reads. - replica pairs - The precursor to the MongoDB :term:`replica sets `. - - .. deprecated:: 1.6 - replica set A cluster of MongoDB servers that implements replication and automated failover. MongoDB's recommended @@ -1033,20 +1051,20 @@ Glossary replication A feature allowing multiple database servers to share the same - data, thereby ensuring redundancy and facilitating load balancing. - See :doc:`/replication`. + data. Replication ensures data redundancy and enables load + balancing. See :doc:`/replication`. replication lag - The length of time between the last operation in the + The time period between the last operation in the :term:`primary's ` :term:`oplog` and the last operation - applied to a particular :term:`secondary`. In general, you want to - keep replication lag as small as possible. See :ref:`Replication + applied to a particular :term:`secondary`. You typically want + replication lag as short as possible. See :ref:`Replication Lag `. resident memory The subset of an application's memory currently stored in physical RAM. Resident memory is a subset of :term:`virtual memory`, - which includes memory mapped to physical RAM and to disk. + which includes memory mapped to physical RAM and to storage. resource A database, collection, set of collections, or cluster. A @@ -1060,19 +1078,19 @@ Glossary :doc:`/security`. rollback - A process that reverts writes operations to ensure the consistency + A process that reverts write operations to ensure the consistency of all replica set members. See :ref:`replica-set-rollback`. secondary A :term:`replica set` member that replicates the contents of the - master database. Secondary members may handle read requests, but - only the :term:`primary` members can handle write operations. See + master database. Secondary members may run read requests, but + only the :term:`primary` members can run write operations. See :ref:`replica-set-secondary-members`. secondary index A database :term:`index` that improves query performance by minimizing the amount of work that the query engine must perform - to fulfill a query. See :doc:`/indexes`. + to run a query. See :doc:`/indexes`. secondary member See :term:`secondary`. Also known as a secondary node. @@ -1082,7 +1100,7 @@ Glossary :binary:`~bin.mongosh`) for initial discovery of the replica set configuration. Seed lists can be provided as a list of ``host:port`` pairs (see :ref:`connections-standard-connection-string-format` - or via DNS entries (see :ref:`connections-dns-seedlist`). + or through DNS entries. For more information, see :ref:`connections-dns-seedlist`. set name The arbitrary name given to a replica set. All members of a @@ -1090,10 +1108,11 @@ Glossary :setting:`~replication.replSetName` setting or the :option:`--replSet ` option. shard - A single :binary:`~bin.mongod` instance or :term:`replica set` that - stores some portion of a :term:`sharded cluster's ` total data set. In production, all shards should be - replica sets. See :doc:`/core/sharded-cluster-shards`. + A single :binary:`~bin.mongod` instance or :term:`replica set` + that stores part of a :term:`sharded cluster's ` + total data set. Typically, in a production deployment, ensure all + shards are part of replica sets. See + :doc:`/core/sharded-cluster-shards`. shard key The field MongoDB uses to distribute documents among members of a @@ -1111,22 +1130,22 @@ Glossary Sharding enables horizontal scaling. See :doc:`/sharding`. shell helper - A method in ``mongosh`` that provides a more concise + A method in ``mongosh`` that has a concise syntax for a :doc:`database command `. Shell helpers - improve the general interactive experience. See + improve the interactive experience. See :doc:`/reference/method`. single-master replication A :term:`replication` topology where only a single database instance accepts writes. Single-master replication ensures - consistency and is the replication topology employed by MongoDB. + consistency and is the replication topology used by MongoDB. See :doc:`/core/replica-set-primary`. snapshot .. include:: /includes/snapshot-definition.rst snappy - A compression/decompression library designed to balance + A compression/decompression library to balance efficient computation requirements with reasonable compression rates. Snappy is the default compression library for MongoDB's use of :ref:`WiredTiger @@ -1140,26 +1159,18 @@ Glossary cluster`. See :doc:`/core/sharding-data-partitioning`. SQL - Structured Query Language (SQL) is a common special-purpose - programming language used for interaction with a relational - database, including access control, insertions, - updates, queries, and deletions. There are some similar - elements in the basic SQL syntax supported by different database - vendors, but most implementations have their own dialects, data - types, and interpretations of proposed SQL standards. Complex - SQL is generally not directly portable between major - :term:`RDBMS` products. ``SQL`` is often used as - metonym for relational databases. + Structured Query Language (SQL) is used for interaction with + relational databases. SSD - Solid State Disk. A high-performance disk drive that uses solid - state electronics for persistence, as opposed to the rotating platters - and movable read/write heads used by traditional mechanical hard drives. + Solid State Disk. High-performance storage that uses solid + state electronics for persistence instead of rotating platters + and movable read/write heads used by mechanical hard drives. standalone - An instance of :binary:`~bin.mongod` that is running as a single - server and not as part of a :term:`replica set`. To convert a - standalone into a replica set, see + An instance of :binary:`~bin.mongod` that runs as a single server + and not as part of a :term:`replica set`. To convert it to a + replica set, see :doc:`/tutorial/convert-standalone-to-replica-set`. stash collection @@ -1178,14 +1189,14 @@ Glossary Subject Alternative Name Subject Alternative Name (SAN) is an extension of the X.509 certificate which allows an array of values such as IP addresses - and domain names that specify which resources a single security + and domain names that specify the resources a single security certificate may secure. strict consistency A property of a distributed system requiring that all members - always reflect the latest changes to the system. In a database + contain the latest changes to the system. In a database system, this means that any system that can provide data must - reflect the latest writes at all times. + contain the latest writes. sync The :term:`replica set` operation where members replicate data @@ -1203,13 +1214,10 @@ Glossary tag A label applied to a replica set member and used by clients to issue data-center-aware operations. For more information - on using tags with replica sets, see the following - sections of this manual: :ref:`replica-set-read-preference-tag-sets`. - - .. versionchanged:: 3.4 + on using tags with replica sets, see :ref:`replica-set-read-preference-tag-sets`. - In MongoDB 3.4, sharded cluster :term:`zones ` replace - :term:`tags `. + In MongoDB 3.4, sharded cluster :term:`zones ` replace + :term:`tags `. tag set A document containing zero or more :term:`tags `. @@ -1230,11 +1238,12 @@ Glossary :doc:`/core/timeseries-collections`. topology - The state of a deployment of MongoDB instances, including - the type of deployment (i.e. standalone, replica set, or sharded - cluster) as well as the availability of servers, and the role of - each server (i.e. :term:`primary`, :term:`secondary`, - :term:`config server`, or :binary:`~bin.mongos`.) + The state of a deployment of MongoDB instances. Includes: + + - Type of deployment (standalone, replica set, or sharded cluster). + - Availability of servers. + - Role of each server (:term:`primary`, :term:`secondary`, + :term:`config server`, or :binary:`~bin.mongos`). transaction Group of read or write operations. For details, see @@ -1250,11 +1259,11 @@ Glossary TSV A text-based data format consisting of tab-separated values. This format is commonly used to exchange data between relational - databases, since the format is well-suited to tabular data. You can + databases because the format is suited to tabular data. You can import TSV files using :binary:`~bin.mongoimport`. TTL - Stands for "time to live" and represents an expiration time or + Time-to-live (TTL) is an expiration time or period for a given piece of information to remain in a cache or other temporary storage before the system deletes it or ages it out. MongoDB has a TTL collection feature. See @@ -1267,7 +1276,7 @@ Glossary arrays. unique index - An index that enforces uniqueness for a particular field across + An index that enforces uniqueness for a particular field in a single collection. See :ref:`index-type-unique`. unordered query plan @@ -1276,13 +1285,16 @@ Glossary See :ref:`read-operations-query-optimization`. upsert - An option for update operations; e.g. + An option for update operations. For example: :method:`db.collection.updateOne()`, - :method:`db.collection.findAndModify()`. If set to true, the - update operation will either update the document(s) matched by - the specified query or if no documents match, insert a new - document. The new document will have the fields indicated in the - operation. See :ref:`upsert-parameter`. + :method:`db.collection.findAndModify()`. If upsert is ``true``, + the update operation either: + + - updates the document(s) matched by the query. + - or if no documents match, inserts a new document. The new + document has the field values specified in the update operation. + + For more information about upserts, see :ref:`upsert-parameter`. virtual memory An application's working memory, typically residing on both @@ -1310,11 +1322,11 @@ Glossary specified number of members. See :doc:`/reference/write-concern`. write conflict - A situation in which two concurrent operations, at least - one of which is a write, attempt to use a resource in a way - that would violate constraints imposed by a storage engine - using optimistic :term:`concurrency control`. MongoDB will - transparently abort and retry one of the conflicting operations. + A situation where two concurrent operations, at least one of which + is a write, try to use a resource that violates the + constraints for a storage engine that uses optimistic + :term:`concurrency control`. MongoDB automatically ends and + retries one of the conflicting write operations. write lock An exclusive :term:`lock` on a resource such as a collection @@ -1324,9 +1336,9 @@ Glossary locks, see :doc:`/faq/concurrency`. writeBacks - The process within the sharding system that ensures that writes - issued to a :term:`shard` that *is not* responsible for the - relevant chunk get applied to the proper shard. For related + The process in the sharding system that ensures writes + sent to a :term:`shard` that *is not* responsible for the + relevant chunk are applied to the correct shard. For more information, see :ref:`faq-writebacklisten` and :ref:`server-status-writebacksqueued`. @@ -1348,9 +1360,9 @@ Glossary zone A grouping of documents based on ranges of :term:`shard key` values for a given sharded collection. Each shard in the sharded cluster can - associate with one or more zones. In a balanced cluster, MongoDB - directs reads and writes covered by a zone only to those shards - inside the zone. See the :ref:`zone-sharding` manual page for more + be in one or more zones. In a balanced cluster, MongoDB + directs reads and writes for a zone only to those shards + inside that zone. See the :ref:`zone-sharding` manual page for more information. Zones supersede functionality described by :term:`tags ` in MongoDB 3.2. From 1c00d261a05e8f702809bf8324bbe3692e3ee9f2 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:17:08 -0800 Subject: [PATCH 007/308] DOCSP-34943-wildcard-index (#5764) * DOCSP-34943-wildcard-index * DOCSP-34943-wildcard-index * DOCSP-34943-wildcard-index * DOCSP-34943-wildcard-index * DOCSP-34943-wildcard-index --------- Co-authored-by: jason-price-mongodb --- source/includes/limits-sharding-index-type.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/includes/limits-sharding-index-type.rst b/source/includes/limits-sharding-index-type.rst index 6988b6f4bad..246f4fdace8 100644 --- a/source/includes/limits-sharding-index-type.rst +++ b/source/includes/limits-sharding-index-type.rst @@ -3,9 +3,13 @@ key, a compound index that starts with the shard key and specifies ascending order for the shard key, or a :ref:`hashed index `. -A :term:`shard key` index cannot be a descending index on the shard key, -an index that specifies a :ref:`multikey index `, a -:ref:`text index ` or a :ref:`geospatial index -` on the :term:`shard key` fields. +A :term:`shard key` index cannot be a descending index on the shard key. +Additionally, a shard key index cannot be any of the following index +types: + +- :ref:`multikey ` +- :ref:`text ` +- :ref:`geospatial ` +- :ref:`wildcard ` .. COMMENT seealso extracts-geospatial-index-shard-key-restriction.yaml From 89b1f06476b23a596225c1b4ad3c3ce6fa0c0e62 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Thu, 11 Jan 2024 12:42:48 -0500 Subject: [PATCH 008/308] DOCSP-35373: Restore patch release upgrade page (#5810) * WIP * add upgrade revision page to toc * fix replacements * edits * edits * edits * add learn more --- config/redirects | 3 - .../configuration-and-maintenance.txt | 5 + source/includes/upgrade-intro.rst | 11 +- source/release-notes.txt | 2 + source/tutorial/upgrade-revision.txt | 224 ++++++++++++++++++ 5 files changed, 238 insertions(+), 7 deletions(-) create mode 100644 source/tutorial/upgrade-revision.txt diff --git a/config/redirects b/config/redirects index 33abdf99a8d..272061bda8f 100644 --- a/config/redirects +++ b/config/redirects @@ -2532,9 +2532,6 @@ raw: ${prefix}/${version}/applications/drivers -> ${base}/drivers/ [v4.2-*]: ${prefix}/${version}support/ -> ${base}/${version}/support [v4.2-*]: ${prefix}/${version}tutorial/resync-replica-set-member/ -> ${base}/${version}/tutorial/resync-replica-set-member/ -# DOCSP-32198 Redirect removed page -[v7.0-*]: ${prefix}/${version}/tutorial/upgrade-revision -> ${base}/${version}/release-notes/ - # DOCSP-31908 Removing free monitoring pages after decomission [*]: ${prefix}/${version}/reference/method/db.enableFreeMonitoring -> ${base}/${version}/administration/free-monitoring/ [*]: ${prefix}/${version}/reference/method/db.disableFreeMonitoring -> ${base}/${version}/administration/free-monitoring/ diff --git a/source/administration/configuration-and-maintenance.txt b/source/administration/configuration-and-maintenance.txt index 00b216f94e1..4d245603167 100644 --- a/source/administration/configuration-and-maintenance.txt +++ b/source/administration/configuration-and-maintenance.txt @@ -13,6 +13,10 @@ updating your MongoDB deployment's configuration. Outlines common MongoDB configurations and examples of best-practice configurations for common use cases. +:ref:`upgrade-to-latest-revision` + Upgrade a MongoDB deployment to a different patch release + within the same major release series. + :doc:`/tutorial/manage-mongodb-processes` Start, configure, and manage running :binary:`~bin.mongod` process. @@ -30,6 +34,7 @@ updating your MongoDB deployment's configuration. :hidden: /administration/configuration + /tutorial/upgrade-revision /tutorial/manage-mongodb-processes /tutorial/terminate-running-operations /tutorial/rotate-log-files diff --git a/source/includes/upgrade-intro.rst b/source/includes/upgrade-intro.rst index 0593b2b195a..426cf60ac2b 100644 --- a/source/includes/upgrade-intro.rst +++ b/source/includes/upgrade-intro.rst @@ -1,4 +1,7 @@ -Use this tutorial to upgrade from a previous major release or upgrade -to the latest patch release of your current release series. Familiarize -yourself with the content of this document, including thoroughly reviewing the -prerequisites, prior to upgrading to MongoDB |newversion|. +Use this tutorial to upgrade from MongoDB |oldversion| to MongoDB +|newversion|. To upgrade to a new patch release within the same release +series, see :ref:`upgrade-to-latest-revision`. + +Familiarize yourself with the content of this document, including +thoroughly reviewing the prerequisites, prior to upgrading to MongoDB +|newversion|. diff --git a/source/release-notes.txt b/source/release-notes.txt index 160da00a2c7..1810b924a58 100644 --- a/source/release-notes.txt +++ b/source/release-notes.txt @@ -1,5 +1,7 @@ .. start-include-here +.. _server-release-notes-landing: + Release Notes ------------- diff --git a/source/tutorial/upgrade-revision.txt b/source/tutorial/upgrade-revision.txt new file mode 100644 index 00000000000..3a63b383477 --- /dev/null +++ b/source/tutorial/upgrade-revision.txt @@ -0,0 +1,224 @@ +.. _upgrade-to-latest-revision: + +============================================== +Upgrade to the Latest Patch Release of MongoDB +============================================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +MongoDB version numbers have the form ``X.Y.Z`` where ``Z`` refers to +the patch release number. Patch releases provide security patches, bug +fixes, and new or changed features that generally do not contain any +backward breaking changes. Always upgrade to the latest patch release in +your release series. + +For more information on versioning, see :ref:`release-version-numbers`. + +About this Task +--------------- + +This page describes upgrade procedures for the MongoDB +{+latest-lts-version+} release series. To upgrade a different release +series, refer to the corresponding version of the manual. + +.. _upgrade-options: + +Before You Begin +---------------- + +Review the following sections to ensure that your deployment is ready to +be upgraded. + +Backup +~~~~~~ + +Ensure you have an up-to-date backup of your data set. See +:ref:`backup-methods`. + +Compatibility Considerations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Consult the following documents for any special considerations or +compatibility issues specific to your MongoDB release: + +- :ref:`Release notes ` + +- :driver:`Driver documentation ` + +Maintenance Window +~~~~~~~~~~~~~~~~~~ + +If your installation includes :term:`replica sets `, set +the upgrade to occur during a predefined maintenance window. + +Staging Environment Check +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Before you upgrade a production environment, use the procedures in this +document to upgrade a *staging* environment that reproduces your +production environment. Ensure that your production configuration is +compatible with all changes before upgrading. + +.. _upgrade-procedure: + +Steps +----- + +Upgrade each :binary:`~bin.mongod` and :binary:`~bin.mongos` binary +separately. Follow this upgrade procedure: + +#. For deployments that use authentication, first upgrade all of your + MongoDB Drivers. To upgrade, see the + :driver:`documentation for your driver `. + +#. Upgrade any standalone instances. See + :ref:`upgrade-mongodb-instance`. + +#. Upgrade any replica sets that are not part of a sharded cluster, as + described in :ref:`upgrade-replica-set`. + +#. Upgrade sharded clusters, as described in + :ref:`upgrade-sharded-cluster`. + +.. _upgrade-mongodb-instance: + +Upgrade a MongoDB Instance +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To upgrade a {+latest-lts-version+} :binary:`~bin.mongod` or +:binary:`~bin.mongos` instance, use one of these approaches: + +- Upgrade the instance using the operating system's package management + tool and the official MongoDB packages. This is the preferred + approach. See :doc:`/installation`. + +- Upgrade the instance by replacing the existing binaries with new + binaries. See :ref:`upgrade-replace-binaries`. + +.. _upgrade-replace-binaries: + +Replace the Existing Binaries +````````````````````````````` + +This section describes how to upgrade MongoDB by replacing the existing +binaries. The preferred approach to an upgrade is to use the operating +system's package management tool and the official MongoDB packages, as +described in :doc:`/installation`. + +To upgrade a :binary:`~bin.mongod` or :binary:`~bin.mongos` instance by +replacing the existing binaries: + +1. Download the binaries for the latest MongoDB patch release from the + `MongoDB Download Page`_ and store the binaries in a temporary + location. The binaries download as compressed files that uncompress + to the directory structure used by the MongoDB installation. + +#. Shutdown the instance. + +#. Replace the existing MongoDB binaries with the downloaded binaries. + +#. Make any required configuration file changes. + +#. Restart the instance. + +.. _`MongoDB Download Page`: https://www.mongodb.com/try/download/community?tck=docs_server + +.. _upgrade-replica-set: + +Upgrade Replica Sets +~~~~~~~~~~~~~~~~~~~~ + +To upgrade a {+latest-lts-version+} replica set, upgrade each member +individually, starting with the :term:`secondaries ` and +finishing with the :term:`primary`. Plan the upgrade during a predefined +maintenance window. + +.. include:: /includes/upgrade-downgrade-replica-set.rst + +Upgrade Secondaries +``````````````````` + +Upgrade each secondary separately as follows: + +1. Upgrade the secondary's :binary:`~bin.mongod` binary by following the + instructions in :ref:`upgrade-mongodb-instance`. + +#. After upgrading a secondary, wait for the secondary to recover to + the ``SECONDARY`` state before upgrading the next instance. To + check the member's state, issue :method:`rs.status()` in + :binary:`~bin.mongosh`. + + The secondary may briefly go into ``STARTUP2`` or ``RECOVERING``. + This is normal. Make sure to wait for the secondary to fully recover + to ``SECONDARY`` before you continue the upgrade. + +Upgrade the Primary +``````````````````` + +1. Step down the primary to initiate the normal :ref:`failover + ` procedure. Using one of the following: + + - The :method:`rs.stepDown()` helper in :binary:`~bin.mongosh`. + + - The :dbcommand:`replSetStepDown` database command. + + During failover, the set cannot accept writes. Typically this takes + 10-20 seconds. Plan the upgrade during a predefined maintenance + window. + + .. note:: Stepping down the primary is preferable to directly + *shutting down* the primary. Stepping down expedites the + failover procedure. + +#. Once the primary has stepped down, call the :method:`rs.status()` + method from :binary:`~bin.mongosh` until you see that another + member has assumed the ``PRIMARY`` state. + +#. Shut down the original primary and upgrade its instance by + following the instructions in :ref:`upgrade-mongodb-instance`. + +.. _upgrade-sharded-cluster: + +Upgrade Sharded Clusters +~~~~~~~~~~~~~~~~~~~~~~~~ + +To upgrade a {+latest-lts-version+} sharded cluster: + +1. Disable the cluster's balancer as described in + :ref:`sharding-balancing-disable-temporarily`. + +#. Upgrade the :ref:`config servers `. + + To upgrade the config server replica set, use the procedures in + :ref:`upgrade-replica-set`. + +#. Upgrade each shard. + + - If a shard is a replica set, upgrade the shard using the + procedure titled :ref:`upgrade-replica-set`. + + - If a shard is a standalone instance, upgrade the shard using the + procedure titled + :ref:`upgrade-mongodb-instance`. + +#. Once the config servers and the shards have been upgraded, upgrade + each :binary:`~bin.mongos` instance by following the instructions in + :ref:`upgrade-mongodb-instance`. You can upgrade the + :binary:`~bin.mongos` instances in any order. + +#. Re-enable the balancer, as described in :ref:`sharding-balancing-re-enable`. + +Learn More +---------- + +- :ref:`production-notes` + +- :ref:`sharding-manage-shards` + +- :ref:`replica-set-sync` From ef50641245bc2c872a0de1fb9eae3ad9a8299f25 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Thu, 11 Jan 2024 09:51:04 -0800 Subject: [PATCH 009/308] Update QE and CSFLE compatability tables (#5788) * wip while switching branches * wip while waiting for more deets * ready for review * add facets * fix formatting * add mongodb-crypt dependency * DOCSP-29667-bulk-command-remove-content (#5778) * DOCSP-29667-bulk-command-remove-content * DOCSP-29667-bulk-command-remove-content --------- Co-authored-by: jason-price-mongodb * DOCSP-35223 7.0.5 Release Notes (Final) (#5773) * DOCSP-35223 7.0.5 Release Notes (Final) * Fixes per Maria Prinus * DOCSP-35317 5.0.24 Release Notes (#5749) * DOCSP-35317 5.0.24 Release Notes * * * fix affected versions * Add tcmallocAggressiveMemoryDecommit (#5650) * add tcmallocAggressiveMemoryDecommit * wordsmithing * external review suggestions and clarifications * writing review * Update source/reference/parameters.txt Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> * Update source/reference/parameters.txt Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> * fix formatting * final? review * Update source/reference/parameters.txt Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> * final changes, I hope... * fix formatting --------- Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> * fix single-hash issue (#5789) * DOCSP-35006-glossary-4 (#5642) * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 * DOCSP-35006-glossary-4 --------- Co-authored-by: jason-price-mongodb * DOCSP-34943-wildcard-index (#5764) * DOCSP-34943-wildcard-index * DOCSP-34943-wildcard-index * DOCSP-34943-wildcard-index * DOCSP-34943-wildcard-index * DOCSP-34943-wildcard-index --------- Co-authored-by: jason-price-mongodb * change scala version --------- Co-authored-by: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Co-authored-by: jason-price-mongodb Co-authored-by: Kenneth P. J. Dyer <93145796+kennethdyer@users.noreply.github.com> Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> --- config/redirects | 3 +++ source/core/csfle/reference/compatibility.txt | 20 +++++++++++++++---- .../reference/compatibility.txt | 19 ++++++++++++++---- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/config/redirects b/config/redirects index 272061bda8f..33abdf99a8d 100644 --- a/config/redirects +++ b/config/redirects @@ -2532,6 +2532,9 @@ raw: ${prefix}/${version}/applications/drivers -> ${base}/drivers/ [v4.2-*]: ${prefix}/${version}support/ -> ${base}/${version}/support [v4.2-*]: ${prefix}/${version}tutorial/resync-replica-set-member/ -> ${base}/${version}/tutorial/resync-replica-set-member/ +# DOCSP-32198 Redirect removed page +[v7.0-*]: ${prefix}/${version}/tutorial/upgrade-revision -> ${base}/${version}/release-notes/ + # DOCSP-31908 Removing free monitoring pages after decomission [*]: ${prefix}/${version}/reference/method/db.enableFreeMonitoring -> ${base}/${version}/administration/free-monitoring/ [*]: ${prefix}/${version}/reference/method/db.disableFreeMonitoring -> ${base}/${version}/administration/free-monitoring/ diff --git a/source/core/csfle/reference/compatibility.txt b/source/core/csfle/reference/compatibility.txt index 6bfbe0bbbee..931ad7c0f43 100644 --- a/source/core/csfle/reference/compatibility.txt +++ b/source/core/csfle/reference/compatibility.txt @@ -1,3 +1,11 @@ +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: csharp, go, java, javascript/typescript, php, python, ruby, rust, scala + .. _csfle-compatibility-reference: .. _field-level-encryption-drivers: .. _csfle-driver-compatibility: @@ -39,14 +47,14 @@ versions or later: - | `Node.js Quickstart `__ | :driver:`Client-Side Field Level Encryption Guide ` - * - :driver:`Java ` - - ``3.12.0+`` + * - :driver:`Java (Synchronous) ` + - ``3.11.0+`` - | `Java Driver Quickstart `__ | `Java Async Driver Quickstart `__ | :driver:`Client-Side Field Level Encryption Guide ` * - `Java Reactive Streams `__ - - ``1.13.0+`` + - ``1.12.0+`` - `Java RS Documentation `__ * - :driver:`Python (PyMongo) ` @@ -58,6 +66,10 @@ versions or later: - ``2.10.0+`` - `.NET Driver Quickstart `__ + * - :driver:`C++ ` + - ``3.6.0`` + - `C Driver Client-Side Field Level Encryption `__ + * - :driver:`C ` - ``1.17.5`` - `C Driver Client-Side Field Level Encryption `__ @@ -67,7 +79,7 @@ versions or later: - `Go Driver Quickstart `__ * - :driver:`Scala ` - - ``2.8.0+`` + - ``2.7.0+`` - `Scala Documentation `__ * - :driver:`PHP ` diff --git a/source/core/queryable-encryption/reference/compatibility.txt b/source/core/queryable-encryption/reference/compatibility.txt index 17c4a55e2a6..26c31b884c0 100644 --- a/source/core/queryable-encryption/reference/compatibility.txt +++ b/source/core/queryable-encryption/reference/compatibility.txt @@ -1,6 +1,14 @@ +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: csharp, go, java, javascript/typescript, php, python, ruby, rust, scala + .. _qe-driver-compatibility: .. _qe-compatibility-reference: - + ================================== {+qe+} Compatibility ================================== @@ -46,10 +54,10 @@ compatible MongoDB drivers: * - :driver:`C#/.NET ` version ``2.20.0`` or later - No additional dependency - - * - :driver:`Java (Synchronous) ` version ``4.10.0`` or later + + * - :driver:`Java (Synchronous) and Java Reactive Streams ` version ``4.10.0`` or later - `mongodb-crypt `__ version ``1.8.0`` or later - + * - :driver:`PyMongo ` version ``4.4`` or later - `pymongocrypt `__ version ``1.6`` or later @@ -71,3 +79,6 @@ compatible MongoDB drivers: * - :driver:`Rust ` version ``2.6.0`` or later - :ref:`libmongocrypt ` version ``1.8.0`` or later + * - :driver:`Scala ` version ``4.10.0`` or later + - `mongodb-crypt `__ version ``1.8.0`` or later + From 1b6b107cca7a29d072ab93ae1e3c9e42d0cd8932 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:25:02 -0800 Subject: [PATCH 010/308] DOCSP-35359-6.0.13-rn Release Notes (#5787) * DOCSP-35359-6.0.13-rn * DOCSP-35359-6.0.13-rn * DOCSP-35359-6.0.13-rn * DOCSP-35359-6.0.13-rn * DOCSP-35359-6.0.13-rn * DOCSP-35359-6.0.13-rn --------- Co-authored-by: jason-price-mongodb --- .../includes/changelogs/releases/6.0.13.rst | 182 ++++++++++++++++++ source/release-notes/6.0-changelog.txt | 2 + source/release-notes/6.0.txt | 18 ++ 3 files changed, 202 insertions(+) create mode 100644 source/includes/changelogs/releases/6.0.13.rst diff --git a/source/includes/changelogs/releases/6.0.13.rst b/source/includes/changelogs/releases/6.0.13.rst new file mode 100644 index 00000000000..c008d6a80d7 --- /dev/null +++ b/source/includes/changelogs/releases/6.0.13.rst @@ -0,0 +1,182 @@ +.. _6.0.13-changelog: + +6.0.13 Changelog +---------------- + +Sharding +~~~~~~~~ + +- :issue:`SERVER-50792` Return more useful errors when a shard key index + can't be found for shardCollection/refineCollectionShardKey +- :issue:`SERVER-73763` Resharding does not extend zone ranges for + config.tag docs, leading to config server primary fassert loop from + duplicate key error +- :issue:`SERVER-82838` ReshardingOplogApplier uses {w: "majority", + wtimeout: 60000} write concern when persisting resharding oplog + application progress +- :issue:`SERVER-82883` Recovering TransactionCoordinator on stepup may + block acquiring read/write tickets while participants are in the + prepared state +- :issue:`SERVER-82953` + CreateCollectionCoordinator::checkIfOptionsConflict should be more + verbose +- :issue:`SERVER-83146` Bulk write operation might fail with + NamespaceNotFound +- :issue:`SERVER-83775` Do not balance data between shards owning more + than the ideal data size + +Replication +~~~~~~~~~~~ + +:issue:`SERVER-70155` Add duration of how long an oplog slot is kept +open to mongod "Slow query" log lines + +Storage +~~~~~~~ + +:issue:`SERVER-33494` WT SizeStorer never deletes old entries + +Internals +~~~~~~~~~ + +- :issue:`SERVER-62955` Add a no-op oplog entry for reshardCollection + command +- :issue:`SERVER-65666` Do not create chunks on draining shards when + sharding a new collection +- :issue:`SERVER-65908` Update fields for reshardCollection noop message +- :issue:`SERVER-67766` Log index and collection successful drop +- :issue:`SERVER-69615` Rollback fuzzing in WiredTiger leads to size + storer marked dirty at shutdown +- :issue:`SERVER-70338` Query yield accesses the storage engine without + locks during shutdown and rollback +- :issue:`SERVER-70974` Fix early-exits triggered when user specifies + TCP Fast Open server parameters +- :issue:`SERVER-71923` Emit change log event for + ConfigureCollectionBalancing invocations +- :issue:`SERVER-72683` increase timeout in disk/directoryperdb.js +- :issue:`SERVER-73439` Make the $inProg filter in the setup for the + killop test more specific +- :issue:`SERVER-74074` Exclude auth consistency workloads from + concurrency simultaneous suites +- :issue:`SERVER-75033` Capture core dumps from test failures on macOS +- :issue:`SERVER-76560` Time series collections not always honoring + expireAfterSeconds correctly +- :issue:`SERVER-77311` Add a new log message when a secondary node is + skipping a two-phase index build with a subset of indexes built +- :issue:`SERVER-77506` Sharded multi-document transactions can mismatch + data and ShardVersion +- :issue:`SERVER-77827` Allow restore role to drop system.views +- :issue:`SERVER-77926` Add LSAN suppressions for executor worker + threads +- :issue:`SERVER-78009` shardSvrCommitReshardCollection command should + fail recoverably if the node is shutting down +- :issue:`SERVER-79235` rolling_index_builds_interrupted.js checkLog + relies on clearRawMongoProgramOutput +- :issue:`SERVER-79864` TTL deleter does not correctly handle time + series collections with extended range dates +- :issue:`SERVER-79982` Batched catalog writers can run concurrently + with HistoricalCatalogIdTracker::cleanup() and lead to incorrect PIT + find results. +- :issue:`SERVER-80660` Log a summary of where mongodb spent time during + startup and shutdown +- :issue:`SERVER-80789` Make AutoGetOplog behave consistently in replica + set node started as standalone +- :issue:`SERVER-80974` Unclean shutdown while dropping local.* + collection and indexes can make the catalog inconsistent +- :issue:`SERVER-81028` Incorrect $listCatalog behavior in presence of a + concurrent collection rename in v7.0 +- :issue:`SERVER-81046` add requireSequenceTokens to + SearchCommand.CursorOptions +- :issue:`SERVER-81133` Speedup logic to persist routing table cache +- :issue:`SERVER-81143` export_import_concurrency.js should check for + code 2 when killing child resmoke client +- :issue:`SERVER-81375` Disable internal transactions resharding tests + in CSRS stepdown suite +- :issue:`SERVER-81442` Poke WT oplog reclamation thread periodically +- :issue:`SERVER-81606` Exclude untimestamped catalog durability test + from in-memory variants +- :issue:`SERVER-81949` Sync from 10gen/mongo to mongodb/mongo on v4.4 + with copybara +- :issue:`SERVER-82043` Enhancement of Commit Message Validation for + 10gen/mongo Commits +- :issue:`SERVER-82073` Fix merge chunk command generation in + collection_defragmentation.js +- :issue:`SERVER-82111` In sharded_agg_helpers.cpp move invariant below + response status check +- :issue:`SERVER-82197` Incorrect query results in SBE if $group spills + in presence of collation +- :issue:`SERVER-82223` Commit handler in FCV op observer is susceptible + to interruption +- :issue:`SERVER-82365` Optimize the construction of the balancer's + collection distribution status histogram (2nd attempt) +- :issue:`SERVER-82368` Match top/bottom N accumulators in SBE and + Classic +- :issue:`SERVER-82391` [v4.4] Only allow github Apps Copybara Syncer: + 10gen-to-Mongodb to syncs new commits to mongodb/mongo +- :issue:`SERVER-82437` db.collection.getSearchIndexes() + returns duplicate index +- :issue:`SERVER-82447` $project incorrectly pushed down on timeseries + when $project uses $getField on a measurement field +- :issue:`SERVER-82449` [v4.4] Optimize copybara sync behavior for + specific no-change scenarios +- :issue:`SERVER-82555` Use shallow clone to speed up performance tests +- :issue:`SERVER-82640` Upload mongod --version output to S3 during + server compilation in Evergreen +- :issue:`SERVER-82708` Update variants used to performance test stable + branches +- :issue:`SERVER-82730` The validate cmd can invariant on corrupted + keystrings +- :issue:`SERVER-82781` Simulate crash test hook may leave behind part + of file when copying data +- :issue:`SERVER-82967` Stepdown after calling + ActiveIndexBuilds::registerIndexBuild() during index build setup + doesn't unregister itself +- :issue:`SERVER-83091` $or query can trigger an infinite loop during + plan enumeration +- :issue:`SERVER-83099` LDAPTimer::setTimeout may run callback inline +- :issue:`SERVER-83107` Add 'type' field to search IndexDefinition + struct +- :issue:`SERVER-83161` Fix concurrent read to _errMsg from + MigrationDestinationManager without acquiring mutex +- :issue:`SERVER-83283` Modify copybara script to send slack message on + failure +- :issue:`SERVER-83336` Temporarily disable + wt_size_storer_cleanup_replica_set.js on macOS +- :issue:`SERVER-83354` Schedule copybara instance after each commit + made +- :issue:`SERVER-83389` aggregation_optimization_fuzzer fails on 6.0 and + 7.0 with a disabled disablePipelineOptimization failpoint +- :issue:`SERVER-83485` Fix multikey-path serialization code used during + validation +- :issue:`SERVER-83494` [7.0] Fix range deleter unit test case +- :issue:`SERVER-83567` Push in classic stores missing values. +- :issue:`SERVER-83592` Add resmoke flag --enable_enterprise_tests + enable enterprise js tests +- :issue:`SERVER-83655` Restore legal client ns exception for + admin.system.new_users +- :issue:`SERVER-83830` On Enterprise build creating a collection in a + replica set with the storageEngine.inMemory option breaks secondaries +- :issue:`SERVER-83866` Update BACKPORTS_REQUIRED_BASE_URL from + mongodb/mongo to 10gen/mongo +- :issue:`SERVER-83874` Move primary operation doesn't drop + db.system.views on the donor +- :issue:`SERVER-83916` Add LSAN Suppression for threads leaked by + unjoined thread pools +- :issue:`SERVER-83993` timeseries_union_with.js fails intermittently in + retryable_writes_downgrade suites on v6.0 +- :issue:`SERVER-84013` Incorrect results for index scan plan on query + with duplicate predicates in nested $or +- :issue:`SERVER-84130` Incorrect bucket-level filter optimization when + some events in the bucket are missing the field +- :issue:`SERVER-84353` The test for stepDown deadlock with read ticket + exhaustion is flaky +- :issue:`WT-11121` failed: format next returned OOO key +- :issue:`WT-11186` Restore ignore_prepare semantics to read with + read_committed isolation instead of read_uncommitted +- :issue:`WT-11491` Log the WiredTiger time spent during startup and + shutdown +- :issue:`WT-11774` Add diagnostic stat to investigate eviction server's + inability to queue pages +- :issue:`WT-12036` Workaround for lock contention on Windows +- :issue:`WT-12147` Temporarily disable clang-analyzer + diff --git a/source/release-notes/6.0-changelog.txt b/source/release-notes/6.0-changelog.txt index 3a57c4ec59e..cb4a41ad039 100644 --- a/source/release-notes/6.0-changelog.txt +++ b/source/release-notes/6.0-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/6.0.13.rst + .. include:: /includes/changelogs/releases/6.0.12.txt .. include:: /includes/changelogs/releases/6.0.11.txt diff --git a/source/release-notes/6.0.txt b/source/release-notes/6.0.txt index 6aa4084f28b..f9c7b63ecc8 100644 --- a/source/release-notes/6.0.txt +++ b/source/release-notes/6.0.txt @@ -50,6 +50,24 @@ see :ref:`release-version-numbers`. Patch Releases -------------- +.. _6.0.13-release-notes: + +6.0.13 - Upcoming +~~~~~~~~~~~~~~~~~ + +- :issue:`SERVER-33494` WT SizeStorer never deletes old entries +- :issue:`SERVER-50792` Return more useful errors when a shard key index + can't be found for shardCollection/refineCollectionShardKey +- :issue:`SERVER-70155` Add duration of how long an oplog slot is kept + open to mongod "Slow query" log lines +- :issue:`SERVER-77506` Sharded multi-document transactions can mismatch + data and ShardVersion +- :issue:`SERVER-83091` $or query can trigger an infinite loop during + plan enumeration +- `All Jira issues closed in 6.0.13 + `__ +- :ref:`6.0.13-changelog` + .. _6.0.12-release-notes: 6.0.12 - Nov 27, 2023 From 104042bda051252d5d845374e599068ab7037159 Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Thu, 11 Jan 2024 15:51:32 -0500 Subject: [PATCH 011/308] DOCSP-31553-change-streams-clarification (#5790) --- source/changeStreams.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/changeStreams.txt b/source/changeStreams.txt index aba3df3d581..bd46d4a58b9 100644 --- a/source/changeStreams.txt +++ b/source/changeStreams.txt @@ -29,7 +29,7 @@ Change Streams :keywords: database triggers, real time, code example, node.js, java sync, motor, swift sync, swift async Change streams allow applications to access real-time data changes -without the complexity and risk of tailing the :term:`oplog`. +without the prior complexity and risk of manually tailing the :term:`oplog`. Applications can use change streams to subscribe to all data changes on a single collection, a database, or an entire deployment, and immediately react to them. Because change streams use the aggregation From 796874ce0246327043f3d337415610b79ed31243 Mon Sep 17 00:00:00 2001 From: Sarah Olson <98367156+sarah-olson-mongodb@users.noreply.github.com> Date: Thu, 11 Jan 2024 12:55:38 -0800 Subject: [PATCH 012/308] DOCSP-35399: Post hapley cleanup (#5819) * DOCSP-35399: Post hapley cleanup * DOCSP-35399: Additional minor cleanup --- snooty.toml | 6 +++--- source/index.txt | 2 +- source/introduction.txt | 2 +- source/release-notes.txt | 9 +++++---- source/release-notes/7.2-compatibility.txt | 2 -- source/release-notes/7.2.txt | 8 +++----- source/release-notes/7.3-compatibility.txt | 2 +- source/release-notes/7.3.txt | 2 +- 8 files changed, 15 insertions(+), 18 deletions(-) diff --git a/snooty.toml b/snooty.toml index d61dbf175e0..c9b23ec23e1 100644 --- a/snooty.toml +++ b/snooty.toml @@ -249,7 +249,7 @@ sbe-short = "slot-based execution engine" sbe-title = "Slot-Based Query Execution Engine" version = "{+version+}" version-last = "{+version-last+}" -year = "2023" +year = "2024" ui-org-menu = ":icon-mms:`office` :guilabel:`Organizations` menu" [constants] @@ -265,8 +265,8 @@ package-name = "mongodb" version = "7.3" latest-lts-version = "7.0" last-supported-version = "5.0" -release = "7.1.1" -version-dev = "7.2" +release = "7.2.0" +version-dev = "7.3" version-last = "6.0" pgp-version = "{+version+}" rsa-key = "4B7C549A058F8B6B" diff --git a/source/index.txt b/source/index.txt index 25174372a81..8b96ae8d400 100644 --- a/source/index.txt +++ b/source/index.txt @@ -21,7 +21,7 @@ What is MongoDB? .. button:: Get started with MongoDB Atlas :uri: https://www.mongodb.com/cloud?tck=docs_server - .. include:: /includes/rc-available.rst + .. include:: /includes/in-dev.rst .. image:: /images/hero.png :alt: Homepage hero image diff --git a/source/introduction.txt b/source/introduction.txt index aeba501a41f..52f45f7ba40 100644 --- a/source/introduction.txt +++ b/source/introduction.txt @@ -19,7 +19,7 @@ Introduction to MongoDB :depth: 1 :class: singlecol -.. include:: /includes/rapid-release-short.rst +.. include:: /includes/in-dev.rst You can create a MongoDB database in the following environments: diff --git a/source/release-notes.txt b/source/release-notes.txt index 1810b924a58..a99d3a00649 100644 --- a/source/release-notes.txt +++ b/source/release-notes.txt @@ -14,18 +14,18 @@ To see changes in MongoDB releases, see the following release notes. Upcoming Release ~~~~~~~~~~~~~~~~ -.. include:: /includes/rc-available.rst +.. include:: /includes/in-dev.rst -- :ref:`release-notes-7.2` +- :ref:`release-notes-7.3` Current Rapid Release ~~~~~~~~~~~~~~~~~~~~~ -(*7.1-series*) +(*7.2-series*) .. include:: /includes/rapid-release-short.rst -- :ref:`release-notes-7.1` +- :ref:`release-notes-7.2` Current Stable Release ~~~~~~~~~~~~~~~~~~~~~~ @@ -37,6 +37,7 @@ Current Stable Release Previous Rapid Releases ~~~~~~~~~~~~~~~~~~~~~~~ +- :ref:`release-notes-7.1` - :ref:`release-notes-6.3` - :ref:`release-notes-6.2` - :ref:`release-notes-6.1` diff --git a/source/release-notes/7.2-compatibility.txt b/source/release-notes/7.2-compatibility.txt index 7d263575a18..ae81ca94208 100644 --- a/source/release-notes/7.2-compatibility.txt +++ b/source/release-notes/7.2-compatibility.txt @@ -14,8 +14,6 @@ Compatibility Changes in MongoDB 7.2 .. _7.2-downgrade-incompatible: -.. include:: /includes/rc-available.rst - .. include:: /includes/rapid-release-short.rst Backward-Incompatible Features diff --git a/source/release-notes/7.2.txt b/source/release-notes/7.2.txt index a54dbb454b5..6af66dcc7ee 100644 --- a/source/release-notes/7.2.txt +++ b/source/release-notes/7.2.txt @@ -1,8 +1,8 @@ .. _release-notes-7.2: -================================================= -Release Notes for MongoDB 7.2 (Release Candidate) -================================================= +============================= +Release Notes for MongoDB 7.2 +============================= .. default-domain:: mongodb @@ -12,8 +12,6 @@ Release Notes for MongoDB 7.2 (Release Candidate) :depth: 1 :class: twocols -.. include:: /includes/rc-available.rst - .. include:: /includes/rapid-release-short.rst General Changes diff --git a/source/release-notes/7.3-compatibility.txt b/source/release-notes/7.3-compatibility.txt index 887345eb8a4..c873b996bc5 100644 --- a/source/release-notes/7.3-compatibility.txt +++ b/source/release-notes/7.3-compatibility.txt @@ -14,7 +14,7 @@ Compatibility Changes in MongoDB 7.3 .. _7.3-downgrade-incompatible: -.. include:: /includes/rapid-release-short.rst +.. include:: /includes/in-dev.rst Backward-Incompatible Features ------------------------------ diff --git a/source/release-notes/7.3.txt b/source/release-notes/7.3.txt index 5aac9c717fd..614bfd6ce3e 100644 --- a/source/release-notes/7.3.txt +++ b/source/release-notes/7.3.txt @@ -12,7 +12,7 @@ Release Notes for MongoDB 7.3 (Release Candidate) :depth: 1 :class: twocols -.. include:: /includes/rapid-release-short.rst +.. include:: /includes/in-dev.rst General Changes --------------- From 8f7af4ab68d89adf0a2cb9854d834568fdd2cab9 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Tue, 16 Jan 2024 11:29:36 -0500 Subject: [PATCH 013/308] DOCSP-35340 Fix 404 Errors (#5751) * DOCSP-35340 Fix 404 Errors * * * Empty-Commit * Copy Review --- source/reference/configuration-options.txt | 6 +++--- source/reference/method/db.collection.bulkWrite.txt | 5 ++--- source/reference/method/db.collection.update.txt | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/source/reference/configuration-options.txt b/source/reference/configuration-options.txt index e177562512d..2cb2c1afe6e 100644 --- a/source/reference/configuration-options.txt +++ b/source/reference/configuration-options.txt @@ -3434,7 +3434,7 @@ Key Management Configuration Options .. note:: An explanation of `RFC4514 `_, - `RFC4515 `_, + `RFC4515 `_, `RFC4516 `_, or LDAP queries is out of scope for the MongoDB Documentation. Please review the RFC directly or use your preferred LDAP resource. @@ -3521,7 +3521,7 @@ Key Management Configuration Options *Available in MongoDB Enterprise only.* A relative LDAP query URL formatted conforming to `RFC4515 - `_ and `RFC4516 + `_ and `RFC4516 `_ that :binary:`~bin.mongod` executes to obtain the LDAP groups to which the authenticated user belongs to. The query is relative to the host or hosts specified in :setting:`security.ldap.servers`. @@ -3589,7 +3589,7 @@ Key Management Configuration Options .. note:: - An explanation of `RFC4515 `_, + An explanation of `RFC4515 `_, `RFC4516 `_ or LDAP queries is out of scope for the MongoDB Documentation. Please review the RFC directly or use your preferred LDAP resource. diff --git a/source/reference/method/db.collection.bulkWrite.txt b/source/reference/method/db.collection.bulkWrite.txt index bb13d35df8e..6cadf85547f 100644 --- a/source/reference/method/db.collection.bulkWrite.txt +++ b/source/reference/method/db.collection.bulkWrite.txt @@ -42,9 +42,8 @@ Compatibility You can't perform :ref:`bulk write ` operations in the :ref:`Atlas UI `. - To insert multiple documents, you must insert an array of documents. - To learn more, see :atlas:`Create, View, Update, and Delete Documents - ` in the Atlas documentation. + To insert multiple documents, you must insert an array of documents. + To learn more, see :ref:`atlas-ui-docs` in the Atlas documentation. Syntax ------ diff --git a/source/reference/method/db.collection.update.txt b/source/reference/method/db.collection.update.txt index 64039a146d3..96d2d10b160 100644 --- a/source/reference/method/db.collection.update.txt +++ b/source/reference/method/db.collection.update.txt @@ -39,8 +39,8 @@ Compatibility .. include:: /includes/fact-compatibility.rst To learn how to update documents hosted in {+atlas+} by -using the Atlas UI, see :atlas:`Create, View, Update, and Delete Documents -`. +using the Atlas UI, see :ref:``. + Syntax ------ From 0d963bbfa57a46937623f8c414c8c88f73813b5a Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Tue, 16 Jan 2024 09:00:11 -0800 Subject: [PATCH 014/308] DOCSP-34779 Add info on Atlas Support for Replication Commands (#5791) --- ...act-environments-atlas-support-no-free-or-m10.rst | 2 +- source/reference/command/applyOps.txt | 11 +++++++++++ source/reference/command/hello.txt | 11 +++++++++++ .../reference/command/replSetAbortPrimaryCatchUp.txt | 11 +++++++++++ source/reference/command/replSetFreeze.txt | 11 +++++++++++ source/reference/command/replSetGetConfig.txt | 12 ++++++++++++ source/reference/command/replSetGetStatus.txt | 10 ++++++++++ source/reference/command/replSetInitiate.txt | 11 +++++++++++ source/reference/command/replSetMaintenance.txt | 11 +++++++++++ source/reference/command/replSetReconfig.txt | 10 ++++++++++ source/reference/command/replSetResizeOplog.txt | 11 +++++++++++ source/reference/command/replSetStepDown.txt | 11 +++++++++++ source/reference/command/replSetSyncFrom.txt | 11 +++++++++++ 13 files changed, 132 insertions(+), 1 deletion(-) diff --git a/source/includes/fact-environments-atlas-support-no-free-or-m10.rst b/source/includes/fact-environments-atlas-support-no-free-or-m10.rst index 2764605c051..8a2b00e7ea0 100644 --- a/source/includes/fact-environments-atlas-support-no-free-or-m10.rst +++ b/source/includes/fact-environments-atlas-support-no-free-or-m10.rst @@ -1,4 +1,4 @@ .. note:: - This command has *limited support* in M0, M2, M5, and M10 clusters. + This command has *no support* in M0, M2, M5, and M10 clusters. For more information, see :atlas:`Unsupported Commands `. diff --git a/source/reference/command/applyOps.txt b/source/reference/command/applyOps.txt index ca2d5da6c2b..d0f9ba5db81 100644 --- a/source/reference/command/applyOps.txt +++ b/source/reference/command/applyOps.txt @@ -19,6 +19,17 @@ Definition instance. The :dbcommand:`applyOps` command is an internal command. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Behavior -------- diff --git a/source/reference/command/hello.txt b/source/reference/command/hello.txt index fed02ec34e7..cb6342acc44 100644 --- a/source/reference/command/hello.txt +++ b/source/reference/command/hello.txt @@ -40,6 +40,17 @@ Definition members and to discover additional members of a :term:`replica set`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/replSetAbortPrimaryCatchUp.txt b/source/reference/command/replSetAbortPrimaryCatchUp.txt index 30dc8f7f34e..4e584d5bf6c 100644 --- a/source/reference/command/replSetAbortPrimaryCatchUp.txt +++ b/source/reference/command/replSetAbortPrimaryCatchUp.txt @@ -19,6 +19,17 @@ Definition :term:`primary` member of the replica set to abort sync (catch up) then complete the transition to primary. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/replSetFreeze.txt b/source/reference/command/replSetFreeze.txt index fd2cb71e2ab..76e2f3328ad 100644 --- a/source/reference/command/replSetFreeze.txt +++ b/source/reference/command/replSetFreeze.txt @@ -24,6 +24,17 @@ Definition .. |method| replace:: :method:`rs.freeze` helper method .. include:: /includes/fact-dbcommand-tip +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/replSetGetConfig.txt b/source/reference/command/replSetGetConfig.txt index 4c199631614..70d1434cd53 100644 --- a/source/reference/command/replSetGetConfig.txt +++ b/source/reference/command/replSetGetConfig.txt @@ -21,6 +21,18 @@ Definition .. |method| replace:: :method:`rs.conf` helper method .. include:: /includes/fact-dbcommand-tip +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Syntax ------ diff --git a/source/reference/command/replSetGetStatus.txt b/source/reference/command/replSetGetStatus.txt index d2f2c4a2cf5..16ebdee79bb 100644 --- a/source/reference/command/replSetGetStatus.txt +++ b/source/reference/command/replSetGetStatus.txt @@ -33,6 +33,16 @@ Definition .. |method| replace:: :method:`rs.status` helper method .. include:: /includes/fact-dbcommand-tip +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/command/replSetInitiate.txt b/source/reference/command/replSetInitiate.txt index 2c661b1f601..a37d1c0c7fd 100644 --- a/source/reference/command/replSetInitiate.txt +++ b/source/reference/command/replSetInitiate.txt @@ -29,6 +29,17 @@ Definition Run the command on only one of the :binary:`~bin.mongod` instances for the replica set. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/replSetMaintenance.txt b/source/reference/command/replSetMaintenance.txt index 571be71f0f0..546473d1d2d 100644 --- a/source/reference/command/replSetMaintenance.txt +++ b/source/reference/command/replSetMaintenance.txt @@ -19,6 +19,17 @@ Definition maintenance mode for a :term:`secondary` member of a :term:`replica set`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/replSetReconfig.txt b/source/reference/command/replSetReconfig.txt index 43414db968c..ec26264f5f7 100644 --- a/source/reference/command/replSetReconfig.txt +++ b/source/reference/command/replSetReconfig.txt @@ -24,6 +24,16 @@ Definition .. |method| replace:: :method:`rs.reconfig` helper method .. include:: /includes/fact-dbcommand-tip +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/command/replSetResizeOplog.txt b/source/reference/command/replSetResizeOplog.txt index c4822eb890d..4d505ab938f 100644 --- a/source/reference/command/replSetResizeOplog.txt +++ b/source/reference/command/replSetResizeOplog.txt @@ -31,6 +31,17 @@ Definition You must run this command against the ``admin`` database. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/replSetStepDown.txt b/source/reference/command/replSetStepDown.txt index a0eb68e5ca3..33b102a6023 100644 --- a/source/reference/command/replSetStepDown.txt +++ b/source/reference/command/replSetStepDown.txt @@ -26,6 +26,17 @@ Description The :dbcommand:`replSetStepDown` can only run on the ``admin`` database. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/replSetSyncFrom.txt b/source/reference/command/replSetSyncFrom.txt index c712806b9f1..541c6589237 100644 --- a/source/reference/command/replSetSyncFrom.txt +++ b/source/reference/command/replSetSyncFrom.txt @@ -25,6 +25,17 @@ Description Run :dbcommand:`replSetSyncFrom` in the ``admin`` database. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ From dbfbdbda91e69c2f67898de385f40ed1aace8645 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:30:41 -0500 Subject: [PATCH 015/308] DOCS 16507 clarify output of mod operator (#5550) * DOCS-16507 mod output type * DOCS-16507 adding tag * DOCS-16507 adding tag * DOCS-16507 adding tag * DOCS-16507 copy edits * DOCSP-16507 tech edit * DOCSP-16507 tech edit * DOCS-16507 tech edits * DOCS-16507 tech edits * DOCS-16507 tech edits * Empty-Commit --- source/reference/operator/aggregation/mod.txt | 24 +++++++++++++++++++ source/reference/operator/query/mod.txt | 14 ++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/source/reference/operator/aggregation/mod.txt b/source/reference/operator/aggregation/mod.txt index 6d18d6bfa25..b77a5aee6a9 100644 --- a/source/reference/operator/aggregation/mod.txt +++ b/source/reference/operator/aggregation/mod.txt @@ -4,6 +4,13 @@ $mod (aggregation) .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: code example + .. contents:: On this page :local: :backlinks: none @@ -30,6 +37,23 @@ Definition ` as long as they resolve to numbers. For more information on expressions, see :ref:`aggregation-expressions`. + Starting in version 7.2, the output data type of the ``$mod`` operator is + the larger of the two input data types. + + .. note:: + + Prior to version 7.2, the value and field type of inputs determine + the ``$mod`` output type if: + + - The divisor is of data type ``double`` but has an integral + value. + + - The dividend is of data type ``int`` or ``long``. + + In this case, MongoDB converts the divisor to the dividend data + type before it performs the mod operation and the output data type + is the dividend data type. + Example ------- diff --git a/source/reference/operator/query/mod.txt b/source/reference/operator/query/mod.txt index f3edca8d52c..b100b084fec 100644 --- a/source/reference/operator/query/mod.txt +++ b/source/reference/operator/query/mod.txt @@ -4,6 +4,13 @@ $mod .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: code example + .. contents:: On this page :local: :backlinks: none @@ -26,9 +33,10 @@ $mod Behavior -------- -The ``$mod`` operator returns an error if the ``[ divisor, remainder ]`` array -contains fewer or more than two elements. For examples, see -:ref:`mod-not-enough-elements` and :ref:`mod-too-many-elements` respectively. +``$mod`` returns an error if the ``[ divisor, remainder ]`` array +doesn't contain two elements. For examples, see +:ref:`mod-not-enough-elements` and :ref:`mod-too-many-elements` +respectively. Also, starting in MongoDB 5.1 (and 5.0.4 and 4.4.10), ``$mod`` returns an error if the ``divisor`` or ``remainder`` values evaluate to: From 67ef089fd850f8e3c049c476740e59f3b23e3aeb Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Wed, 17 Jan 2024 12:12:08 -0500 Subject: [PATCH 016/308] (DOCS-16394): add 6.0 backport version to persistedChunkCacheUpdateMaxBatchSize (#5845) --- source/reference/parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 427ea804185..01853bb59c9 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -4820,7 +4820,7 @@ Sharding Parameters .. parameter:: persistedChunkCacheUpdateMaxBatchSize - .. versionadded:: 7.2 (and 7.1.1, 7.0.4) + .. versionadded:: 7.2 (and 7.1.1, 7.0.4, 6.0.13) |mongod-only| From 784f90f7e558720bbe1b3586604cc3224a996b70 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Wed, 17 Jan 2024 12:32:10 -0500 Subject: [PATCH 017/308] Add 5.0 backport to persistedChunkCacheUpdateMaxBatchSize (#5847) --- source/reference/parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 01853bb59c9..5dcd3e06f00 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -4820,7 +4820,7 @@ Sharding Parameters .. parameter:: persistedChunkCacheUpdateMaxBatchSize - .. versionadded:: 7.2 (and 7.1.1, 7.0.4, 6.0.13) + .. versionadded:: 7.2 (and 7.1.1, 7.0.4, 6.0.13, 5.0.25) |mongod-only| From eea48f019634747775072cbf6bdf8c9ff13b4b79 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Wed, 17 Jan 2024 09:44:58 -0800 Subject: [PATCH 018/308] Clarify shard key index cannot be a partial index. (#5834) * Clarify shard key index cannot be a partial index. * slight refactoring * Update source/includes/limits-sharding-index-type.rst Co-authored-by: Jeff Allen * review changes * final internal review changes * add link to partial index --------- Co-authored-by: Jeff Allen --- source/includes/limits-sharding-index-type.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source/includes/limits-sharding-index-type.rst b/source/includes/limits-sharding-index-type.rst index 246f4fdace8..03f45c07c96 100644 --- a/source/includes/limits-sharding-index-type.rst +++ b/source/includes/limits-sharding-index-type.rst @@ -3,13 +3,15 @@ key, a compound index that starts with the shard key and specifies ascending order for the shard key, or a :ref:`hashed index `. -A :term:`shard key` index cannot be a descending index on the shard key. -Additionally, a shard key index cannot be any of the following index -types: - -- :ref:`multikey ` -- :ref:`text ` -- :ref:`geospatial ` -- :ref:`wildcard ` +A :term:`shard key` index *cannot* be: + +- A descending index on the shard key +- A :ref:`partial index ` +- Any of the following index types: + + - :ref:`Geospatial ` + - :ref:`Multikey ` + - :ref:`Text ` + - :ref:`Wildcard ` .. COMMENT seealso extracts-geospatial-index-shard-key-restriction.yaml From 75c582b6b9b6b924d16a07a08a29c2c896cc293d Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:11:50 -0800 Subject: [PATCH 019/308] Adds how to query for Null or Missing Fields information. (#5821) * new $ne examples; remove perl tabs * another attempt to remove perl * simplify ruby example * review changes * Update source/tutorial/query-for-null-fields.txt Co-authored-by: Jeff Allen --------- Co-authored-by: Jeff Allen --- .../driver-example-query-38.rst | 9 -- .../driver-example-query-39.rst | 9 -- .../driver-example-query-40.rst | 9 -- .../driver-example-query-41.rst | 9 -- .../driver-example-query-intro-no-perl.rst | 123 ++++++++++++++++++ source/tutorial/query-for-null-fields.txt | 119 +++++++++++++---- 6 files changed, 215 insertions(+), 63 deletions(-) create mode 100644 source/includes/driver-examples/driver-example-query-intro-no-perl.rst diff --git a/source/includes/driver-examples/driver-example-query-38.rst b/source/includes/driver-examples/driver-example-query-38.rst index 301a5718bce..4075a662212 100644 --- a/source/includes/driver-examples/driver-example-query-38.rst +++ b/source/includes/driver-examples/driver-example-query-38.rst @@ -76,15 +76,6 @@ :start-after: Start Example 38 :end-before: End Example 38 - - id: perl - content: | - - .. literalinclude:: /driver-examples/driver-examples.t - :language: perl - :dedent: 4 - :start-after: Start Example 38 - :end-before: End Example 38 - - id: ruby content: | diff --git a/source/includes/driver-examples/driver-example-query-39.rst b/source/includes/driver-examples/driver-example-query-39.rst index c6878bd7dee..93f9c6e0f7d 100644 --- a/source/includes/driver-examples/driver-example-query-39.rst +++ b/source/includes/driver-examples/driver-example-query-39.rst @@ -75,15 +75,6 @@ :start-after: Start Example 39 :end-before: End Example 39 - - id: perl - content: | - - .. literalinclude:: /driver-examples/driver-examples.t - :language: perl - :dedent: 4 - :start-after: Start Example 39 - :end-before: End Example 39 - - id: ruby content: | diff --git a/source/includes/driver-examples/driver-example-query-40.rst b/source/includes/driver-examples/driver-example-query-40.rst index 3777e0764b6..bee161130ec 100644 --- a/source/includes/driver-examples/driver-example-query-40.rst +++ b/source/includes/driver-examples/driver-example-query-40.rst @@ -75,15 +75,6 @@ :start-after: Start Example 40 :end-before: End Example 40 - - id: perl - content: | - - .. literalinclude:: /driver-examples/driver-examples.t - :language: perl - :dedent: 4 - :start-after: Start Example 40 - :end-before: End Example 40 - - id: ruby content: | diff --git a/source/includes/driver-examples/driver-example-query-41.rst b/source/includes/driver-examples/driver-example-query-41.rst index ec979093970..be1115b6f2a 100644 --- a/source/includes/driver-examples/driver-example-query-41.rst +++ b/source/includes/driver-examples/driver-example-query-41.rst @@ -75,15 +75,6 @@ :start-after: Start Example 41 :end-before: End Example 41 - - id: perl - content: | - - .. literalinclude:: /driver-examples/driver-examples.t - :language: perl - :dedent: 4 - :start-after: Start Example 41 - :end-before: End Example 41 - - id: ruby content: | diff --git a/source/includes/driver-examples/driver-example-query-intro-no-perl.rst b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst new file mode 100644 index 00000000000..a033b40b848 --- /dev/null +++ b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst @@ -0,0 +1,123 @@ +.. tabs-drivers:: + + tabs: + - id: shell + content: | + + This page provides examples of |query_operations| using the + :method:`db.collection.find()` method in :binary:`mongosh`. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: compass + content: | + + This page provides examples of |query_operations| using + :ref:`MongoDB Compass `. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: python + content: | + + This page provides examples of |query_operations| using the + :py:meth:`pymongo.collection.Collection.find` method in the + :api:`PyMongo ` + Python driver. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: motor + content: | + + This page provides examples of |query_operations| using the + :py:meth:`motor.motor_asyncio.AsyncIOMotorCollection.find` + method in the `Motor `_ + driver. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: java-sync + content: | + + This page provides examples of |query_operations| using the + com.mongodb.client.MongoCollection.find_ method in the MongoDB + `Java Synchronous Driver`_. + + .. tip:: + + The driver provides com.mongodb.client.model.Filters_ + helper methods to facilitate the creation of filter + documents. The examples on this page use these methods to + create the filter documents. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: java-async + content: | + + This page provides examples of |query_operations| using the + `com.mongodb.reactivestreams.client.MongoCollection.find `_ + method in the MongoDB `Java Reactive Streams Driver `_. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: nodejs + content: | + + This page provides examples of |query_operations| using the + :node-api:`Collection.find() ` method in + the :node-docs:`MongoDB Node.js Driver <>`. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: php + content: | + + This page provides examples of |query_operations| using the + :phpmethod:`MongoDB\\Collection::find() ` + method in the + `MongoDB PHP Library `_. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: ruby + content: | + + This page provides examples of |query_operations| using the + :ruby-api:`Mongo::Collection#find()` + method in the + :ruby:`MongoDB Ruby Driver `. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: scala + content: | + + This page provides examples of |query_operations| using the + :scala-api:`collection.find()` method + in the + `MongoDB Scala Driver `_. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: csharp + content: | + + This page provides examples of |query_operations| using the + :csharp-api:`MongoCollection.Find() ` + method in the + `MongoDB C# Driver `_. + + .. include:: /includes/driver-examples/examples-intro.rst + + - id: go + content: | + + This page provides examples of |query_operations| using the + :go-api:`Collection.Find ` + function in the + `MongoDB Go Driver `_. + + .. include:: /includes/driver-examples/examples-intro.rst + diff --git a/source/tutorial/query-for-null-fields.txt b/source/tutorial/query-for-null-fields.txt index 7fe6ad2fd03..9e3f6297dc1 100644 --- a/source/tutorial/query-for-null-fields.txt +++ b/source/tutorial/query-for-null-fields.txt @@ -6,12 +6,12 @@ ================================ Query for Null or Missing Fields ================================ - + .. default-domain:: mongodb .. facet:: :name: programming_language - :values: shell, csharp, go, java, javascript/typescript, perl, php, python, ruby, scala + :values: shell, csharp, go, java, javascript/typescript, php, python, ruby, scala .. meta:: :keywords: java sync, java async, reactive streams, motor, code example, node.js, compass @@ -36,7 +36,7 @@ Different query operators in MongoDB treat ``null`` values differently. .. |query_operations| replace:: operations that query for ``null`` values -.. include:: /includes/driver-examples/driver-example-query-intro.rst +.. include:: /includes/driver-examples/driver-example-query-intro-no-perl.rst .. tabs-drivers:: @@ -53,12 +53,6 @@ Different query operators in MongoDB treat ``null`` values differently. Use ``None`` with the Motor driver to query for ``null`` or missing fields in MongoDB. - - id: perl - content: | - .. important:: - Use ``undef`` with the MongoDB Perl driver to - query for ``null`` or missing fields in MongoDB. - - id: ruby content: | .. important:: @@ -143,12 +137,6 @@ Equality Filter contain the ``item`` field whose value is ``null`` *or* that do not contain the ``item`` field. - - id: perl - content: | - The ``{ item => undef }`` query matches documents that either - contain the ``item`` field whose value is ``null`` *or* that - do not contain the ``item`` field. - - id: ruby content: | The ``{ item => nil }`` query matches documents that either @@ -178,6 +166,95 @@ Equality Filter The query returns both documents in the collection. +Non-Equality Filter +------------------- + +To query for fields that **exist** and are **not null**, use the :query:`$ne` +operator. The ``{ item : { $ne : null } }`` query matches documents where the +``item`` field exists *and* has a non-null value. + +.. tabs-drivers:: + + tabs: + - id: shell + content: | + .. code-block:: sh + + db.inventory.find( { item: { $ne : null } } ) + + - id: compass + content: | + .. code-block:: javascript + + { item: { $ne : null } } + + - id: python + content: | + .. code-block:: python + + cursor = db.inventory.find( { "item": { "$ne": None } } ) + + - id: motor + content: | + .. code-block:: python + + cursor = db.inventory.find( { "item": { "$ne": None } } ) + + - id: java-sync + content: | + .. code-block:: java + + collection.find($ne("item", null)); + + - id: java-async + content: | + .. code-block:: java + + db.inventory.find( { item: { $ne : nul l} } ) + + - id: nodejs + content: | + .. code-block:: javascript + + const cursor = db.collection('inventory') + .find({ item: { $ne : null } + }); + + - id: php + content: | + .. code-block:: php + + $cursor = $db->inventory->find(['item' => ['$ne' => null ]]); + + - id: ruby + content: | + .. code-block:: ruby + + client[:inventory].find(item: { '$ne' => nil }) + + - id: scala + content: | + .. code-block:: scala + + collection.find($ne("item", null)); + + - id: csharp + content: | + .. code-block:: csharp + + var filter = Builders.Filter.Ne("item", BsonNull.Value); + var result = collection.Find(filter).ToList(); + + - id: go + content: | + .. code-block:: go + + cursor, err := coll.Find( + context.TODO(), + bson.D{ + {"item", bson.D{"$ne": nil}}, + }) + Type Check ---------- @@ -240,13 +317,6 @@ Type Check ``null``; i.e. the value of the ``item`` field is of :ref:`BSON Type ` ``Null`` (BSON Type 10): - - id: perl - content: | - The ``{ item => { $type => 10 } }`` query matches *only* - documents that contain the ``item`` field whose value is - ``null``; i.e. the value of the ``item`` field is of - :ref:`BSON Type ` ``Null`` (BSON Type 10): - - id: ruby content: | The ``{ item => { $type => 10 } }`` query matches *only* @@ -330,11 +400,6 @@ field. [#type0]_ The ``[ item => [ $exists => false ] ]`` query matches documents that do not contain the ``item`` field: - - id: perl - content: | - The ``{ item => { $exists => false } }`` query matches documents - that do not contain the ``item`` field: - - id: ruby content: | The ``{ item => { $exists => false } }`` query matches documents From 37e6216b71a513bf4a5e8b582d90936d97e60b02 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 17 Jan 2024 13:58:38 -0800 Subject: [PATCH 020/308] DOCSP-34783 Atlas Support for Diagnostics Commands (#5750) --- source/reference/command/buildInfo.txt | 11 +++++++++++ source/reference/command/collStats.txt | 11 +++++++++++ source/reference/command/connPoolStats.txt | 11 +++++++++++ source/reference/command/connectionStatus.txt | 11 +++++++++++ source/reference/command/dataSize.txt | 12 ++++++++++++ source/reference/command/dbHash.txt | 11 +++++++++++ source/reference/command/dbStats.txt | 12 ++++++++++++ source/reference/command/driverOIDTest.txt | 11 +++++++++++ source/reference/command/explain.txt | 11 +++++++++++ source/reference/command/features.txt | 11 +++++++++++ source/reference/command/getCmdLineOpts.txt | 11 +++++++++++ source/reference/command/getLog.txt | 11 +++++++++++ source/reference/command/hostInfo.txt | 11 +++++++++++ source/reference/command/isSelf.txt | 11 +++++++++++ source/reference/command/listCommands.txt | 11 +++++++++++ source/reference/command/lockInfo.txt | 11 +++++++++++ source/reference/command/netstat.txt | 11 +++++++++++ source/reference/command/ping.txt | 11 +++++++++++ source/reference/command/profile.txt | 11 +++++++++++ source/reference/command/serverStatus.txt | 11 +++++++++++ source/reference/command/shardConnPoolStats.txt | 11 +++++++++++ source/reference/command/top.txt | 11 +++++++++++ source/reference/command/validate.txt | 11 +++++++++++ source/reference/command/whatsmyuri.txt | 11 +++++++++++ 24 files changed, 266 insertions(+) diff --git a/source/reference/command/buildInfo.txt b/source/reference/command/buildInfo.txt index 885b8ae5e52..a79db10a857 100644 --- a/source/reference/command/buildInfo.txt +++ b/source/reference/command/buildInfo.txt @@ -19,6 +19,17 @@ Definition returns a build summary for the current :binary:`~bin.mongod`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/collStats.txt b/source/reference/command/collStats.txt index 4644bd6fc32..8510bc7fc57 100644 --- a/source/reference/command/collStats.txt +++ b/source/reference/command/collStats.txt @@ -41,6 +41,17 @@ Definition .. include:: /includes/fact-dbcommand.rst +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/connPoolStats.txt b/source/reference/command/connPoolStats.txt index 518400e8d96..b14f8a133fd 100644 --- a/source/reference/command/connPoolStats.txt +++ b/source/reference/command/connPoolStats.txt @@ -26,6 +26,17 @@ Definition .. include:: /includes/note-conn-pool-stats.rst +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/connectionStatus.txt b/source/reference/command/connectionStatus.txt index 5e8c610c342..102ac8e0405 100644 --- a/source/reference/command/connectionStatus.txt +++ b/source/reference/command/connectionStatus.txt @@ -18,6 +18,17 @@ Definition Returns information about the current connection, specifically the state of authenticated users and their available permissions. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/dataSize.txt b/source/reference/command/dataSize.txt index 5ab2ef025de..6df27db6a52 100644 --- a/source/reference/command/dataSize.txt +++ b/source/reference/command/dataSize.txt @@ -18,6 +18,18 @@ Definition The :dbcommand:`dataSize` command returns the size in bytes for the specified data. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Syntax ------ diff --git a/source/reference/command/dbHash.txt b/source/reference/command/dbHash.txt index 44258fc017e..bba5e136e98 100644 --- a/source/reference/command/dbHash.txt +++ b/source/reference/command/dbHash.txt @@ -25,6 +25,17 @@ Definition The :dbcommand:`dbHash` command obtains a shared (S) lock on the database, which prevents writes until the command completes. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/dbStats.txt b/source/reference/command/dbStats.txt index cef6159a63e..67f0b13bc00 100644 --- a/source/reference/command/dbStats.txt +++ b/source/reference/command/dbStats.txt @@ -18,6 +18,18 @@ Definition The :dbcommand:`dbStats` command returns storage statistics for a given database. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-limited-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Syntax ------ diff --git a/source/reference/command/driverOIDTest.txt b/source/reference/command/driverOIDTest.txt index a1a2be5ff23..aef86d436fe 100644 --- a/source/reference/command/driverOIDTest.txt +++ b/source/reference/command/driverOIDTest.txt @@ -15,3 +15,14 @@ driverOIDTest :dbcommand:`driverOIDTest` is an internal command. .. slave-ok + +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/command/explain.txt b/source/reference/command/explain.txt index 1925067308e..e94e5ad3272 100644 --- a/source/reference/command/explain.txt +++ b/source/reference/command/explain.txt @@ -26,6 +26,17 @@ Definition .. include:: /includes/fact-dbcommand-tip +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/features.txt b/source/reference/command/features.txt index a566c6deaf8..0eb2160ef47 100644 --- a/source/reference/command/features.txt +++ b/source/reference/command/features.txt @@ -16,3 +16,14 @@ features feature settings. .. slave-ok + +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/command/getCmdLineOpts.txt b/source/reference/command/getCmdLineOpts.txt index 2af853f1a6e..0dd5620f32b 100644 --- a/source/reference/command/getCmdLineOpts.txt +++ b/source/reference/command/getCmdLineOpts.txt @@ -20,6 +20,17 @@ Definition :binary:`~bin.mongod` or :binary:`~bin.mongos`. Run :dbcommand:`getCmdLineOpts` in the ``admin`` database. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/getLog.txt b/source/reference/command/getLog.txt index 7823c0c3b84..d2c8babcfd3 100644 --- a/source/reference/command/getLog.txt +++ b/source/reference/command/getLog.txt @@ -26,6 +26,17 @@ Definition ` format. Previously, log data was returned as plaintext. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/hostInfo.txt b/source/reference/command/hostInfo.txt index fdf9e698620..e8fe14afd75 100644 --- a/source/reference/command/hostInfo.txt +++ b/source/reference/command/hostInfo.txt @@ -23,6 +23,17 @@ Definition You must run the :dbcommand:`hostInfo` command, which takes no arguments, against the ``admin`` database. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/isSelf.txt b/source/reference/command/isSelf.txt index 3e90cfe5689..ab5c5de69a2 100644 --- a/source/reference/command/isSelf.txt +++ b/source/reference/command/isSelf.txt @@ -15,3 +15,14 @@ isSelf :dbcommand:`_isSelf` is an internal command. .. slave-ok + +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/command/listCommands.txt b/source/reference/command/listCommands.txt index 2fd6166f400..31fed0d2437 100644 --- a/source/reference/command/listCommands.txt +++ b/source/reference/command/listCommands.txt @@ -19,6 +19,17 @@ Definition database commands implemented for the current :binary:`~bin.mongod` or :binary:`~bin.mongos` instance. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/lockInfo.txt b/source/reference/command/lockInfo.txt index 7d213562195..bd23b5d4b5c 100644 --- a/source/reference/command/lockInfo.txt +++ b/source/reference/command/lockInfo.txt @@ -19,6 +19,17 @@ Definition pending. :dbcommand:`lockInfo` is an internal command available on :binary:`~bin.mongod` instances only. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/netstat.txt b/source/reference/command/netstat.txt index b0d8e99114e..73ab3417c29 100644 --- a/source/reference/command/netstat.txt +++ b/source/reference/command/netstat.txt @@ -14,3 +14,14 @@ netstat :dbcommand:`netstat` is an internal command that is only available on :binary:`~bin.mongos` instances. + +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/command/ping.txt b/source/reference/command/ping.txt index 770c813052d..13c16baea75 100644 --- a/source/reference/command/ping.txt +++ b/source/reference/command/ping.txt @@ -19,6 +19,17 @@ Definition server is responding to commands. This command will return immediately even if the server is write-locked: +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/profile.txt b/source/reference/command/profile.txt index 01c365c64b2..8739f0ee6ef 100644 --- a/source/reference/command/profile.txt +++ b/source/reference/command/profile.txt @@ -67,6 +67,17 @@ Definition .. include:: /includes/warning-profiler-performance.rst +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index 7dd60562193..806ee0f8343 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -25,6 +25,17 @@ Definition applications can run this command at a regular interval to collect statistics about the instance. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/shardConnPoolStats.txt b/source/reference/command/shardConnPoolStats.txt index 652475f5121..816bff6141e 100644 --- a/source/reference/command/shardConnPoolStats.txt +++ b/source/reference/command/shardConnPoolStats.txt @@ -40,6 +40,17 @@ Definition MongoDB returns the connection to the connection pool after every operation. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Output ------ diff --git a/source/reference/command/top.txt b/source/reference/command/top.txt index 2f35c46ce22..f66d2dbc539 100644 --- a/source/reference/command/top.txt +++ b/source/reference/command/top.txt @@ -38,6 +38,17 @@ Redaction When using :ref:`Queryable Encryption `, the ``top`` command only returns the collection name. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/validate.txt b/source/reference/command/validate.txt index cccea205397..c2865cf387d 100644 --- a/source/reference/command/validate.txt +++ b/source/reference/command/validate.txt @@ -39,6 +39,17 @@ Definition :binary:`~bin.mongosh` provides a wrapper around :dbcommand:`validate`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/whatsmyuri.txt b/source/reference/command/whatsmyuri.txt index cc30d6ed732..affd37966d2 100644 --- a/source/reference/command/whatsmyuri.txt +++ b/source/reference/command/whatsmyuri.txt @@ -15,3 +15,14 @@ whatsmyuri :dbcommand:`whatsmyuri` is an internal command. .. slave-ok + +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst From 36576f32b5d0191f702c908d36657252ae8d4864 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 17 Jan 2024 14:21:30 -0800 Subject: [PATCH 021/308] DOCSP-34782 Atlas Support for Administration Commands (#5745) --- ...onments-atlas-support-limited-free-and-m10.rst | 4 ++++ .../reference/command/cloneCollectionAsCapped.txt | 10 ++++++++++ source/reference/command/collMod.txt | 11 +++++++++++ source/reference/command/compact.txt | 11 +++++++++++ .../command/compactStructuredEncryptionData.txt | 11 +++++++++++ source/reference/command/convertToCapped.txt | 11 +++++++++++ source/reference/command/create.txt | 11 +++++++++++ source/reference/command/createIndexes.txt | 10 ++++++++++ source/reference/command/currentOp.txt | 12 ++++++++++++ source/reference/command/drop.txt | 12 ++++++++++++ source/reference/command/dropConnections.txt | 11 +++++++++++ source/reference/command/dropDatabase.txt | 12 ++++++++++++ source/reference/command/dropIndexes.txt | 11 +++++++++++ source/reference/command/filemd5.txt | 11 +++++++++++ source/reference/command/fsync.txt | 15 +++++++++++++-- source/reference/command/fsyncUnlock.txt | 13 ++++++++++++- source/reference/command/getClusterParameter.txt | 11 +++++++++++ source/reference/command/getDefaultRWConcern.txt | 11 +++++++++++ source/reference/command/getParameter.txt | 13 ++++++++++++- source/reference/command/killCursors.txt | 11 +++++++++++ source/reference/command/killOp.txt | 11 +++++++++++ source/reference/command/listCollections.txt | 11 +++++++++++ source/reference/command/listDatabases.txt | 11 +++++++++++ source/reference/command/listIndexes.txt | 13 ++++++++++++- source/reference/command/logRotate.txt | 11 +++++++++++ source/reference/command/reIndex.txt | 11 +++++++++++ source/reference/command/renameCollection.txt | 11 +++++++++++ source/reference/command/rotateCertificates.txt | 11 +++++++++++ source/reference/command/setClusterParameter.txt | 10 ++++++++++ source/reference/command/setDefaultRWConcern.txt | 11 +++++++++++ .../command/setFeatureCompatibilityVersion.txt | 11 +++++++++++ source/reference/command/setIndexCommitQuorum.txt | 11 +++++++++++ source/reference/command/setParameter.txt | 11 +++++++++++ source/reference/command/shutdown.txt | 11 +++++++++++ 34 files changed, 372 insertions(+), 5 deletions(-) create mode 100644 source/includes/fact-environments-atlas-support-limited-free-and-m10.rst diff --git a/source/includes/fact-environments-atlas-support-limited-free-and-m10.rst b/source/includes/fact-environments-atlas-support-limited-free-and-m10.rst new file mode 100644 index 00000000000..2764605c051 --- /dev/null +++ b/source/includes/fact-environments-atlas-support-limited-free-and-m10.rst @@ -0,0 +1,4 @@ +.. note:: + + This command has *limited support* in M0, M2, M5, and M10 clusters. + For more information, see :atlas:`Unsupported Commands `. diff --git a/source/reference/command/cloneCollectionAsCapped.txt b/source/reference/command/cloneCollectionAsCapped.txt index c533786e9bf..b2ad66f4dfc 100644 --- a/source/reference/command/cloneCollectionAsCapped.txt +++ b/source/reference/command/cloneCollectionAsCapped.txt @@ -20,6 +20,16 @@ Definition within the same database. The operation does not affect the original non-capped collection. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/command/collMod.txt b/source/reference/command/collMod.txt index 500b00000e9..5461ce4e8f5 100644 --- a/source/reference/command/collMod.txt +++ b/source/reference/command/collMod.txt @@ -32,6 +32,17 @@ Definition views. For discussion of on-demand materialized views, see :pipeline:`$merge` instead. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/compact.txt b/source/reference/command/compact.txt index 498e114794f..e4f3c3add13 100644 --- a/source/reference/command/compact.txt +++ b/source/reference/command/compact.txt @@ -21,6 +21,17 @@ Definition :ref:`WiredTiger ` databases, this command releases unneeded disk space to the operating system. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/compactStructuredEncryptionData.txt b/source/reference/command/compactStructuredEncryptionData.txt index 6a14f91687d..f75c00f3803 100644 --- a/source/reference/command/compactStructuredEncryptionData.txt +++ b/source/reference/command/compactStructuredEncryptionData.txt @@ -20,6 +20,17 @@ Definition Compacts documents specified in the metadata collections and deletes redundant documents. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/convertToCapped.txt b/source/reference/command/convertToCapped.txt index 932319d0b3b..78e8fb8a83e 100644 --- a/source/reference/command/convertToCapped.txt +++ b/source/reference/command/convertToCapped.txt @@ -25,6 +25,17 @@ Definition non-capped collection to a :term:`capped collection` within the same database. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/create.txt b/source/reference/command/create.txt index 569036f092f..c53271c12a0 100644 --- a/source/reference/command/create.txt +++ b/source/reference/command/create.txt @@ -23,6 +23,17 @@ Definition views. For discussion of on-demand materialized views, see :pipeline:`$merge` instead. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/createIndexes.txt b/source/reference/command/createIndexes.txt index 0cc3a4b2412..4c2772b1e53 100644 --- a/source/reference/command/createIndexes.txt +++ b/source/reference/command/createIndexes.txt @@ -21,6 +21,16 @@ Definition :method:`db.collection.createIndexes()` helper methods. .. include:: /includes/fact-dbcommand-tip +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/command/currentOp.txt b/source/reference/command/currentOp.txt index 2268fa4799e..c225379b0d2 100644 --- a/source/reference/command/currentOp.txt +++ b/source/reference/command/currentOp.txt @@ -26,6 +26,18 @@ Definition .. include:: /includes/fact-currentOp-aggregation-stage.rst +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Syntax ------ diff --git a/source/reference/command/drop.txt b/source/reference/command/drop.txt index 2ec91d02650..decb7073840 100644 --- a/source/reference/command/drop.txt +++ b/source/reference/command/drop.txt @@ -21,6 +21,18 @@ Definition .. |method| replace:: :method:`~db.collection.drop` helper method .. include:: /includes/fact-dbcommand-tip +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Syntax ------ diff --git a/source/reference/command/dropConnections.txt b/source/reference/command/dropConnections.txt index 7cb8f5cdd3e..1f6c80552ff 100644 --- a/source/reference/command/dropConnections.txt +++ b/source/reference/command/dropConnections.txt @@ -22,6 +22,17 @@ Definition connections to the specified hosts. The :dbcommand:`dropConnections` must be run against the ``admin`` database. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/dropDatabase.txt b/source/reference/command/dropDatabase.txt index f5472c7ce3c..c2fcb3aff5e 100644 --- a/source/reference/command/dropDatabase.txt +++ b/source/reference/command/dropDatabase.txt @@ -18,6 +18,18 @@ Definition The :dbcommand:`dropDatabase` command drops the current database, deleting the associated data files. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Syntax ------ diff --git a/source/reference/command/dropIndexes.txt b/source/reference/command/dropIndexes.txt index ca5bd62a59f..89b0e1b35e4 100644 --- a/source/reference/command/dropIndexes.txt +++ b/source/reference/command/dropIndexes.txt @@ -25,6 +25,17 @@ Definition :method:`db.collection.dropIndexes()` helper methods. .. include:: /includes/fact-dbcommand-tip +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/filemd5.txt b/source/reference/command/filemd5.txt index e9f7c80f86e..c6b944ef07c 100644 --- a/source/reference/command/filemd5.txt +++ b/source/reference/command/filemd5.txt @@ -21,6 +21,17 @@ Definition The command takes the ``files_id`` of the file in question and the name of the GridFS root collection as arguments. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/fsync.txt b/source/reference/command/fsync.txt index 0c1c997ef8a..dc2c07976b6 100644 --- a/source/reference/command/fsync.txt +++ b/source/reference/command/fsync.txt @@ -42,8 +42,19 @@ Definition .. |method| replace:: :method:`db.fsyncLock` helper method .. include:: /includes/fact-dbcommand-tip - - + + +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/fsyncUnlock.txt b/source/reference/command/fsyncUnlock.txt index f172bcd6be3..ea34ac43dfd 100644 --- a/source/reference/command/fsyncUnlock.txt +++ b/source/reference/command/fsyncUnlock.txt @@ -38,7 +38,18 @@ Definition .. |method| replace:: :method:`db.fsyncUnlock` helper method .. include:: /includes/fact-dbcommand-tip - + +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/getClusterParameter.txt b/source/reference/command/getClusterParameter.txt index 23b9fa1da72..ef86b220cd8 100644 --- a/source/reference/command/getClusterParameter.txt +++ b/source/reference/command/getClusterParameter.txt @@ -24,6 +24,17 @@ Definition .. include:: /includes/fact-getClusterParameter-availability.rst +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/getDefaultRWConcern.txt b/source/reference/command/getDefaultRWConcern.txt index baa16680e53..b835767b08e 100644 --- a/source/reference/command/getDefaultRWConcern.txt +++ b/source/reference/command/getDefaultRWConcern.txt @@ -23,6 +23,17 @@ Definition - For sharded clusters, issue the :dbcommand:`getDefaultRWConcern` on a :binary:`~bin.mongos`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/getParameter.txt b/source/reference/command/getParameter.txt index c84f42f2375..ec755d8963f 100644 --- a/source/reference/command/getParameter.txt +++ b/source/reference/command/getParameter.txt @@ -19,7 +19,18 @@ Definition retrieving the values of parameters. Use the :method:`db.adminCommand( { command } )` method to run the :dbcommand:`getParameter` command in the ``admin`` database. - + +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-limited-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/killCursors.txt b/source/reference/command/killCursors.txt index c9e604e4357..b281e9fe5fc 100644 --- a/source/reference/command/killCursors.txt +++ b/source/reference/command/killCursors.txt @@ -31,6 +31,17 @@ Definition .. include:: /includes/fact-dbcommand.rst +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/killOp.txt b/source/reference/command/killOp.txt index 3ba62f032df..ba9d00ba829 100644 --- a/source/reference/command/killOp.txt +++ b/source/reference/command/killOp.txt @@ -27,6 +27,17 @@ Definition .. include:: /includes/fact-dbcommand.rst +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-limited-free-and-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/listCollections.txt b/source/reference/command/listCollections.txt index f8c3ae9e0cd..f257eb91390 100644 --- a/source/reference/command/listCollections.txt +++ b/source/reference/command/listCollections.txt @@ -25,6 +25,17 @@ Definition :binary:`~bin.mongosh` provides the :method:`db.getCollectionInfos()` and the :method:`db.getCollectionNames()` helper methods. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/listDatabases.txt b/source/reference/command/listDatabases.txt index e72fe7d62dc..6ad30c3080e 100644 --- a/source/reference/command/listDatabases.txt +++ b/source/reference/command/listDatabases.txt @@ -20,6 +20,17 @@ Definition :dbcommand:`listDatabases` must run against the ``admin`` database, as in the following example: +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/listIndexes.txt b/source/reference/command/listIndexes.txt index 84707a9b74e..9a6116495c6 100644 --- a/source/reference/command/listIndexes.txt +++ b/source/reference/command/listIndexes.txt @@ -22,7 +22,18 @@ Definition .. |method| replace:: :method:`db.collection.getIndexes()` helper method .. include:: /includes/fact-dbcommand-tip - + +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/logRotate.txt b/source/reference/command/logRotate.txt index 595449dff93..8de10a2d399 100644 --- a/source/reference/command/logRotate.txt +++ b/source/reference/command/logRotate.txt @@ -22,6 +22,17 @@ Definition You must issue the :dbcommand:`logRotate` command against the :term:`admin database`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/reIndex.txt b/source/reference/command/reIndex.txt index d86995d72b0..d538c9993f1 100644 --- a/source/reference/command/reIndex.txt +++ b/source/reference/command/reIndex.txt @@ -34,6 +34,17 @@ Definition instances. - For most users, the :dbcommand:`reIndex` command is unnecessary. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/renameCollection.txt b/source/reference/command/renameCollection.txt index dacdc3c6413..27bc5c6e7e0 100644 --- a/source/reference/command/renameCollection.txt +++ b/source/reference/command/renameCollection.txt @@ -25,6 +25,17 @@ Definition Issue the :dbcommand:`renameCollection` command against the :term:`admin database`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/rotateCertificates.txt b/source/reference/command/rotateCertificates.txt index c51fc820890..a94f9dc89f1 100644 --- a/source/reference/command/rotateCertificates.txt +++ b/source/reference/command/rotateCertificates.txt @@ -23,6 +23,17 @@ Definition certificates defined in the :doc:`configuration file `. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/setClusterParameter.txt b/source/reference/command/setClusterParameter.txt index 59104e8529b..9355521b976 100644 --- a/source/reference/command/setClusterParameter.txt +++ b/source/reference/command/setClusterParameter.txt @@ -26,6 +26,16 @@ Definition .. include:: /includes/reference/fact-setClusterParameter-availability.rst +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/command/setDefaultRWConcern.txt b/source/reference/command/setDefaultRWConcern.txt index 5772c1b2811..224f83a494d 100644 --- a/source/reference/command/setDefaultRWConcern.txt +++ b/source/reference/command/setDefaultRWConcern.txt @@ -28,6 +28,17 @@ Definition - For sharded clusters, issue the :dbcommand:`setDefaultRWConcern` on a :binary:`~bin.mongos`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/setFeatureCompatibilityVersion.txt b/source/reference/command/setFeatureCompatibilityVersion.txt index d2123ebd98d..83a78009dac 100644 --- a/source/reference/command/setFeatureCompatibilityVersion.txt +++ b/source/reference/command/setFeatureCompatibilityVersion.txt @@ -31,6 +31,17 @@ Definition to ensure the likelihood of downgrade is minimal. When you are confident that the likelihood of downgrade is minimal, enable these features. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/setIndexCommitQuorum.txt b/source/reference/command/setIndexCommitQuorum.txt index 2a6592d0c99..f9d142340c3 100644 --- a/source/reference/command/setIndexCommitQuorum.txt +++ b/source/reference/command/setIndexCommitQuorum.txt @@ -18,6 +18,17 @@ setIndexCommitQuorum data-bearing members that must be prepared to commit their local index builds before the primary node will commit the index. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/setParameter.txt b/source/reference/command/setParameter.txt index b51ba94fa48..870f7676e5b 100644 --- a/source/reference/command/setParameter.txt +++ b/source/reference/command/setParameter.txt @@ -21,6 +21,17 @@ Definition the :dbcommand:`setParameter` command against the :term:`admin database`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/command/shutdown.txt b/source/reference/command/shutdown.txt index d6c58f63bf9..62563b1b902 100644 --- a/source/reference/command/shutdown.txt +++ b/source/reference/command/shutdown.txt @@ -18,6 +18,17 @@ shutdown and then terminates the process. You must issue the :dbcommand:`shutdown` command against the :term:`admin database`. +Compatibility +------------- + +This command is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ From dc7fced41805359d816b5f8fb3fafbcab364c7d0 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Thu, 18 Jan 2024 09:45:04 -0500 Subject: [PATCH 022/308] (DOCSP-35695): Update optimization info for lookup (#5857) * (DOCSP-35695): Update optimization info for lookup * consistency * wording * edits * review edit * tech review edits --- .../reference/operator/aggregation/lookup.txt | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/source/reference/operator/aggregation/lookup.txt b/source/reference/operator/aggregation/lookup.txt index b5075b6dd3f..950b3f554dd 100644 --- a/source/reference/operator/aggregation/lookup.txt +++ b/source/reference/operator/aggregation/lookup.txt @@ -537,22 +537,29 @@ different ``$lookup`` operations. - ``$lookup`` operations that perform equality matches with a single join typically perform better when the source collection - contains an index on the ``foreignField``. + contains an index on the ``localField``. - * - :ref:`Uncorrelated Subqueries` + - An index on the ``foreignField`` in the foreign collection + cannot support an equality match with a single join. - - .. _uncorrelated-subqueries-performance: + * - :ref:`Uncorrelated Subqueries ` - - ``$lookup`` operations that contain uncorrelated subqueries - typically perform better when the inner pipeline can reference - an index on the ``foreignField``. + - .. _uncorrelated-subqueries-performance: + + - An index on the foreign collection cannot support uncorrelated + subqueries. + + - To improve performance for uncorrelated subqueries, use generic + indexing strategies and query optimization techniques. For + example, add appropriate indexes to support aggregation stages + before ``$lookup``. - MongoDB only needs to run the ``$lookup`` subquery once before caching the query because there is no relationship between the - source and foreign collections. The ``$lookup`` subquery is not - based on any value in the source collection. This behavior - improves performance for subsequent executions of this query. - + source and foreign collections. The subquery is not based on + any value in the source collection. This behavior improves + performance for subsequent executions of the ``$lookup`` + operation. * - :ref:`Correlated Subqueries ` @@ -691,7 +698,7 @@ The operation corresponds to this pseudo-SQL statement: ); For more information, see -:ref:`Equality Match Performance Considerations`. +:ref:`Equality Match Performance Considerations `. .. _unwind-example: From 97d8c26a970bb6f7ee2004106b23dccc10aef00e Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Thu, 18 Jan 2024 07:59:15 -0800 Subject: [PATCH 023/308] DOCSP-35017 Add vm.force_cgroup_v2_swappiness recommendation to Prod Notes (#5604) * DOCSP-35017 Add vm.force_cgroup_v2_swappiness recommendation to Prod Notes * ES suggestions * note placement --- source/administration/production-notes.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/administration/production-notes.txt b/source/administration/production-notes.txt index abcf78c93d3..f7dca4711d5 100644 --- a/source/administration/production-notes.txt +++ b/source/administration/production-notes.txt @@ -789,6 +789,14 @@ MongoDB performs best where swapping can be avoided or kept to a minimum. As such you should set ``vm.swappiness`` to either ``1`` or ``0`` depending on your application needs and cluster configuration. +.. note:: + + Most system and user processes run within a cgroup, which, by default, sets + the ``vm.swappiness`` to ``60``. If you are running + :abbr:`RHEL (Red Hat Enterprise Linux)` / CentOS, set + ``vm.force_cgroup_v2_swappiness`` to ``1`` to ensure that the specified + ``vm.swappiness`` value overrides any cgroup defaults. + .. [#swappiness-kernel-version] With Linux kernel versions previous to ``3.5``, or From 9d4d7a8434ff901568c2a02d009a1061dbca6323 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Fri, 19 Jan 2024 07:29:29 -0800 Subject: [PATCH 024/308] DOCSP-35239 Change GPG Key URL (#5743) (#5884) --- source/core/csfle/reference/libmongocrypt.txt | 12 ++++++------ .../queryable-encryption/reference/libmongocrypt.txt | 12 ++++++------ .../steps-install-mongodb-enterprise-on-red-hat.yaml | 2 +- .../includes/steps-install-mongodb-on-red-hat.yaml | 2 +- source/includes/steps-install-mongodb-on-suse.yaml | 2 +- source/includes/steps-install-verify-files-pgp.yaml | 2 +- .../configure-x509-member-authentication.txt | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/source/core/csfle/reference/libmongocrypt.txt b/source/core/csfle/reference/libmongocrypt.txt index 7c225052c4f..befc8eb87ff 100644 --- a/source/core/csfle/reference/libmongocrypt.txt +++ b/source/core/csfle/reference/libmongocrypt.txt @@ -54,7 +54,7 @@ Debian .. code-block:: sh - sudo sh -c 'curl -s --location https://www.mongodb.org/static/pgp/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg' + sudo sh -c 'curl -s --location https://pgp.mongodb.com/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg' .. step:: @@ -97,7 +97,7 @@ Ubuntu .. code-block:: sh - sudo sh -c 'curl -s --location https://www.mongodb.org/static/pgp/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg' + sudo sh -c 'curl -s --location https://pgp.mongodb.com/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg' .. step:: @@ -146,7 +146,7 @@ RedHat baseurl=https://libmongocrypt.s3.amazonaws.com/yum/redhat/$releasever/libmongocrypt/{+libmongocrypt-version+}/x86_64 gpgcheck=1 enabled=1 - gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc + gpgkey=https://pgp.mongodb.com/libmongocrypt.asc .. step:: @@ -173,7 +173,7 @@ Amazon Linux 2 baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2/libmongocrypt/{+libmongocrypt-version+}/x86_64 gpgcheck=1 enabled=1 - gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc + gpgkey=https://pgp.mongodb.com/libmongocrypt.asc .. step:: @@ -200,7 +200,7 @@ Amazon Linux baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2013.03/libmongocrypt/{+libmongocrypt-version+}/x86_64 gpgcheck=1 enabled=1 - gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc + gpgkey=https://pgp.mongodb.com/libmongocrypt.asc .. step:: @@ -222,7 +222,7 @@ Suse .. code-block:: sh - sudo rpm --import https://www.mongodb.org/static/pgp/libmongocrypt.asc + sudo rpm --import https://pgp.mongodb.com/libmongocrypt.asc .. step:: diff --git a/source/core/queryable-encryption/reference/libmongocrypt.txt b/source/core/queryable-encryption/reference/libmongocrypt.txt index 09ce583f367..c42e4a9d750 100644 --- a/source/core/queryable-encryption/reference/libmongocrypt.txt +++ b/source/core/queryable-encryption/reference/libmongocrypt.txt @@ -58,7 +58,7 @@ Debian .. code-block:: sh - sudo sh -c 'curl -s --location https://www.mongodb.org/static/pgp/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg' + sudo sh -c 'curl -s --location https://pgp.mongodb.com/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg' .. step:: @@ -101,7 +101,7 @@ Ubuntu .. code-block:: sh - sudo sh -c 'curl -s --location https://www.mongodb.org/static/pgp/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg' + sudo sh -c 'curl -s --location https://pgp.mongodb.com/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg' .. step:: @@ -150,7 +150,7 @@ RedHat baseurl=https://libmongocrypt.s3.amazonaws.com/yum/redhat/$releasever/libmongocrypt/{+libmongocrypt-version+}/x86_64 gpgcheck=1 enabled=1 - gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc + gpgkey=https://pgp.mongodb.com/libmongocrypt.asc .. step:: @@ -177,7 +177,7 @@ Amazon Linux 2 baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2/libmongocrypt/{+libmongocrypt-version+}/x86_64 gpgcheck=1 enabled=1 - gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc + gpgkey=https://pgp.mongodb.com/libmongocrypt.asc .. step:: @@ -204,7 +204,7 @@ Amazon Linux baseurl=https://libmongocrypt.s3.amazonaws.com/yum/amazon/2013.03/libmongocrypt/{+libmongocrypt-version+}/x86_64 gpgcheck=1 enabled=1 - gpgkey=https://www.mongodb.org/static/pgp/libmongocrypt.asc + gpgkey=https://pgp.mongodb.com/libmongocrypt.asc .. step:: @@ -226,7 +226,7 @@ Suse .. code-block:: sh - sudo rpm --import https://www.mongodb.org/static/pgp/libmongocrypt.asc + sudo rpm --import https://pgp.mongodb.com/libmongocrypt.asc .. step:: diff --git a/source/includes/steps-install-mongodb-enterprise-on-red-hat.yaml b/source/includes/steps-install-mongodb-enterprise-on-red-hat.yaml index a8feac64b6e..2b01ca0a8dc 100644 --- a/source/includes/steps-install-mongodb-enterprise-on-red-hat.yaml +++ b/source/includes/steps-install-mongodb-enterprise-on-red-hat.yaml @@ -13,7 +13,7 @@ action: baseurl=https://repo.mongodb.com/yum/{{distro_name}}/{{distro_release}}/mongodb-enterprise/{+version+}/$basearch/ gpgcheck=1 enabled=1 - gpgkey=https://www.mongodb.org/static/pgp/server-{+pgp-version+}.asc + gpgkey=https://pgp.mongodb.com/server-{+pgp-version+}.asc post: | .. note:: diff --git a/source/includes/steps-install-mongodb-on-red-hat.yaml b/source/includes/steps-install-mongodb-on-red-hat.yaml index bdc9c78440f..a93c4f3cf90 100644 --- a/source/includes/steps-install-mongodb-on-red-hat.yaml +++ b/source/includes/steps-install-mongodb-on-red-hat.yaml @@ -13,7 +13,7 @@ action: baseurl=https://repo.mongodb.org/yum/{{distro_name}}/{{distro_release}}/mongodb-org/{+version+}/x86_64/ gpgcheck=1 enabled=1 - gpgkey=https://www.mongodb.org/static/pgp/server-{+pgp-version+}.asc + gpgkey=https://pgp.mongodb.com/server-{+pgp-version+}.asc post: | You can also download the ``.rpm`` files directly from the {{distro_link}}. Downloads are organized by {{distro_name_full}} diff --git a/source/includes/steps-install-mongodb-on-suse.yaml b/source/includes/steps-install-mongodb-on-suse.yaml index 8f3716685d1..5e1205dd74c 100644 --- a/source/includes/steps-install-mongodb-on-suse.yaml +++ b/source/includes/steps-install-mongodb-on-suse.yaml @@ -5,7 +5,7 @@ ref: import-key action: language: sh code: | - sudo rpm --import https://www.mongodb.org/static/pgp/server-{+pgp-version+}.asc + sudo rpm --import https://pgp.mongodb.com/server-{+pgp-version+}.asc --- title: Add the MongoDB repository. stepnum: 2 diff --git a/source/includes/steps-install-verify-files-pgp.yaml b/source/includes/steps-install-verify-files-pgp.yaml index 58166c520c0..f5ef96d9dcc 100644 --- a/source/includes/steps-install-verify-files-pgp.yaml +++ b/source/includes/steps-install-verify-files-pgp.yaml @@ -48,7 +48,7 @@ action: language: sh copyable: true code: | - curl -LO https://www.mongodb.org/static/pgp/server-{+release+}.asc + curl -LO https://pgp.mongodb.com/server-{+release+}.asc gpg --import server-{+release+}.asc - pre: | PGP should return this response: diff --git a/source/tutorial/configure-x509-member-authentication.txt b/source/tutorial/configure-x509-member-authentication.txt index b949507a6e3..85f1e789c22 100644 --- a/source/tutorial/configure-x509-member-authentication.txt +++ b/source/tutorial/configure-x509-member-authentication.txt @@ -35,7 +35,7 @@ connect and perform operations in the deployment. * See the :doc:`/tutorial/configure-x509-client-authentication` tutorial for instructions on using x.509 certificates for user authentication. -.. _`default distribution of MongoDB`: http://www.mongodb.org/downloads?tck=docs_server +.. _`default distribution of MongoDB`: http://mongodb.com/downloads?tck=docs_server .. _`MongoDB Enterprise`: http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server .. important:: From b20cd7077b0a1d43931a83198ad5d869619058bc Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:00:24 -0500 Subject: [PATCH 025/308] DOCS-16581 server status replication waiters (#5875) * DOCS-16581-serverStatus-replication-waiters * DOCS-16581: Moving to metrics.repl section and adding example code for waiters. * DOCS-16581: Adding taxonomy facet tags. * Update source/reference/command/serverStatus.txt Co-authored-by: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> * Update source/reference/command/serverStatus.txt Co-authored-by: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> * DOCS-16581-serverStatus-replication-waiters * DOCS-16581: Moving to metrics.repl section and adding example code for waiters. * DOCS-16581: Adding taxonomy facet tags. * DOCS-16581: Expanding on optime desc, adding header to 7.3 release notes. * DOCS-16581: Clarifying opTime description. * DOCS-16581: Fixing spacing issue. --------- Co-authored-by: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> --- source/reference/command/serverStatus.txt | 25 +++++++++++++++++++++++ source/release-notes/7.3.txt | 9 ++++++++ 2 files changed, 34 insertions(+) diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index 806ee0f8343..f7681592a39 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -4,6 +4,14 @@ serverStatus .. default-domain:: mongodb +.. facet:: + :name: programming_language + :values: shell + +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -1756,6 +1764,10 @@ metrics numTimesChoseSame : Long(""), numTimesChoseDifferent : Long(""), numTimesCouldNotFind : Long("") + }, + waiters : { + opTime : Long(""), + replication : Long("") } }, storage : { @@ -2613,6 +2625,19 @@ metrics .. versionadded:: 4.4 +.. serverstatus:: metrics.repl.waiters.replication + + The number of threads waiting for replicated or journaled :ref:`write concern + acknowledgements `. + + .. versionadded:: 7.3 + +.. serverstatus:: metrics.repl.waiters.opTime + + The number of threads queued for local replication :term:`optime` assignments. + + .. versionadded:: 7.3 + .. serverstatus:: metrics.storage.freelist.search.bucketExhausted The number of times that :binary:`~bin.mongod` has examined the free diff --git a/source/release-notes/7.3.txt b/source/release-notes/7.3.txt index 614bfd6ce3e..f966cca98cc 100644 --- a/source/release-notes/7.3.txt +++ b/source/release-notes/7.3.txt @@ -31,3 +31,12 @@ megabytes, that must be recoverable for compaction to proceed. /release-notes/7.3-compatibility +``serverStatus`` Metrics +~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting in MongoDB 7.3, the :dbcommand:`serverStatus` command output +includes the following new metrics: + +- :serverstatus:`metrics.repl.waiters.replication` +- :serverstatus:`metrics.repl.waiters.opTime` + From 39af166b67d3725378ded34d08bde551f0a8abc4 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Fri, 19 Jan 2024 16:26:53 -0500 Subject: [PATCH 026/308] DOCSP-35757 Remedy PHP Role Build Errors (#5891) * DOCSP-35757 Remedy PHP Role Build Errors * Empty-Commit --- snooty.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snooty.toml b/snooty.toml index c9b23ec23e1..1859845909d 100644 --- a/snooty.toml +++ b/snooty.toml @@ -5,7 +5,7 @@ intersphinx = [ "https://pymongo.readthedocs.io/en/stable/objects.inv", "https://motor.readthedocs.io/en/stable/objects.inv", "https://www.mongodb.com/docs/atlas/objects.inv", - "https://www.mongodb.com/docs/php-library/upcoming/objects.inv", + "https://www.mongodb.com/docs/php-library/current/objects.inv", "https://www.mongodb.com/docs/compass/current/objects.inv", "https://www.mongodb.com/docs/database-tools/objects.inv", "https://www.mongodb.com/docs/mongodb-shell/objects.inv", From 673b02ae21696306bd047f8905319948d8dff9e8 Mon Sep 17 00:00:00 2001 From: Sarah Olson <98367156+sarah-olson-mongodb@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:36:39 -0800 Subject: [PATCH 027/308] Docsp 35612 -- Finalize 5.0.24 release notes (#5888) * DOCSP-35612: Update release date * DOCSP-35612: Update changelogs --- source/includes/changelogs/releases/5.0.24.rst | 5 ++++- source/release-notes/5.0.txt | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/source/includes/changelogs/releases/5.0.24.rst b/source/includes/changelogs/releases/5.0.24.rst index eccb4489093..ec184deddb3 100644 --- a/source/includes/changelogs/releases/5.0.24.rst +++ b/source/includes/changelogs/releases/5.0.24.rst @@ -102,7 +102,6 @@ Internals keystrings - :issue:`SERVER-83091` $or query can trigger an infinite loop during plan enumeration -- :issue:`SERVER-83099` LDAPTimer::setTimeout may run callback inline - :issue:`SERVER-83161` Fix concurrent read to _errMsg from MigrationDestinationManager without acquiring mutex - :issue:`SERVER-83283` Modify copybara script to send slack message on @@ -128,8 +127,12 @@ Internals with duplicate predicates in nested $or - :issue:`SERVER-84353` The test for stepDown deadlock with read ticket exhaustion is flaky +- :issue:`SERVER-84435` Deploy enterprise module consolidation to branch + v5.0 - :issue:`SERVER-84457` [v5.0] Explicitly declare type of term field in sync source resolver query +- :issue:`SERVER-84479` Amend burn_in test to tolerate absence of + manifest - :issue:`SERVER-84576` [v5.0] Update 5.0 Readme - :issue:`WT-7929` Investigate a solution to avoid FTDC stalls during checkpoint diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index 97857b9e400..397ffe8a489 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -54,8 +54,8 @@ Patch Releases .. _5.0.24-release-notes: -5.0.24 - Upcoming -~~~~~~~~~~~~~~~~~ +5.0.24 - Jan 18, 2024 +~~~~~~~~~~~~~~~~~~~~~ - :issue:`SERVER-50792` Return more useful errors when a shard key index can't be found for shardCollection/refineCollectionShardKey From 35b5353bca5bb3e1003e13e0bfbe8a1873bc41ff Mon Sep 17 00:00:00 2001 From: Sarah Olson <98367156+sarah-olson-mongodb@users.noreply.github.com> Date: Fri, 19 Jan 2024 13:43:13 -0800 Subject: [PATCH 028/308] Docsp 35634 -- 6.0.13 Release Notes Final (#5887) * DOCSP-35634: Update release date * DOCSP-35634: Update changelogs * Update source/includes/changelogs/releases/6.0.13.rst Co-authored-by: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> --------- Co-authored-by: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> --- source/includes/changelogs/releases/6.0.13.rst | 1 - source/release-notes/6.0.txt | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/includes/changelogs/releases/6.0.13.rst b/source/includes/changelogs/releases/6.0.13.rst index c008d6a80d7..e68d3525130 100644 --- a/source/includes/changelogs/releases/6.0.13.rst +++ b/source/includes/changelogs/releases/6.0.13.rst @@ -43,7 +43,6 @@ Internals command - :issue:`SERVER-65666` Do not create chunks on draining shards when sharding a new collection -- :issue:`SERVER-65908` Update fields for reshardCollection noop message - :issue:`SERVER-67766` Log index and collection successful drop - :issue:`SERVER-69615` Rollback fuzzing in WiredTiger leads to size storer marked dirty at shutdown diff --git a/source/release-notes/6.0.txt b/source/release-notes/6.0.txt index f9c7b63ecc8..f55bdea46b6 100644 --- a/source/release-notes/6.0.txt +++ b/source/release-notes/6.0.txt @@ -52,8 +52,8 @@ Patch Releases .. _6.0.13-release-notes: -6.0.13 - Upcoming -~~~~~~~~~~~~~~~~~ +6.0.13 - Jan 18, 2024 +~~~~~~~~~~~~~~~~~~~~~ - :issue:`SERVER-33494` WT SizeStorer never deletes old entries - :issue:`SERVER-50792` Return more useful errors when a shard key index From a773326d08c07b173105f2ce0d7e127663796f78 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Mon, 22 Jan 2024 08:33:05 -0800 Subject: [PATCH 029/308] DOCSP-16072 doc for new Search Sequential Pagination attribute (#5833) * DOCSP-16072 doc for new Search Sequential Pagination attribute * Update source/includes/fact-meta-syntax.rst Co-authored-by: Jeff Allen * DOCSP-16072 fix for broken link --------- Co-authored-by: Jeff Allen --- source/includes/fact-meta-syntax.rst | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/includes/fact-meta-syntax.rst b/source/includes/fact-meta-syntax.rst index 0d34c05f9c2..7a080840ffe 100644 --- a/source/includes/fact-meta-syntax.rst +++ b/source/includes/fact-meta-syntax.rst @@ -41,13 +41,11 @@ The |meta-object| expression can specify the following values as the .. versionadded:: 4.4 - :atlas:`MongoDB Atlas Search ` provides additional ``$meta`` keywords, such as: -- :atlas:`"searchScore" ` and - -- :atlas:`"searchHighlights" - `. +- :atlas:`"searchScore" ` +- :atlas:`"searchHighlights" ` +- :atlas:`"searchSequenceToken" ` Refer to the Atlas Search documentation for details. From 46d1301620575e03ff4848d549a3a4b8d2fc1e2f Mon Sep 17 00:00:00 2001 From: Ashley Brown <98361885+mdb-ashley@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:01:43 -0500 Subject: [PATCH 030/308] 4.4.28 changelog & release notes (#5910) * 4.4.28 changelog & release notes * updated link --- .../includes/changelogs/releases/4.4.28.rst | 37 +++++++++++++++++++ source/release-notes/4.4-changelog.txt | 2 + source/release-notes/4.4.txt | 19 ++++++++++ 3 files changed, 58 insertions(+) create mode 100644 source/includes/changelogs/releases/4.4.28.rst diff --git a/source/includes/changelogs/releases/4.4.28.rst b/source/includes/changelogs/releases/4.4.28.rst new file mode 100644 index 00000000000..bd502363d5b --- /dev/null +++ b/source/includes/changelogs/releases/4.4.28.rst @@ -0,0 +1,37 @@ +.. _4.4.28-changelog: + +4.4.28 Changelog +---------------- + +Sharding +~~~~~~~~ + +- :issue:`SERVER-82883` Recovering TransactionCoordinator on stepup may + block acquiring read/write tickets while participants are in the + prepared state +- :issue:`SERVER-84459` [test-only bug] JumboChunksNotMovedRandom must + keep chunk manager in scope in v4.4 + +Internals +~~~~~~~~~ + +- :issue:`SERVER-77506` Sharded multi-document transactions can mismatch + data and ShardVersion +- :issue:`SERVER-80886` $out may fail with a StaleDbVersion after a + movePrimary +- :issue:`SERVER-82111` In sharded_agg_helpers.cpp move invariant below + response status check +- :issue:`SERVER-82365` Optimize the construction of the balancer's + collection distribution status histogram (2nd attempt) +- :issue:`SERVER-83485` Fix multikey-path serialization code used during + validation +- :issue:`SERVER-83494` [7.0] Fix range deleter unit test case +- :issue:`SERVER-83830` On Enterprise build creating a collection in a + replica set with the storageEngine.inMemory option breaks secondaries +- :issue:`SERVER-84337` Backport new variants added to perf.yml over to + sys-perf-7.0 and sys-perf-4.4 +- :issue:`SERVER-84353` The test for stepDown deadlock with read ticket + exhaustion is flaky +- :issue:`WT-7929` Investigate a solution to avoid FTDC stalls during + checkpoint + diff --git a/source/release-notes/4.4-changelog.txt b/source/release-notes/4.4-changelog.txt index 33444838c2d..e7ca5754f24 100644 --- a/source/release-notes/4.4-changelog.txt +++ b/source/release-notes/4.4-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/4.4.28.rst + .. include:: /includes/changelogs/releases/4.4.27.rst .. include:: /includes/changelogs/releases/4.4.26.rst diff --git a/source/release-notes/4.4.txt b/source/release-notes/4.4.txt index 340868ac64f..d9e4f2f21c5 100644 --- a/source/release-notes/4.4.txt +++ b/source/release-notes/4.4.txt @@ -44,6 +44,25 @@ Release Notes for MongoDB 4.4 Patch Releases -------------- +.. _4.4.28-release-notes: + +4.4.28 - Jan 18, 2023 +~~~~~~~~~~~~~~~~~~~~~ + +- :issue:`SERVER-77506` Sharded multi-document transactions can mismatch + data and ShardVersion +- :issue:`SERVER-82365` Optimize the construction of the balancer's + collection distribution status histogram (2nd attempt) +- :issue:`SERVER-82883` Recovering TransactionCoordinator on stepup may + block acquiring read/write tickets while participants are in the + prepared state +- :issue:`WT-7929` Investigate a solution to avoid FTDC stalls during + checkpoint +- `All JIRA issues closed in 4.4.28 + `_ +- :ref:`4.4.28-changelog` + + .. _4.4.27-release-notes: 4.4.27 - Jan 3, 2023 From 2283ce5fc11fac6ad0c6a1dbfb362d11514719ad Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Tue, 23 Jan 2024 09:40:42 -0800 Subject: [PATCH 031/308] add details about what executionTimeMillis includes (#5863) * add details about what executionTimeMillis includes * review suggestions * Address review suggestions * remove antiquated info --- source/reference/explain-results.txt | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/source/reference/explain-results.txt b/source/reference/explain-results.txt index 3aaa44a62b1..d3c0db76a00 100644 --- a/source/reference/explain-results.txt +++ b/source/reference/explain-results.txt @@ -12,8 +12,8 @@ Explain Results :depth: 2 :class: singlecol -To return information on query plans and execution statistics of the -query plans, MongoDB provides: +To return information on :ref:`query plans ` and +execution statistics of the query plans, MongoDB provides: - the :method:`db.collection.explain()` method, @@ -565,9 +565,17 @@ representative. Your output may differ significantly. .. data:: explain.executionStats.executionTimeMillis Total time in milliseconds required for query plan selection and - query execution. :data:`explain.executionStats.executionTimeMillis` corresponds - to the ``millis`` field returned by ``cursor.explain()`` in - earlier versions of MongoDB. + query execution. It includes the time it takes to run the trial phase + part of the plan selection process, but does not include the network time + to transmit the data back to the client. + + The time reported by ``explain.executionStats.executionTimeMillis`` is + not necessarily representative of actual query time. During steady + state operations (when the query plan is cached), or when using + :method:`cursor.hint()` with ``cursor.explain()``, MongoDB bypasses the + plan selection process, resulting in a faster actual time, leading to + a lower ``explain.executionStats.executionTimeMillis`` value. + .. data:: explain.executionStats.totalKeysExamined From 9b92791f0437902028c37b553de419a65f8caac4 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:45:53 -0800 Subject: [PATCH 032/308] DOCSP-27565-database-profiler-update (#5824) * DOCSP-27565-database-profiler-update * DOCSP-27565-database-profiler-update * DOCSP-27565-database-profiler-update * DOCSP-27565-database-profiler-update * DOCSP-27565-database-profiler-update * DOCSP-27565-database-profiler-update * DOCSP-27565-database-profiler-update --------- Co-authored-by: jason-price-mongodb --- .../tutorial/manage-the-database-profiler.txt | 155 ++++++++++-------- 1 file changed, 84 insertions(+), 71 deletions(-) diff --git a/source/tutorial/manage-the-database-profiler.txt b/source/tutorial/manage-the-database-profiler.txt index e6a04225b1f..1aa9d42fc04 100644 --- a/source/tutorial/manage-the-database-profiler.txt +++ b/source/tutorial/manage-the-database-profiler.txt @@ -16,6 +16,7 @@ The database profiler collects detailed information about :ref:`database-commands` executed against a running :binary:`~bin.mongod` instance. This includes CRUD operations as well as configuration and administration commands. + The profiler writes all the data it collects to a :data:`system.profile <.system.profile>` collection, a :doc:`capped collection ` in each profiled @@ -30,8 +31,8 @@ levels `. When enabled, profiling has an effect on database performance and disk use. See :ref:`Database Profiler Overhead` for more information. -This document outlines a number of key administration options for the -database profiler. For additional related information, see: +This page shows important administration options for the +database profiler. For additional information, see: - :ref:`profiler` - :ref:`Profile Command ` @@ -56,31 +57,32 @@ Enable and Configure Database Profiling You can enable database profiling for :binary:`~bin.mongod` instances. -This section uses :binary:`~bin.mongosh` helper -:method:`db.setProfilingLevel()` helper to enable profiling. For -instructions using the driver, see your :driver:`driver -documentation `. +This section shows how you use the :binary:`~bin.mongosh` helper method +:method:`db.setProfilingLevel()` to enable profiling. To use a driver +method instead, see the :driver:`driver documentation`. -When you enable profiling for a :binary:`~bin.mongod` instance, you set +To enable profiling for a :binary:`~bin.mongod` instance, set the :ref:`profiling level ` to a value -greater than 0. The profiler records data in the :data:`system.profile +greater than ``0``. The profiler records data in the :data:`system.profile <.system.profile>` collection. MongoDB creates the :data:`system.profile <.system.profile>` collection in a database after you enable profiling for that database. To enable profiling and set the profiling level, pass the profiling level to the :method:`db.setProfilingLevel()` helper. For example, to -enable profiling for all database operations, consider the following -operation in :binary:`~bin.mongosh`: +enable profiling for all database operations for the currently connected +database, run this operation in :binary:`~bin.mongosh`: .. code-block:: javascript db.setProfilingLevel(2) -The shell returns a document showing the *previous* level of profiling. -The ``"ok" : 1`` key-value pair indicates the operation succeeded: +The shell returns the *previous* profiling level in the ``was`` field +and sets the new level. In the following output, the ``"ok" : +1`` key-value pair indicates the operation succeeded: .. code-block:: javascript + :copyable: false { "was" : 0, "slowms" : 100, "sampleRate" : 1.0, "ok" : 1 } @@ -97,7 +99,7 @@ The :ref:`slowms ` and settings are *global*. When set, these settings affect all databases in your process. -When set via the :dbcommand:`profile` command or +When set through the :dbcommand:`profile` command or :method:`db.setProfilingLevel()` shell helper method, :ref:`profiling level ` and :ref:`filter ` settings are set at the *database* @@ -111,7 +113,7 @@ Specify the Threshold for Slow Operations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ By default, the slow operation threshold is 100 milliseconds. To change -the slow operation threshold, specify the desired threshold value in +the slow operation threshold, specify the required threshold value in one of the following ways: - Set the value of ``slowms`` using the :dbcommand:`profile` command or @@ -122,37 +124,38 @@ one of the following ways: - Set the value of :setting:`~operationProfiling.slowOpThresholdMs` in a :ref:`configuration file `. -For example, the following code sets the profiling level for the -current :binary:`~bin.mongod` instance to ``1`` and sets the slow -operation threshold for the :binary:`~bin.mongod` instance to 20 +The following example sets the profiling level for the +currently connected database to ``1`` and sets the slow +operation threshold for the :binary:`~bin.mongod` instance to ``20`` milliseconds: .. code-block:: javascript - db.setProfilingLevel(1, { slowms: 20 }) + db.setProfilingLevel( 1, { slowms: 20 } ) -Profiling level of ``1`` will profile operations slower than the -threshold. +A profiling level of ``1`` causes the profiler to record operations +slower than the ``slowms`` threshold. .. important:: + The slow operation threshold applies to all databases in a :binary:`~bin.mongod` instance. It is used by both the database profiler and the diagnostic log and should be set to the highest useful value to avoid performance degradation. -Starting in MongoDB 4.0, you can use :method:`db.setProfilingLevel()` +You can use :method:`db.setProfilingLevel()` to configure ``slowms`` and ``sampleRate`` for :binary:`~bin.mongos`. For the :binary:`~bin.mongos`, the ``slowms`` and ``sampleRate`` configuration settings only affect the diagnostic log and not the profiler since profiling is not available on :binary:`~bin.mongos`. [#mongos-systemlog]_ -For example, the following sets a :binary:`~bin.mongos` instance's slow -operation threshold for logging slow operations: +The following example sets a :binary:`~bin.mongos` instance's slow +operation threshold for logging slow operations to ``20``: .. code-block:: javascript - db.setProfilingLevel(0, { slowms: 20 }) + db.setProfilingLevel( 0, { slowms: 20 } ) .. include:: /includes/extracts/4.2-changes-log-query-shapes-plan-cache-key.rst @@ -161,7 +164,7 @@ operation threshold for logging slow operations: Profile a Random Sample of Slow Operations ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To profile only a randomly sampled subset of all *slow* operations , +To profile only a randomly sampled subset of all *slow* operations, specify the desired sample rate in one of the following ways: [#slow-oplogs]_ @@ -176,25 +179,25 @@ specify the desired sample rate in one of the following ways: :ref:`configuration file `. By default, ``sampleRate`` is set to ``1.0``, meaning all *slow* -operations are profiled. When ``sampleRate`` is set between 0 and 1, -databases with profiling level ``1`` will only profile a randomly sampled -percentage of *slow* operations according to ``sampleRate``. +operations are profiled. When ``sampleRate`` is set between ``0`` and ``1``, +databases with a profiling level ``1`` only profile a randomly sampled +percentage of *slow* operations based on ``sampleRate``. -For example, the following method sets the profiling level for the -:binary:`~bin.mongod` to ``1`` and sets the profiler to sample 42% of -all *slow* operations: +The following example sets the profiling level for the currently +connected database to ``1`` and sets the profiler to sample 42% of all +*slow* operations: .. code-block:: javascript - db.setProfilingLevel(1, { sampleRate: 0.42 }) + db.setProfilingLevel( 1, { sampleRate: 0.42 } ) The modified sample rate value also applies to the system log. -Starting in MongoDB 4.0, you can use :method:`db.setProfilingLevel()` +You can use :method:`db.setProfilingLevel()` to configure ``slowms`` and ``sampleRate`` for :binary:`~bin.mongos`. For the :binary:`~bin.mongos`, the ``slowms`` and ``sampleRate`` configuration settings only affect the diagnostic log -and not the profiler since profiling is not available on +and not the profiler because profiling isn't available on :binary:`~bin.mongos`. [#mongos-systemlog]_ For example, the following sets a :binary:`~bin.mongos` instance's @@ -202,7 +205,7 @@ sampling rate for logging slow operations: .. code-block:: javascript - db.setProfilingLevel(0, { sampleRate: 0.42 }) + db.setProfilingLevel( 0, { sampleRate: 0.42 } ) .. important:: @@ -221,7 +224,7 @@ You can set a filter to control which operations are profiled and logged. You can set the profiling filter in one of the following ways: - Set the value of ``filter`` using the :dbcommand:`profile` command - or :method:`db.setProfilingLevel()` shell helper method. + or the :method:`db.setProfilingLevel()` shell helper method. - Set the value of :setting:`~operationProfiling.filter` in a :ref:`configuration file `. @@ -240,8 +243,8 @@ available on :binary:`~bin.mongos`. ` options do not affect the diagnostic log or the profiler. -For example, the following :method:`db.setProfilingLevel()` method sets -for a :binary:`~bin.mongod` instance: +The following :method:`db.setProfilingLevel()` example sets +the profile level for the currently connected database: - the :ref:`profiling level ` to ``2``, @@ -259,8 +262,8 @@ for a :binary:`~bin.mongod` instance: Check Profiling Level ~~~~~~~~~~~~~~~~~~~~~ -To view the :ref:`profiling level `, issue -the following from :binary:`~bin.mongosh`: +To view the :ref:`profiling level `, run +the following example in :binary:`~bin.mongosh`: .. code-block:: javascript @@ -283,17 +286,23 @@ that should be profiled. Disable Profiling ~~~~~~~~~~~~~~~~~ -To disable profiling, use the following helper in +To disable profiling, run the following example in :binary:`~bin.mongosh`: .. code-block:: javascript db.setProfilingLevel(0) +.. note:: + + Disabling profiling can improve database performance and lower disk + use. For more information, see :ref:`Database Profiler + Overhead` . + Enable Profiling for an Entire ``mongod`` Instance ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -For development purposes in testing environments, you can enable +For development and test environments, you can enable database profiling for an entire :binary:`~bin.mongod` instance. The profiling level applies to all databases provided by the :binary:`~bin.mongod` instance. @@ -313,10 +322,10 @@ This sets the profiling level to ``1``, defines slow operations as those that last longer than ``15`` milliseconds, and specifies that only 50% of *slow* operations should be profiled. [#slow-oplogs]_ -The ``slowms`` and ``slowOpSampleRate`` also affect which operations -are recorded to the diagnostic log when :parameter:`logLevel` is -set to ``0``. The ``slowms`` and ``slowOpSampleRate`` are also -available to configure diagnostic logging for :binary:`~bin.mongos`. [#slow-oplogs]_ +The ``slowms`` and ``slowOpSampleRate`` also affect the operations that +are recorded in the diagnostic log when :parameter:`logLevel` is set to +``0``. The ``slowms`` and ``slowOpSampleRate`` are also available to +configure diagnostic logging for :binary:`~bin.mongos`. [#slow-oplogs]_ .. seealso:: @@ -365,8 +374,8 @@ operation, including reads, on the :data:`system.profile Example Profiler Data Queries ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This section displays example queries to the :data:`system.profile <.system.profile>` -collection. For an explanation of the query output, see +This section shows example queries on the :data:`system.profile +<.system.profile>` collection. For query output details, see :doc:`/reference/database-profiler`. To return the most recent 10 log entries in the :data:`system.profile <.system.profile>` @@ -391,24 +400,23 @@ the following. This example returns operations in the ``mydb`` database's db.system.profile.find( { ns : 'mydb.test' } ).pretty() -To return operations slower than ``5`` milliseconds, run a query -similar to the following: +To return operations that take longer than 5 milliseconds to complete, +run: .. code-block:: javascript db.system.profile.find( { millis : { $gt : 5 } } ).pretty() -To return information from a certain time range, run a query similar to -the following: +To return operations for a specific time range, run: .. code-block:: javascript - db.system.profile.find({ - ts : { - $gt: new ISODate("2012-12-09T03:00:00Z"), - $lt: new ISODate("2012-12-09T03:40:00Z") - } - }).pretty() + db.system.profile.find( { + ts : { + $gt: new ISODate("2012-12-09T03:00:00Z"), + $lt: new ISODate("2012-12-09T03:40:00Z") + } + } ).pretty() The following example looks at the time range, suppresses the ``user`` field from the output to make it easier to read, and sorts the results @@ -416,20 +424,20 @@ by how long each operation took to run: .. code-block:: javascript - db.system.profile.find({ - ts : { - $gt: new ISODate("2011-07-12T03:00:00Z"), - $lt: new ISODate("2011-07-12T03:40:00Z") - } - }, { user: 0 }).sort( { millis: -1 } ) + db.system.profile.find( { + ts : { + $gt: new ISODate("2011-07-12T03:00:00Z"), + $lt: new ISODate("2011-07-12T03:40:00Z") + } + }, { user: 0 } ).sort( { millis: -1 } ) Show the Five Most Recent Events ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ On a database that has profiling enabled, the ``show profile`` helper in :binary:`~bin.mongosh` displays the 5 most recent operations -that took at least 1 millisecond to execute. Issue ``show profile`` -from :binary:`~bin.mongosh`, as follows: +that took at least 1 millisecond to execute. Run ``show profile`` +from :binary:`~bin.mongosh`: .. code-block:: javascript @@ -444,11 +452,16 @@ When enabled, profiling has an effect on database performance, especially when configured with a :ref:`profiling level` of 2, or when using a low :ref:`threshold` value -with a profiling level of 1. Profiling also consumes disk space, as it -logs to both the :data:`system.profile <.system.profile>` -collection and also the MongoDB :option:`logfile `. -Carefully consider any performance and security implications before -configuring and enabling the profiler on a production deployment. +with a profiling level of 1. + +Profiling also uses disk space, because profiling +writes logs to the :data:`system.profile <.system.profile>` +collection and the MongoDB :option:`logfile `. + +.. warning:: + + Consider performance and storage implications before + you enable the profiler in a production deployment. The ``system.profile`` Collection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 288270892b777c32f1c41c0ee0536cf40b129368 Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:34:10 -0600 Subject: [PATCH 033/308] DOCSP-33391 Sharded Backup with Filesystem Snapshot (#5553) * DOCSP-33391 Fixes filesystem snapshot text * Adds step to find a backup window * Reworks procedure for filesystem snapshot * Refactors filesystem backup * removes deprecated YAML * fixes build error * fixes build error * Fixes per Ian * Fixes per Ashley Co-authored-by: Ashley Brown <98361885+mdb-ashley@users.noreply.github.com> * Fixes per Ashley * Fixes per Ashley * Fixes build issues * Fixes per Nandini * Fixes per Nandini * Fixes spacing issue * Vale checks --------- Co-authored-by: Ashley Brown <98361885+mdb-ashley@users.noreply.github.com> --- source/includes/note-shard-cluster-backup.rst | 5 +- ...store-file-system-snapshot-restriction.rst | 9 +- ...backup-sharded-cluster-with-snapshots.yaml | 202 ----------------- ...rded-cluster-with-filesystem-snapshots.txt | 204 ++++++++++++++++-- 4 files changed, 189 insertions(+), 231 deletions(-) delete mode 100644 source/includes/steps-backup-sharded-cluster-with-snapshots.yaml diff --git a/source/includes/note-shard-cluster-backup.rst b/source/includes/note-shard-cluster-backup.rst index 4c01ba33cd7..cd7a51b24ab 100644 --- a/source/includes/note-shard-cluster-backup.rst +++ b/source/includes/note-shard-cluster-backup.rst @@ -1,4 +1,3 @@ -.. important:: +.. important:: - To capture a consistent backup from a sharded - cluster you **must** stop *all* writes to the cluster. + To back up a sharded cluster you **must** stop *all* writes to the cluster. diff --git a/source/includes/sharded-clusters-backup-restore-file-system-snapshot-restriction.rst b/source/includes/sharded-clusters-backup-restore-file-system-snapshot-restriction.rst index 480466ea3f1..83fb6d00634 100644 --- a/source/includes/sharded-clusters-backup-restore-file-system-snapshot-restriction.rst +++ b/source/includes/sharded-clusters-backup-restore-file-system-snapshot-restriction.rst @@ -1,7 +1,8 @@ -In MongoDB 4.2+, you cannot use :doc:`file system snapshots -` for backups that involve -transactions across shards because those backups do not maintain -atomicity. Instead, use one of the following to perform the backups: +To take a backup with a file system snapshot, you must first stop the balancer, +stop writes, and stop any schema transformation operations on the cluster. + +MongoDB provides backup and restore operations that can run with the balancer +and running transactions through the following services: - `MongoDB Atlas `_ diff --git a/source/includes/steps-backup-sharded-cluster-with-snapshots.yaml b/source/includes/steps-backup-sharded-cluster-with-snapshots.yaml deleted file mode 100644 index 29e1464c298..00000000000 --- a/source/includes/steps-backup-sharded-cluster-with-snapshots.yaml +++ /dev/null @@ -1,202 +0,0 @@ -title: Disable the balancer. -stepnum: 1 -ref: disable-balancer -pre: | - - Connect :binary:`~bin.mongosh` to a cluster - :binary:`~bin.mongos` instance. Use the :method:`sh.stopBalancer()` - method to stop the balancer. If a balancing round is in progress, the - operation waits for balancing to complete before stopping the - balancer. - - .. code-block:: javascript - - use config - sh.stopBalancer() - -post: | - .. include:: /includes/extracts/4.2-changes-stop-balancer-autosplit.rst - - For more information, see the - :ref:`sharding-balancing-disable-temporarily` procedure. ---- -title: "If necessary, lock one secondary member of each replica set." -stepnum: 2 -ref: lock -pre: | - If your secondary does not have journaling enabled *or* its - journal and data files are on different volumes, you **must** lock - the secondary's :binary:`~bin.mongod` instance before capturing a backup. - - If your secondary has journaling enabled and its journal and data - files are on the same volume, you may skip this step. - - .. important:: - - If your deployment requires this step, you must perform it on one - secondary of each shard and one secondary of the - :ref:`config server replica set (CSRS) `. - - Ensure that the :term:`oplog` has sufficient capacity to allow these - secondaries to catch up to the state of the primaries after finishing - the backup procedure. See :ref:`replica-set-oplog-sizing` for more - information. - -action: - - heading: Lock shard replica set secondary. - pre: | - For each shard replica set in the sharded cluster, confirm that - the member has replicated data up to some control point. To - verify, first connect :binary:`~bin.mongosh` to the shard - primary and perform a write operation with - :writeconcern:`"majority"` write concern on a control - collection: - language: javascript - code: | - use config - db.BackupControl.findAndModify( - { - query: { _id: 'BackupControlDocument' }, - update: { $inc: { counter : 1 } }, - new: true, - upsert: true, - writeConcern: { w: 'majority', wtimeout: 15000 } - } - ); - - pre: | - The operation should return the modified (or inserted) control - document: - language: javascript - code: | - { "_id" : "BackupControlDocument", "counter" : 1 } - - pre: | - Query the shard secondary member for the returned control - document. Connect :binary:`~bin.mongosh` to the shard - secondary to lock and use :method:`db.collection.find()` to query - for the control document: - language: javascript - code: | - rs.secondaryOk(); - - use config; - - db.BackupControl.find( - { "_id" : "BackupControlDocument", "counter" : 1 } - ).readConcern('majority'); - - post: | - If the secondary member contains the latest control document, - it is safe to lock the member. Otherwise, wait until the member - contains the document or select a different secondary member - that contains the latest control document. - - pre: | - To lock the secondary member, run :method:`db.fsyncLock()` on - the member: - language: javascript - code: | - db.fsyncLock() - - - heading: Lock config server replica set secondary. - pre: | - If locking a secondary of the CSRS, confirm that the member has - replicated data up to some control point. To verify, first connect - :binary:`~bin.mongosh` to the CSRS primary and perform a write - operation with :writeconcern:`"majority"` write concern on a - control collection: - language: javascript - code: | - use config - db.BackupControl.findAndModify( - { - query: { _id: 'BackupControlDocument' }, - update: { $inc: { counter : 1 } }, - new: true, - upsert: true, - writeConcern: { w: 'majority', wtimeout: 15000 } - } - ); - - pre: | - The operation should return the modified (or inserted) control - document: - language: javascript - code: | - { "_id" : "BackupControlDocument", "counter" : 1 } - - pre: | - Query the CSRS secondary member for the returned control - document. Connect :binary:`~bin.mongosh` to the CSRS secondary - to lock and use :method:`db.collection.find()` to query for the - control document: - language: javascript - code: | - rs.secondaryOk(); - - use config; - - db.BackupControl.find( - { "_id" : "BackupControlDocument", "counter" : 1 } - ).readConcern('majority'); - - post: | - If the secondary member contains the latest control document, it - is safe to lock the member. Otherwise, wait until the member - contains the document or select a different secondary member - that contains the latest control document. - - pre: | - To lock the secondary member, run :method:`db.fsyncLock()` on - the member: - language: javascript - code: | - db.fsyncLock() ---- -title: Back up one of the config servers. -stepnum: 3 -ref: backup-config-server -content: | - - .. note:: - - Backing up a :ref:`config server ` backs - up the sharded cluster's metadata. You only need to back up one - config server, as they all hold the same data. Perform this step - against the locked CSRS secondary member. - - To create a file-system snapshot of the config server, follow the - procedure in :ref:`lvm-backup-operation`. ---- -title: Back up a replica set member for each shard. -stepnum: 4 -ref: backup-locked-shards -content: | - If you locked a member of the replica set shards, perform this step - against the locked secondary. - - You may back up the shards in parallel. For each shard, create a - snapshot, using the procedure in - :doc:`/tutorial/backup-with-filesystem-snapshots`. ---- -title: Unlock all locked replica set members. -stepnum: 5 -ref: unlock -pre: | - If you locked any :binary:`~bin.mongod` instances to capture the backup, - unlock them. - - To unlock the replica set members, use :method:`db.fsyncUnlock()` - method in :binary:`~bin.mongosh`. -action: - language: javascript - code: | - db.fsyncUnlock() ---- -title: Enable the balancer. -stepnum: 6 -ref: enable-balancer -pre: | - To re-enable to balancer, connect :binary:`~bin.mongosh` to a - :binary:`~bin.mongos` instance and run - :method:`sh.startBalancer()`. -action: - language: javascript - code: | - sh.startBalancer() -post: | - .. include:: /includes/extracts/4.2-changes-start-balancer-autosplit.rst -... diff --git a/source/tutorial/backup-sharded-cluster-with-filesystem-snapshots.txt b/source/tutorial/backup-sharded-cluster-with-filesystem-snapshots.txt index 1717b04abcd..d5408ca618b 100644 --- a/source/tutorial/backup-sharded-cluster-with-filesystem-snapshots.txt +++ b/source/tutorial/backup-sharded-cluster-with-filesystem-snapshots.txt @@ -6,15 +6,12 @@ Back Up a Sharded Cluster with File System Snapshots .. default-domain:: mongodb - - .. contents:: On this page :local: :backlinks: none :depth: 1 :class: singlecol - Overview -------- @@ -40,7 +37,7 @@ Encrypted Storage Engine (MongoDB Enterprise Only) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. include:: /includes/fact-aes256-backups.rst - + Balancer ~~~~~~~~ @@ -48,7 +45,7 @@ It is *essential* that you stop the :ref:`balancer ` before capturing a backup. If the balancer is active while you capture backups, the backup -artifacts may be incomplete and/or have duplicate data, as :term:`chunks +artifacts may be incomplete or have duplicate data, as :term:`chunks ` may migrate while recording backups. Precision @@ -58,28 +55,191 @@ In this procedure, you will stop the cluster balancer and take a backup up of the :term:`config database`, and then take backups of each shard in the cluster using a file-system snapshot tool. If you need an exact moment-in-time snapshot of the system, you will need to stop all -application writes before taking the file system snapshots; otherwise -the snapshot will only approximate a moment in time. - -For approximate point-in-time snapshots, you can minimize the impact on -the cluster by taking the backup from a secondary member of each -replica set shard. +writes before taking the file system snapshots; otherwise the snapshot will +only approximate a moment in time. Consistency ~~~~~~~~~~~ -If the journal and data files are on the same logical volume, you can -use a single point-in-time snapshot to capture a consistent copy of the -data files. - -If the journal and data files are on different file systems, you must -use :method:`db.fsyncLock()` and :method:`db.fsyncUnlock()` to ensure -that the data files do not change, providing consistency for the -purposes of creating backups. +To back up a sharded cluster, you must use the :dbcommand:`fsync` command or +:method:`db.fsyncLock` method to stop writes on the cluster. This ensures that +data files do not change during the backup. .. include:: /includes/fact-backup-snapshots-with-ebs-in-raid10.rst -Procedure ---------- +Steps +----- + +To take a self-managed backup of a sharded cluster, complete the following +steps: + +.. procedure:: + :style: normal + + .. step:: Find a Backup Window + + Chunk migrations, resharding, and schema migration operations can cause + inconsistencies in backups. To find a good time to perform a backup, + monitor your application and database usage and find a time when these + operations are unlikely to occur. + + For more information, see :ref:`sharded-schedule-backup`. + + .. step:: Stop the Balancer + + To prevent chunk migrations from disrupting the backup, use + the :method:`sh.stopBalancer` method to stop the balancer: + + .. code-block:: javascript + + sh.stopBalancer() + + If a balancing round is currently in progress, the operation waits for + balancing to complete. + + To confirm that the balancer is stopped, use the + :method:`sh.getBalancerState` method: + + .. io-code-block:: + + .. input:: + :language: javascript + + sh.getBalancerState() + + .. output:: + :language: javascript + + false + + The command returns ``false`` when the balancer is stopped. + + .. step:: Lock the Cluster + + Writes to the database can cause backup inconsistencies. Lock your + sharded cluster to protect the database from writes. + + To lock a sharded cluster, use the :method:`db.fsyncLock` method: + + .. code-block:: javascript + + db.getSiblingDB("admin").fsyncLock() + + Run the following aggregation pipeline on both :program:`mongos` and + the primary :program:`mongod` of the config servers. To confirm the + lock, ensure that the ``fysncLocked`` field returns ``true`` and + ``fsyncUnlocked`` field returns ``false``. + + .. io-code-block:: + + .. input:: + :language: javascript + + db.getSiblingDB("admin").aggregate( [ + { $currentOp: { } }, + { $facet: { + "locked": [ + { $match: { $and: [ + { fsyncLock: { $exists: true } }, + { fsyncLock: true } + ] } }], + "unlocked": [ + { $match: { fsyncLock: { $exists: false } } } + ] + } }, + { $project: { + "fsyncLocked": { $gt: [ { $size: "$locked" }, 0 ] }, + "fsyncUnlocked": { $gt: [ { $size: "$unlocked" }, 0 ] } + } } + ] ) + + .. output:: + :language: json + + [ { fsyncLocked: true }, { fsyncUnlocked: false } ] + + .. step:: Back up the Primary Config Server + + .. note:: + + Backing up a :ref:`config server ` backs + up the sharded cluster's metadata. You only need to back up one + config server, as they all hold the same data. Perform this step + against the CSRS primary member. + + To create a filesystem snapshot of the config server, follow the + procedure in :ref:`lvm-backup-operation`. + + .. step:: Back up the Primary Shards + + Perform a filesystem snapshot against the primary member of each shard, + using the procedure found in :ref:`backup-restore-filesystem-snapshots`. + + .. step:: Unlock the Cluster + + After the backup completes, you can unlock the cluster to allow writes + to resume. + + To unlock the cluster, use the :method:`db.fsyncUnlock` method: + + .. code-block:: bash + + db.getSibling("admin").fsyncUnlock() + + Run the following aggregation pipeline on both :program:`mongos` and + the primary :program:`mongod` of the config servers. To confirm the + unlock, ensure that the ``fysncLocked`` field returns ``false`` and + ``fsyncUnlocked`` field returns ``true``. + + .. io-code-block:: + + .. input:: + :language: javascript + + db.getSiblingDB("admin").aggregate( [ + { $currentOp: { } }, + { $facet: { + "locked": [ + { $match: { $and: [ + { fsyncLock: { $exists: true } }, + { fsyncLock: true } + ] } }], + "unlocked": [ + { $match: { fsyncLock: { $exists: false } } } + ] + } }, + { $project: { + "fsyncLocked": { $gt: [ { $size: "$locked" }, 0 ] }, + "fsyncUnlocked": { $gt: [ { $size: "$unlocked" }, 0 ] } + } } + ] ) + + .. output:: + :language: json + + [ { fsyncLocked: false }, { fsyncUnlocked: true } ] + + .. step:: Restart the Balancer + + To restart the balancer, use the :method:`sh.startBalancer` method: + + .. code-block:: javascript + + sh.startBalancer() + + To confirm that the balancer is running, use the + :method:`sh.getBalancerState` method: + + .. io-code-block:: + + .. input:: + :language: javascript + + sh.getBalancerState() + + .. output:: + :language: javascript + + true -.. include:: /includes/steps/backup-sharded-cluster-with-snapshots.rst + The command returns ``true`` when the balancer is running. From 48b783d85ac88a5ef335a0b266e953dbbd847df0 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:07:53 -0800 Subject: [PATCH 034/308] DOCSP-27736-sql-error (#5889) * DOCSP-27736-sql-error * DOCSP-27736-sql-error * DOCSP-27736-sql-error * DOCSP-27736-sql-error * DOCSP-27736-sql-error * DOCSP-27736-sql-error * DOCSP-27736-sql-error * DOCSP-27736-sql-error * DOCSP-27736-sql-error * DOCSP-27736-sql-error --------- Co-authored-by: jason-price-mongodb --- .../reference/operator/aggregation/lookup.txt | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/source/reference/operator/aggregation/lookup.txt b/source/reference/operator/aggregation/lookup.txt index 950b3f554dd..4129574e643 100644 --- a/source/reference/operator/aggregation/lookup.txt +++ b/source/reference/operator/aggregation/lookup.txt @@ -27,7 +27,7 @@ Definition the "joined" collection. The :pipeline:`$lookup` stage passes these reshaped documents to the next stage. - Starting in MongoDB 5.1, :pipeline:`$lookup` works across sharded + Starting in MongoDB 5.1, you can use :pipeline:`$lookup` with sharded collections. To combine elements from two different collections, use the @@ -120,19 +120,25 @@ The :pipeline:`$lookup` takes a document with these fields: already exists in the input document, the existing field is *overwritten*. -The operation would correspond to the following pseudo-SQL statement: +The operation corresponds to this pseudo-SQL statement: .. code-block:: sql + :copyable: false - SELECT *, - FROM collection - WHERE IN ( - SELECT * + SELECT *, ( + SELECT ARRAY_AGG(*) FROM WHERE = - ); + ) AS + FROM collection; -See these examples: +.. note:: + + The SQL statements on this page are included for comparison to the + MongoDB aggregation pipeline syntax. The SQL statements aren't + runnable. + +For MongoDB examples, see these pages: - :ref:`lookup-single-equality-example` - :ref:`unwind-example` @@ -249,6 +255,7 @@ The :pipeline:`$lookup` stage accepts a document with these fields: The operation corresponds to this pseudo-SQL statement: .. code-block:: sql + :copyable: false SELECT *, FROM collection @@ -380,6 +387,7 @@ The :pipeline:`$lookup` accepts a document with these fields: The operation corresponds to this pseudo-SQL statement: .. code-block:: sql + :copyable: false SELECT *, FROM localCollection @@ -688,6 +696,7 @@ The operation returns these documents: The operation corresponds to this pseudo-SQL statement: .. code-block:: sql + :copyable: false SELECT *, inventory_docs FROM orders @@ -949,6 +958,7 @@ The operation returns these documents: The operation corresponds to this pseudo-SQL statement: .. code-block:: sql + :copyable: false SELECT *, stockdata FROM orders @@ -1064,6 +1074,7 @@ The operation returns the following: The operation corresponds to this pseudo-SQL statement: .. code-block:: sql + :copyable: false SELECT *, holidays FROM absences From 7dfdeeb6e0fc5dc2dc0ad66eba6b983c2892257a Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Tue, 23 Jan 2024 16:23:23 -0500 Subject: [PATCH 035/308] (DOCSP-33844): Fix inaccuracy on tailable cursor doc (#5922) * (DOCSP-33844): Fix inaccuracy on tailable cursor doc * edit * IA template adjustments * add period * avoid 'dead' * reorder * typo * wording * review edits * wording adjustment --- source/core/tailable-cursors.txt | 70 ++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 27 deletions(-) diff --git a/source/core/tailable-cursors.txt b/source/core/tailable-cursors.txt index fdefbe8a6f7..e442908eafa 100644 --- a/source/core/tailable-cursors.txt +++ b/source/core/tailable-cursors.txt @@ -6,15 +6,27 @@ Tailable Cursors .. default-domain:: mongodb -By default, MongoDB will automatically close a cursor when the client -has exhausted all results in the cursor. However, for :doc:`capped -collections ` you may use a *Tailable -Cursor* that remains open after the client exhausts the results in the +.. facet:: + :name: genre + :values: reference + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +By default, MongoDB automatically closes a cursor when the client +exhausts all results in the cursor. However, for :ref:`capped +collections ` you can use a :term:`tailable +cursor` that remains open after the client exhausts the results in the initial cursor. Tailable cursors are conceptually equivalent to the -``tail`` Unix command with the ``-f`` option (i.e. with "follow" -mode). After clients insert new additional documents into a capped -collection, the tailable cursor will continue to retrieve -documents. +``tail`` Unix command with the ``-f`` option ("follow" mode). After +clients insert additional documents into a capped collection, the +tailable cursor continues to retrieve documents. + +Use Cases +--------- Use tailable cursors on capped collections that have high write volumes where indexes aren't practical. For instance, @@ -23,34 +35,38 @@ tail the primary's :term:`oplog`. .. note:: - If your query is on an indexed field, do not use tailable cursors, - but instead, use a regular cursor. Keep track of the last value of - the indexed field returned by the query. To retrieve the newly - added documents, query the collection again using the last value of - the indexed field in the query criteria, as in the following - example: + If your query is on an indexed field, use a regular cursor instead of + a tailable cursor. Keep track of the last value of the indexed field + returned by the query. To retrieve the newly added documents, query + the collection again using the last value of the indexed field in the + query criteria. For example: .. code-block:: javascript db..find( { indexedField: { $gt: } } ) -Consider the following behaviors related to tailable cursors: +Get Started +----------- -- Tailable cursors do not use indexes and return documents in - :term:`natural order`. +To create a tailable cursor in :binary:`mongosh`, see +:method:`cursor.tailable()`. -- Because tailable cursors do not use indexes, the initial scan for the - query may be expensive; but, after initially exhausting the cursor, - subsequent retrievals of the newly added documents are inexpensive. +To see tailable cursor methods for your driver, see your :driver:`driver +documentation `. -- Tailable cursors may become *dead*, or invalid, if either: +Behavior +-------- - - the query returns no match. +Consider the following behaviors related to tailable cursors: - - the cursor returns the document at the "end" of the collection and - then the application deletes that document. +- Tailable cursors do not use indexes. They return documents in + :term:`natural order`. - A *dead* cursor has an ID of ``0``. +- Because tailable cursors do not use indexes, the initial scan for the + query may be expensive. After initially exhausting the cursor, + subsequent retrievals of the newly added documents are inexpensive. -See your :driver:`driver documentation ` for the -driver-specific method to specify the tailable cursor. +- A tailable cursor can become invalid if the data at its current + position is overwritten by new data. For example, this can happen if + the speed of data insertion is faster than the speed of cursor + iteration. From 1cec6b4d42527070c633ca3270af441f45cb4a97 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Tue, 23 Jan 2024 13:48:27 -0800 Subject: [PATCH 036/308] DOCSP-35715-distinct-updates (#5918) Co-authored-by: jason-price-mongodb --- .../core/queryable-encryption/reference/supported-operations.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/source/core/queryable-encryption/reference/supported-operations.txt b/source/core/queryable-encryption/reference/supported-operations.txt index 3c46bb332db..d62cccb3b46 100644 --- a/source/core/queryable-encryption/reference/supported-operations.txt +++ b/source/core/queryable-encryption/reference/supported-operations.txt @@ -45,7 +45,6 @@ following commands: - :dbcommand:`aggregate` - :dbcommand:`count` - :dbcommand:`delete` -- :dbcommand:`distinct` - :dbcommand:`explain` - :dbcommand:`find` - :dbcommand:`findAndModify` From d9cffc4ba8e8bf1b0691ab307dd5d4ea33545274 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Wed, 24 Jan 2024 10:23:25 -0800 Subject: [PATCH 037/308] DOCSP-33515-shard-key-updates (#5886) * DOCSP-33515-shard-key-updates * DOCSP-33515-shard-key-updates * DOCSP-33515-shard-key-updates * DOCSP-33515-shard-key-updates * DOCSP-33515-shard-key-updates * DOCSP-33515-shard-key-updates * DOCSP-33515-shard-key-updates * DOCSP-33515-shard-key-updates --------- Co-authored-by: jason-price-mongodb --- source/includes/analyzeShardKey-supporting-indexes.rst | 3 +++ .../includes/cqa-queryAnalysisSampleExpirationSecs.rst | 5 ++--- source/reference/command/analyzeShardKey.txt | 10 +++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/source/includes/analyzeShardKey-supporting-indexes.rst b/source/includes/analyzeShardKey-supporting-indexes.rst index 2e3947b4654..de9d6dfa235 100644 --- a/source/includes/analyzeShardKey-supporting-indexes.rst +++ b/source/includes/analyzeShardKey-supporting-indexes.rst @@ -34,3 +34,6 @@ index requirements: - Index is not :ref:`multi-key ` - Index is not :ref:`sparse ` - Index is not :ref:`partial ` + +To create supporting indexes, use the +:method:`db.collection.createIndex()` method. diff --git a/source/includes/cqa-queryAnalysisSampleExpirationSecs.rst b/source/includes/cqa-queryAnalysisSampleExpirationSecs.rst index 691070a0c73..f3fe72babef 100644 --- a/source/includes/cqa-queryAnalysisSampleExpirationSecs.rst +++ b/source/includes/cqa-queryAnalysisSampleExpirationSecs.rst @@ -2,8 +2,7 @@ queryAnalysisSampleExpirationSecs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sampled queries are stored in an internal collection that has a TTL -index with ``expireAfterSeconds``. Configure ``expireAfterSeconds`` -with the ``queryAnalysisSampleExpirationSecs`` server parameter. -with the :parameter:`queryAnalysisSampleExpirationSecs`. +index with ``expireAfterSeconds``. To configure ``expireAfterSeconds``, +use the :parameter:`queryAnalysisSampleExpirationSecs` server parameter. Sampled queries are automatically deleted after ``queryAnalysisSampleExpirationSecs``. diff --git a/source/reference/command/analyzeShardKey.txt b/source/reference/command/analyzeShardKey.txt index 3dedfaec75e..cc2d666a715 100644 --- a/source/reference/command/analyzeShardKey.txt +++ b/source/reference/command/analyzeShardKey.txt @@ -112,7 +112,7 @@ Limitations Access Control -------------- -|analyzeShardKey| requires one of the following roles: +|analyzeShardKey| requires one of these roles: - :authaction:`enableSharding` privilege action against the collection being analyzed. @@ -156,6 +156,14 @@ Examples .. include:: /includes/analyzeShardKey-example-intro.rst +.. note:: + + Before you run ``analyzeShardKey`` commands, read the + :ref:`supporting-indexes-ref` section earlier on this page. If you + require supporting indexes for the shard key you are analyzing, use + the :method:`db.collection.createIndex()` method to create the + indexes. + { lastName: 1 } keyCharacteristics ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From ed8e7725dc3a142ac1b6addc208d4343d9e95c4f Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Wed, 24 Jan 2024 13:34:29 -0500 Subject: [PATCH 038/308] DOCSP-35757 Fix :phpmethod: Build Errors (#5955) * Empty-Commit * ` + :phpmethod:`deleteMany() ` method returns an instance of :phpclass:`MongoDB\\DeleteResult ` - whose :phpmethod:`getDeletedCount()` + whose :phpmethod:`getDeletedCount()` method returns the number of documents that matched the filter. - id: perl diff --git a/source/includes/driver-examples/driver-example-query-intro-no-perl.rst b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst index a033b40b848..dc1d49485dd 100644 --- a/source/includes/driver-examples/driver-example-query-intro-no-perl.rst +++ b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst @@ -75,7 +75,7 @@ content: | This page provides examples of |query_operations| using the - :phpmethod:`MongoDB\\Collection::find() ` + :phpmethod:`MongoDB\\Collection::find() ` method in the `MongoDB PHP Library `_. diff --git a/source/includes/driver-examples/driver-example-query-intro.rst b/source/includes/driver-examples/driver-example-query-intro.rst index 7dc285e13b9..8192fc4c271 100644 --- a/source/includes/driver-examples/driver-example-query-intro.rst +++ b/source/includes/driver-examples/driver-example-query-intro.rst @@ -67,7 +67,7 @@ - id: php content: | This page provides examples of |query_operations| using the - :phpmethod:`MongoDB\\Collection::find() ` + :phpmethod:`MongoDB\\Collection::find() ` method in the `MongoDB PHP Library `_. diff --git a/source/includes/driver-examples/driver-procedure-indexes-1.rst b/source/includes/driver-examples/driver-procedure-indexes-1.rst index fbfe1ae8617..9e7b27a09de 100644 --- a/source/includes/driver-examples/driver-procedure-indexes-1.rst +++ b/source/includes/driver-examples/driver-procedure-indexes-1.rst @@ -77,7 +77,7 @@ To create an index using the `PHP driver `_, use - :phpmethod:`MongoDB\\Collection::createIndex() `. + :phpmethod:`MongoDB\\Collection::createIndex() `. .. code-block:: php diff --git a/source/tutorial/insert-documents.txt b/source/tutorial/insert-documents.txt index 003bec206d2..289c40d4094 100644 --- a/source/tutorial/insert-documents.txt +++ b/source/tutorial/insert-documents.txt @@ -210,7 +210,7 @@ Insert a Single Document .. tab:: :tabid: php - :phpmethod:`MongoDB\\Collection::insertOne() ` + :phpmethod:`MongoDB\\Collection::insertOne() ` inserts a *single* :ref:`document` into a collection. @@ -346,11 +346,11 @@ Insert a Single Document :tabid: php Upon successful insert, the - :phpmethod:`insertOne() ` + :phpmethod:`insertOne() ` method returns an instance of :phpclass:`MongoDB\\InsertOneResult ` whose - :phpmethod:`getInsertedId() ` + :phpmethod:`getInsertedId() ` method returns the ``_id`` of the newly inserted document. .. tab:: @@ -500,7 +500,7 @@ upper-right to set the language of the examples on this page. .. tab:: :tabid: php - :phpmethod:`MongoDB\\Collection::insertMany() ` + :phpmethod:`MongoDB\\Collection::insertMany() ` can insert *multiple* :ref:`documents ` into a collection. Pass an array of documents to the method. @@ -640,12 +640,12 @@ upper-right to set the language of the examples on this page. :tabid: php Upon successful insert, the - :phpmethod:`insertMany() ` + :phpmethod:`insertMany() ` method returns an instance of :phpclass:`MongoDB\\InsertManyResult ` whose - :phpmethod:`getInsertedIds() ` + :phpmethod:`getInsertedIds() ` method returns the ``_id`` of each newly inserted document. To retrieve the inserted documents, :ref:`query the collection @@ -810,9 +810,9 @@ requested from MongoDB for write operations. For details, see .. seealso:: - - :phpmethod:`MongoDB\\Collection::insertOne() ` + - :phpmethod:`MongoDB\\Collection::insertOne() ` - - :phpmethod:`MongoDB\\Collection::insertMany() ` + - :phpmethod:`MongoDB\\Collection::insertMany() ` - :ref:`additional-inserts` diff --git a/source/tutorial/project-fields-from-query-results.txt b/source/tutorial/project-fields-from-query-results.txt index b626374eb1f..95c32a5e694 100644 --- a/source/tutorial/project-fields-from-query-results.txt +++ b/source/tutorial/project-fields-from-query-results.txt @@ -88,7 +88,7 @@ Return All Fields in Matching Documents - id: php content: | If you do not specify a :term:`projection` document, the - :phpmethod:`find() ` + :phpmethod:`find() ` method returns all fields in the matching documents. - id: perl diff --git a/source/tutorial/query-documents.txt b/source/tutorial/query-documents.txt index a0994ff3f66..fca578db560 100644 --- a/source/tutorial/query-documents.txt +++ b/source/tutorial/query-documents.txt @@ -92,7 +92,7 @@ the following SQL statement: - id: php content: | For more information on the syntax of the method, see - :phpmethod:`find() `. + :phpmethod:`find() `. - id: perl content: | @@ -354,7 +354,7 @@ Cursor - id: php content: | - The :phpmethod:`MongoDB\\Collection::find() ` + The :phpmethod:`MongoDB\\Collection::find() ` method returns a :doc:`cursor ` to the matching documents. See the MongoDB PHP Library documentation for @@ -533,7 +533,7 @@ Additional Methods and Options The following methods can also read documents from a collection: - - :phpmethod:`MongoDB\\Collection::findOne() ` + - :phpmethod:`MongoDB\\Collection::findOne() ` - In :ref:`aggregation pipeline `, the :pipeline:`$match` pipeline stage provides access to MongoDB @@ -541,12 +541,12 @@ Additional Methods and Options :ref:`aggregation example `. .. note:: - The :phpmethod:`MongoDB\\Collection::findOne() ` + The :phpmethod:`MongoDB\\Collection::findOne() ` method also performs a read operation to return a single document. Internally, the - :phpmethod:`MongoDB\\Collection::findOne() ` + :phpmethod:`MongoDB\\Collection::findOne() ` method is the - :phpmethod:`MongoDB\\Collection::find() ` + :phpmethod:`MongoDB\\Collection::find() ` method with a limit of 1. - id: perl diff --git a/source/tutorial/remove-documents.txt b/source/tutorial/remove-documents.txt index 70291081144..a21c674207b 100644 --- a/source/tutorial/remove-documents.txt +++ b/source/tutorial/remove-documents.txt @@ -116,8 +116,8 @@ You can delete documents in MongoDB using the following methods: This page uses the following `MongoDB PHP Library `_ methods: - - :phpmethod:`MongoDB\\Collection::deleteMany() ` - - :phpmethod:`MongoDB\\Collection::deleteOne() ` + - :phpmethod:`MongoDB\\Collection::deleteMany() ` + - :phpmethod:`MongoDB\\Collection::deleteOne() ` .. include:: /includes/driver-examples/examples-intro.rst @@ -249,7 +249,7 @@ Delete All Documents To delete all documents from a collection, pass an empty :ref:`filter` document ``[]`` to the - :phpmethod:`MongoDB\\Collection::deleteMany() ` + :phpmethod:`MongoDB\\Collection::deleteMany() ` method. .. include:: /includes/fact-delete-all-inventory.rst @@ -419,7 +419,7 @@ Delete All Documents that Match a Condition To delete all documents that match a deletion criteria, pass a :ref:`filter ` parameter to the - :phpmethod:`deleteMany() ` + :phpmethod:`deleteMany() ` method. .. include:: /includes/fact-remove-condition-inv-example.rst @@ -601,7 +601,7 @@ Delete Only One Document that Matches a Condition To delete at most a single document that matches a specified filter (even though multiple documents may match the specified filter) use the - :phpmethod:`MongoDB\\Collection::deleteOne() ` + :phpmethod:`MongoDB\\Collection::deleteOne() ` method. .. include:: /includes/fact-remove-one-condition-inv-example.rst @@ -823,9 +823,9 @@ requested from MongoDB for write operations. For details, see content: | .. seealso:: - - :phpmethod:`MongoDB\\Collection::deleteMany() ` + - :phpmethod:`MongoDB\\Collection::deleteMany() ` - - :phpmethod:`MongoDB\\Collection::deleteOne() ` + - :phpmethod:`MongoDB\\Collection::deleteOne() ` - :ref:`additional-deletes` diff --git a/source/tutorial/update-documents.txt b/source/tutorial/update-documents.txt index b711ad2e3aa..0224ed3fe8e 100644 --- a/source/tutorial/update-documents.txt +++ b/source/tutorial/update-documents.txt @@ -151,11 +151,11 @@ upper-right to set the language of the following examples. This page uses the following `MongoDB PHP Library `_ methods: - - :phpmethod:`MongoDB\\Collection::updateOne() ` + - :phpmethod:`MongoDB\\Collection::updateOne() ` - - :phpmethod:`MongoDB\\Collection::updateMany() ` + - :phpmethod:`MongoDB\\Collection::updateMany() ` - - :phpmethod:`MongoDB\\Collection::replaceOne() ` + - :phpmethod:`MongoDB\\Collection::replaceOne() ` |populate-inventory| @@ -579,7 +579,7 @@ Update a Single Document :tabid: php The following example uses the :phpmethod:`updateOne() - ` method on the + ` method on the ``inventory`` collection to update the *first* document where ``item`` equals ``"paper"``: @@ -695,7 +695,7 @@ Update Multiple Documents :tabid: php The following example uses the :phpmethod:`updateMany() - ` method on the + ` method on the ``inventory`` collection to update all documents where ``qty`` is less than ``50``: @@ -817,7 +817,7 @@ Replace a Document To replace the entire content of a document except for the ``_id`` field, pass an entirely new document as the second argument to :phpmethod:`replaceOne() - `. + `. .. include:: /includes/fact-update-replace-example.rst @@ -1059,11 +1059,11 @@ Upsert Option :tabid: php If :phpmethod:`updateOne() - `, + `, :phpmethod:`updateMany() - `, or + `, or :phpmethod:`replaceOne() - ` includes ``upsert => + ` includes ``upsert => true`` **and** no documents match the specified filter, then the operation creates a new document and inserts it. If there are matching documents, then the operation modifies or replaces the @@ -1256,11 +1256,11 @@ requested from MongoDB for write operations. For details, see .. seealso:: - - :phpmethod:`MongoDB\\Collection::updateOne() ` + - :phpmethod:`MongoDB\\Collection::updateOne() ` - - :phpmethod:`MongoDB\\Collection::updateMany() ` + - :phpmethod:`MongoDB\\Collection::updateMany() ` - - :phpmethod:`MongoDB\\Collection::replaceOne() ` + - :phpmethod:`MongoDB\\Collection::replaceOne() ` - :ref:`additional-updates` From 66b8a809c7355a35d646e0bb721c255abf57786a Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Wed, 24 Jan 2024 13:42:35 -0500 Subject: [PATCH 039/308] (DOCSP-35370): Remove specific versions from Recommended Platforms (#5956) * (DOCSP-35370): Remove specific versions from Recommended Platforms * minimalism * remove extra footnote * remove 5.0 footnote * minimalism * review feedback --- source/administration/production-notes.txt | 34 ++++++++-------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/source/administration/production-notes.txt b/source/administration/production-notes.txt index f7dca4711d5..d5e4e196df4 100644 --- a/source/administration/production-notes.txt +++ b/source/administration/production-notes.txt @@ -46,7 +46,6 @@ x86_64 ~~~~~~ MongoDB requires the following minimum ``x86_64`` microarchitectures: -[#microarch-intel]_ - For Intel ``x86_64``, MongoDB requires one of: @@ -114,31 +113,22 @@ Recommended Platforms While MongoDB supports a variety of platforms, the following operating systems are recommended for production use on ``x86_64`` architecture: -- Amazon Linux 2 -- Debian 10 -- :abbr:`RHEL (Red Hat Enterprise Linux)` / CentOS 7 and 8 [#rocky-almalinux]_ -- SLES 12 and 15 -- Ubuntu LTS 20.04 and 22.04 -- Windows Server 2016 and 2019 +- Amazon Linux +- Debian +- :abbr:`RHEL (Red Hat Enterprise Linux)` [#rocky-almalinux]_ +- SLES +- Ubuntu LTS +- Windows Server -.. [#oracle-linux] - - MongoDB only supports Oracle Linux running the Red Hat Compatible - Kernel (RHCK). MongoDB does **not** support the Unbreakable - Enterprise Kernel (UEK). - -.. [#microarch-intel] - - MongoDB 5.0 requires use of the AVX instruction set, available on - `select Intel and AMD processors - `__. +For best results, run the latest version of your platform. If you run an +older version, make sure that your version is supported by its provider. .. [#rocky-almalinux] - MongoDB on-premises products released for RHEL version 8.0+ are - compatible with and supported on Rocky Linux version 8.0+ and - AlmaLinux version 8.0+, contingent upon those distributions meeting their - obligation to deliver full RHEL compatibility. + MongoDB on-premises products released for RHEL version 8.0+ are + compatible with Rocky Linux version 8.0+ and AlmaLinux version 8.0+, + contingent upon those distributions meeting their obligation to + deliver full RHEL compatibility. .. seealso:: From 9696f30f512458bbc9ab305263a95a7349b65619 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Wed, 24 Jan 2024 11:12:11 -0800 Subject: [PATCH 040/308] DOCSP-35091-majority-write-concern-updates (#5864) * DOCSP-35091-majority-write-concern-updates * DOCSP-35091-majority-write-concern-updates * DOCSP-35091-majority-write-concern-updates * DOCSP-35091-majority-write-concern-updates --------- Co-authored-by: jason-price-mongodb --- source/core/transactions.txt | 72 +++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/source/core/transactions.txt b/source/core/transactions.txt index ff42fa745a2..99383b89b32 100644 --- a/source/core/transactions.txt +++ b/source/core/transactions.txt @@ -80,7 +80,8 @@ upper-right to set the language of the following example. /* For a replica set, include the replica set name and a seedlist of the members in the URI string; e.g. String uri = "mongodb://mongodb0.example.com:27017,mongodb1.example.com:27017/admin?replicaSet=myRepl"; - For a sharded cluster, connect to the mongos instances; e.g. + For a sharded cluster, connect to the mongos instances. + For example: String uri = "mongodb://mongos0.example.com:27017,mongos1.example.com:27017:27017/admin"; */ @@ -277,7 +278,6 @@ upper-right to set the language of the following example. .. literalinclude:: /driver-examples/DocumentationTransactionsExampleSpec.scala :language: scala - .. seealso:: For an example in :binary:`~bin.mongosh`, see @@ -290,12 +290,12 @@ Transactions and Atomicity .. include:: /includes/transactions/distributed-transaction-repl-shard-support.rst -Distributed transactions are atomic. They provide an "all-or-nothing" -proposition: +Distributed transactions are atomic: + +- Transactions either apply all data changes or roll back the changes. -- When a transaction commits, all data changes made in the transaction - are saved and visible outside the transaction. That is, a transaction - will not commit some of its changes while rolling back others. +- If a transaction commits, all data changes made in the transaction + are saved and are visible outside of the transaction. .. include:: /includes/extracts/transactions-committed-visibility.rst @@ -334,11 +334,11 @@ For a list of operations not supported in transactions, see .. _transactions-create-collections-indexes: -Create Collections and Indexes In a Transaction +Create Collections and Indexes in a Transaction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can perform the following operations inside of a :ref:`distributed -transaction ` as long as the transaction is not a +You can perform the following operations in a :ref:`distributed +transaction ` if the transaction is not a cross-shard write transaction: - Create collections. @@ -352,11 +352,11 @@ When creating a collection inside a transaction: `, such as with: - an :ref:`insert operation ` - against a non-existing collection, or + for a non-existent collection, or - an :ref:`update/findAndModify operation ` with ``upsert: true`` - against a non-existing collection. + for a non-existent collection. - You can :ref:`explicitly create a collection ` using the :dbcommand:`create` @@ -366,7 +366,7 @@ When :ref:`creating an index inside a transaction ` [#create-existing-index]_, the index to create must be on either: -- a non-existing collection. The collection is created as part of the +- a non-existent collection. The collection is created as part of the operation. - a new empty collection created earlier in the same transaction. @@ -387,7 +387,10 @@ Restrictions - For explicit creation of a collection or an index inside a transaction, the transaction read concern level must be - :readconcern:`"local"`. Explicit creation is through: + :readconcern:`"local"`. + + To explicitly create collections and indexes, use the following + commands and methods: .. list-table:: :header-rows: 1 @@ -444,10 +447,9 @@ Restricted Operations Transactions and Sessions ------------------------- -- Transactions are associated with a session +- Transactions are associated with a session. -- At any given time, you can have at most one open transaction for a - session. +- You can have at most one open transaction at a time for a session. - When using the drivers, each operation in the transaction must be associated with the session. Refer to your driver specific @@ -487,7 +489,7 @@ Transactions and Read Concern ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Operations in a transaction use the transaction-level :doc:`read -concern `. That is, any read concern set at +concern `. This means a read concern set at the collection and database level is ignored inside the transaction. You can set the transaction-level :doc:`read concern @@ -498,8 +500,8 @@ You can set the transaction-level :doc:`read concern - If transaction-level and the session-level read concern are unset, the transaction-level read concern defaults to the client-level read - concern. By default, client-level read concern is - :readconcern:`"local"` for reads against the primary. See also: + concern. By default, the client-level read concern is + :readconcern:`"local"` for reads on the primary. See also: - :ref:`transactions-read-preference` - :doc:`/reference/mongodb-defaults` @@ -559,16 +561,16 @@ Transactions and Write Concern Transactions use the transaction-level :doc:`write concern ` to commit the write operations. Write -operations inside transactions must be issued without explicit write +operations inside transactions must be run without an explicit write concern specification and use the default write concern. At commit -time, the writes are then commited using the transaction-level write +time, the writes committed using the transaction-level write concern. .. tip:: - Do not explicitly set the write concern for the individual write + Don't explicitly set the write concern for the individual write operations inside a transaction. Setting write concerns for the - individual write operations inside a transaction results in an error. + individual write operations inside a transaction returns an error. You can set the transaction-level :doc:`write concern ` at the transaction start: @@ -621,9 +623,8 @@ values, including: ````````````````` - Write concern :writeconcern:`w: "majority" <"majority">` returns - acknowledgement after the commit has been applied to a majority - (M) of voting members, meaning the commit has been applied to the - primary and (M-1) voting secondaries. + acknowledgement after the commit has been applied to a majority of + voting members. - When you commit with :writeconcern:`w: "majority" <"majority">` write concern, transaction-level :readconcern:`"majority"` read @@ -652,12 +653,15 @@ values, including: General Information ------------------- +The following sections describe additional considerations for +transactions. + Production Considerations ~~~~~~~~~~~~~~~~~~~~~~~~~ -For various production considerations with using transactions, see +For transactions in production environments, see :ref:`production-considerations`. In addition, for sharded -clusters, see also :ref:`production-considerations-sharded`. +clusters, see :ref:`production-considerations-sharded`. Arbiters ~~~~~~~~ @@ -678,7 +682,7 @@ Shard Configuration Restriction Diagnostics ~~~~~~~~~~~ -MongoDB provides various transactions metrics: +To obtain transaction status and metrics, use the following methods: .. list-table:: :widths: 40 60 @@ -719,9 +723,9 @@ MongoDB provides various transactions metrics: * - :binary:`~bin.mongod` and :binary:`~bin.mongos` log messages - - Includes information on slow transactions, which are transactions + - Includes information on slow transactions (which are transactions that exceed the :setting:`operationProfiling.slowOpThresholdMs` - threshold) under the :data:`TXN` log component. + threshold) in the :data:`TXN` log component. .. _transactions-fcv: @@ -775,8 +779,8 @@ Starting in MongoDB 5.2 (and 5.0.4): :parameter:`metadataRefreshInTransactionMaxWaitBehindCritSecMS` parameter. -Additional Transactions Topics ------------------------------- +Learn More +---------- - :doc:`/core/transactions-in-applications` - :doc:`/core/transactions-production-consideration` From 3faae84dfa627dd59d5acbf5c81413e2da418df9 Mon Sep 17 00:00:00 2001 From: Ashley Brown <98361885+mdb-ashley@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:26:51 -0500 Subject: [PATCH 041/308] Adds release notes, changelog for 7.2.1; also adds missing changelog links to TOC (#5957) * Adds release notes, changelog for 7.2.1; also adds missing changelog TOC links * Adds link --- config/changelog_conf.yaml | 3 + source/includes/changelogs/releases/7.2.1.rst | 156 ++++++++++++++++++ source/release-notes/7.0.txt | 1 + source/release-notes/7.1.txt | 1 + source/release-notes/7.2-changelog.txt | 15 ++ source/release-notes/7.2.txt | 24 +++ 6 files changed, 200 insertions(+) create mode 100644 source/includes/changelogs/releases/7.2.1.rst create mode 100644 source/release-notes/7.2-changelog.txt diff --git a/config/changelog_conf.yaml b/config/changelog_conf.yaml index 53ca2182d3b..7ad730c3445 100644 --- a/config/changelog_conf.yaml +++ b/config/changelog_conf.yaml @@ -29,6 +29,9 @@ groups: - JavaScript "WiredTiger": - Block cache + - Truncate + - APIs + - Test Format - WiredTiger "MMAP": - MMAPv1 diff --git a/source/includes/changelogs/releases/7.2.1.rst b/source/includes/changelogs/releases/7.2.1.rst new file mode 100644 index 00000000000..ace21e5db72 --- /dev/null +++ b/source/includes/changelogs/releases/7.2.1.rst @@ -0,0 +1,156 @@ +.. _7.2.1-changelog: + +7.2.1 Changelog +--------------- + +Sharding +~~~~~~~~ + +- :issue:`SERVER-77667` Prevent mongos from starting new transactions at + shutdown +- :issue:`SERVER-81508` Potential double-execution of write statements + when ShardCannotRefreshDueToLocksHeld is thrown +- :issue:`SERVER-83775` Do not balance data between shards owning more + than the ideal data size +- :issue:`SERVER-84738` Fix Data Race in ReshardingCollectionCloner + +Query +~~~~~ + +- :issue:`SERVER-83470` Introduce internalQueryFrameworkControl setting + for 6.0-style engine selection logic +- :issue:`SERVER-84595` Delete invalid test + jstests/noPassthrough/out_majority_read_replset.js + +Aggregation +~~~~~~~~~~~ + +:issue:`SERVER-82929` $listSearchIndexes requires find privilege action +rather than listSearchIndexes privilege action as it intended + +Storage +~~~~~~~ + + +WiredTiger +`````````` + +- :issue:`WT-11845` Fix transaction visibility issue with truncate +- :issue:`WT-11911` Fix use-after-free with bounded cursor and + search_near + +Internals +~~~~~~~~~ + +- :issue:`SERVER-72703` Downgrade $out's db lock to MODE_IX +- :issue:`SERVER-79486` Increase the cardinality of the new shard key +- :issue:`SERVER-80363` server default writeConcern is not honored when + wtimeout is set +- :issue:`SERVER-81313` change streams fail to re-parse their own + representative query shape serialization for ResumeToken +- :issue:`SERVER-81496` Weird shapification behavior for + $convert/$toString +- :issue:`SERVER-81517` blacklist validate_db_metadata_command.js from + migrations suite +- :issue:`SERVER-81994` $densify range doesn't re-parse correctly +- :issue:`SERVER-82197` Incorrect query results in SBE if $group spills + in presence of collation +- :issue:`SERVER-82221` listCollections and listIndexes should include + commit-pending namespaces +- :issue:`SERVER-82313` Fix cancelling txn api from the caller +- :issue:`SERVER-82365` Optimize the construction of the balancer's + collection distribution status histogram (2nd attempt) +- :issue:`SERVER-82437` db.collection.getSearchIndexes() + returns duplicate index +- :issue:`SERVER-82676` gRPC unit tests reuse port, causing conflicts + with concurrently running tests +- :issue:`SERVER-82706` check_metadata_consistency.js should use + retriable writes when contacting config server +- :issue:`SERVER-82791` createView fails with StaleConfig if a sharded + collection already exists with the same namespace +- :issue:`SERVER-82815` Expose server’s index key creation via + aggregation +- :issue:`SERVER-82822` Remove Bad Invariant in RetryUntilMajorityCommit +- :issue:`SERVER-82967` Stepdown after calling + ActiveIndexBuilds::registerIndexBuild() during index build setup + doesn't unregister itself +- :issue:`SERVER-83003` $listSearchIndexes should throw on non-existent + DB +- :issue:`SERVER-83119` Secondary replica crashes on clustered + collection if notablescan is enabled +- :issue:`SERVER-83337` Re-enable wt_size_storer_cleanup_replica_set.js + on macOS +- :issue:`SERVER-83369` Index creation does not enforce type of + bucketSize field +- :issue:`SERVER-83492` Remove limit and skip values from SBE plan cache + key if possible +- :issue:`SERVER-83534` Allow IDL generator to accomodate query_shape + :custom +- :issue:`SERVER-83580` Re-introduce balancer policy unittests with + multiple chunks +- :issue:`SERVER-83685` Make internalQueryFrameworkControl + "trySbeRestricted" the default query knob +- :issue:`SERVER-83765` SessionWorkflow benchmark doesn't start up + ServiceExecutors +- :issue:`SERVER-83766` SessionWorkflow benchmark's mocked sessions + cannot access their transport layer +- :issue:`SERVER-83777` Cap $in length in plan cache key with + internalQueryMaxScansToExplode + 1 +- :issue:`SERVER-83825` increase log verbosity for write conflict + retries in index_build_operation_metrics.js: +- :issue:`SERVER-83830` On Enterprise build creating a collection in a + replica set with the storageEngine.inMemory option breaks secondaries +- :issue:`SERVER-83866` Update BACKPORTS_REQUIRED_BASE_URL from + mongodb/mongo to 10gen/mongo +- :issue:`SERVER-83874` Move primary operation doesn't drop + db.system.views on the donor +- :issue:`SERVER-83959` When preparing SBE plan, correctly pass + preparingFromCache argument +- :issue:`SERVER-84013` Incorrect results for index scan plan on query + with duplicate predicates in nested $or +- :issue:`SERVER-84063` Remove BlackDuck from Security Daily Cron +- :issue:`SERVER-84087` Make sure ExecutorPool gets terminated after + migrations have completed +- :issue:`SERVER-84130` Incorrect bucket-level filter optimization when + some events in the bucket are missing the field +- :issue:`SERVER-84186` Add benchmark that runs math operations in + Timeseries to sys perf +- :issue:`SERVER-84241` AsioTransportLayer::stopAcceptingSessions can + deadlock if called before listener thread started listening +- :issue:`SERVER-84278` Don't generate plan cache entries for EOF plans +- :issue:`SERVER-84338` Top level $or queries may lead to invalid SBE + plan cache entry which returns wrong results +- :issue:`SERVER-84353` The test for stepDown deadlock with read ticket + exhaustion is flaky +- :issue:`SERVER-84369` Ineligible query reuses plan cache entry for a + COUNT_SCAN (SBE only) +- :issue:`SERVER-84436` Handle skip + limit sum overflowing int64_t in + SBE +- :issue:`SERVER-84468` Fix deadlock when running + runTransactionOnShardingCatalog() +- :issue:`SERVER-84494` [v7.2] Remove $search tests in SBE since it is + disabled in 7.2 +- :issue:`SERVER-84502` Remove test_packages_release task from v7.3 + branch +- :issue:`SERVER-84546` switch asan statically linked test to dynamic + link +- :issue:`SERVER-84567` writeQueryStats should log an error rather than + uassert when the feature flag is disabled +- :issue:`SERVER-84731` Resharding aggregation query should not acquire + RSTL-IX when waiting lastStableRecoveryTimestamp +- :issue:`SERVER-85263` Report escaped client application name +- :issue:`WT-11062` Safe free the ref addr to allow concurrent access +- :issue:`WT-11669` Create new log record for backup ids +- :issue:`WT-11987` Table's version number dropped to + version=(major=1,minor=0) +- :issue:`WT-12036` Workaround for lock contention on Windows +- :issue:`WT-12043` Remove obsolete HAVE_DIAGNOSTIC ifdefs to avoid + memory leak +- :issue:`WT-12092` Update the WiredTiger version in dockerfile +- :issue:`WT-12099` race between mmap threads resizing and + reading/writing +- :issue:`WT-12100` Fix csuite-long-running timeouts under MSan +- :issue:`WT-12110` Disable timestamp_abort backup tests in the + compatibility mode +- :issue:`WT-12147` Temporarily disable clang-analyzer + diff --git a/source/release-notes/7.0.txt b/source/release-notes/7.0.txt index 18ad0c1dc13..f56309e6afc 100644 --- a/source/release-notes/7.0.txt +++ b/source/release-notes/7.0.txt @@ -697,3 +697,4 @@ Report an Issue /release-notes/7.0-compatibility /release-notes/7.0-downgrade /release-notes/7.0-upgrade + /release-notes/7.0-changelog diff --git a/source/release-notes/7.1.txt b/source/release-notes/7.1.txt index 80ff64b9495..e96ddaa3424 100644 --- a/source/release-notes/7.1.txt +++ b/source/release-notes/7.1.txt @@ -185,3 +185,4 @@ Query Stats Metrics :hidden: /release-notes/7.1-compatibility + /release-notes/7.1-changelog diff --git a/source/release-notes/7.2-changelog.txt b/source/release-notes/7.2-changelog.txt new file mode 100644 index 00000000000..95266d0b241 --- /dev/null +++ b/source/release-notes/7.2-changelog.txt @@ -0,0 +1,15 @@ +.. _7.2-changelog-full: + +============= +7.2 Changelog +============= + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +.. include:: /includes/changelogs/releases/7.2.1.rst \ No newline at end of file diff --git a/source/release-notes/7.2.txt b/source/release-notes/7.2.txt index 6af66dcc7ee..4da167c8739 100644 --- a/source/release-notes/7.2.txt +++ b/source/release-notes/7.2.txt @@ -14,6 +14,29 @@ Release Notes for MongoDB 7.2 .. include:: /includes/rapid-release-short.rst +Patch Releases +-------------- + +.. _7.2.1-release-notes: + +7.2.1 - Upcoming +~~~~~~~~~~~~~~~~ + +Issues fixed: + +- :issue:`SERVER-72703` Downgrade $out's db lock to MODE_IX +- :issue:`SERVER-80363` server default writeConcern is not honored when + wtimeout is set +- :issue:`SERVER-83492` Remove limit and skip values from SBE plan cache + key if possible +- :issue:`SERVER-84013` Incorrect results for index scan plan on query + with duplicate predicates in nested $or +- :issue:`SERVER-84338` Top level $or queries may lead to invalid SBE + plan cache entry which returns wrong results +- `All JIRA issues closed in 7.2.1 + `_ +- :ref:`7.2.1-changelog` + General Changes --------------- @@ -83,5 +106,6 @@ For examples, see :ref:`reshardCollection-redistribute-data`. :hidden: /release-notes/7.2-compatibility + /release-notes/7.2-changelog From 1e0d6e27074aa5d59ed1018414d28217ed81a8f7 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:31:54 -0500 Subject: [PATCH 042/308] DOCSP-32107 ESR Range Equality Condition (#5978) --- source/tutorial/equality-sort-range-rule.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/tutorial/equality-sort-range-rule.txt b/source/tutorial/equality-sort-range-rule.txt index 838f8503caa..6daaa753879 100644 --- a/source/tutorial/equality-sort-range-rule.txt +++ b/source/tutorial/equality-sort-range-rule.txt @@ -119,15 +119,17 @@ non-blocking index sort. For more information on blocking sorts, see Additional Considerations ------------------------- -Inequality operators such as :query:`$ne` or :query:`$nin` are range -operators, not equality operators. +- Inequality operators such as :query:`$ne` or :query:`$nin` are range + operators, not equality operators. -:query:`$regex` is a range operator. +- :query:`$regex` is a range operator. -:query:`$in` can be an equality operator or a range operator. -When :query:`$in` is used alone, it is an equality operator that -does a series of equality matches. :query:`$in` acts like a range -operator when it is used with ``.sort()``. +- :query:`$in` can be an equality operator or a range operator. + + - When ``$in`` is used alone, it is an equality operator that performs a + series of equality matches. + - When ``$in`` is used with ``.sort()``, ``$in`` can act like a range + operator. Example ------- From 538fb7fd2d8d88684e56672fa7a3aeb36525f5a9 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Thu, 25 Jan 2024 10:32:22 -0500 Subject: [PATCH 043/308] DOCS-15725 adding link to security checklist (#5977) * DOCS-15725 adding link to security checklist * DOCS-15725 adding tag * DOCS-15725 fixing link --- .../administration/production-checklist-operations.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/administration/production-checklist-operations.txt b/source/administration/production-checklist-operations.txt index 46b30300099..1c6563ac2f3 100644 --- a/source/administration/production-checklist-operations.txt +++ b/source/administration/production-checklist-operations.txt @@ -6,6 +6,10 @@ Operations Checklist .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -275,3 +279,9 @@ Load Balancing - Avoid placing load balancers between MongoDB cluster or replica set components. + +Security +~~~~~~~~ + +For a list of security measures to protect your MongoDB installation, +see the :ref:`MongoDB Security Checklist `. From 7007535c06fceaf4d8747a2af230055c72371ef1 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Thu, 25 Jan 2024 09:50:56 -0800 Subject: [PATCH 044/308] DOCSP-35701-timeseries-updates (#5954) * DOCSP-35701-timeseries-updates * DOCSP-35701-timeseries-updates * DOCSP-35701-timeseries-updates * DOCSP-35701-timeseries-updates --------- Co-authored-by: jason-price-mongodb --- source/core/timeseries-collections.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/core/timeseries-collections.txt b/source/core/timeseries-collections.txt index d13b54a23bb..8c6dd270dda 100644 --- a/source/core/timeseries-collections.txt +++ b/source/core/timeseries-collections.txt @@ -105,19 +105,20 @@ store data in time-order. This format provides the following benefits: Behavior ~~~~~~~~ -Time series collections behave like normal collections. You can insert -and query your data as you normally would. +Time series collections behave like typical collections. You insert +and query data as usual. MongoDB treats time series collections as writable non-materialized :ref:`views ` backed by an internal collection. When you insert data, the internal collection automatically organizes time series data into an optimized storage format. -Since MongoDB 6.3, when you create a new time series collection, MongodDB -generates a :ref:`compound index ` on the -:ref:`metaField and timeField ` fields. Queries on time -series collections take advantage of this index, as well as the optimized -storage format, to improve query performance. +Starting in MongoDB 6.3: if you create a new time series collection, +MongoDB also generates a :ref:`compound index ` +on the :ref:`metaField and timeField ` fields. To +improve query performance, queries on time series collections use the +new compound index. The compound index also uses the optimized storage +format. .. tip:: From c19c331d8c86eff0b018d5e49dc6fc4849107f75 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Thu, 25 Jan 2024 12:57:09 -0500 Subject: [PATCH 045/308] (DOCS-16562): Fix code for finding NaN indexes to work on Atlas (#5984) --- source/tutorial/expire-data.txt | 63 +++++++++++++++++---------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/source/tutorial/expire-data.txt b/source/tutorial/expire-data.txt index 124c5f374bb..8d45ddf233a 100644 --- a/source/tutorial/expire-data.txt +++ b/source/tutorial/expire-data.txt @@ -303,37 +303,39 @@ To avoid problems, either drop or correct any misconfigured TTL indexes. .. code-block:: javascript function getNaNIndexes() { - const nan_index = []; - - const dbs = db.adminCommand({ listDatabases: 1 }).databases; - - dbs.forEach((d) => { - const listCollCursor = db - .getSiblingDB(d.name) - .runCommand({ listCollections: 1 }).cursor; - - const collDetails = { - db: listCollCursor.ns.split(".$cmd")[0], - colls: listCollCursor.firstBatch.map((c) => c.name), - }; - - collDetails.colls.forEach((c) => - db - .getSiblingDB(collDetails.db) - .getCollection(c) - .getIndexes() - .forEach((entry) => { - if (Object.is(entry.expireAfterSeconds, NaN)) { - nan_index.push({ ns: `${collDetails.db}.${c}`, index: entry }); - } - }) - ); - }); - - return nan_index; + const nan_index = []; + + const dbs = db.adminCommand({ listDatabases: 1 }).databases; + + dbs.forEach((d) => { + if (d.name != 'local') { + const listCollCursor = db + .getSiblingDB(d.name) + .runCommand({ listCollections: 1 }).cursor; + + const collDetails = { + db: listCollCursor.ns.split(".$cmd")[0], + colls: listCollCursor.firstBatch.map((c) => c.name), + }; + + collDetails.colls.forEach((c) => + db + .getSiblingDB(collDetails.db) + .getCollection(c) + .getIndexes() + .forEach((entry) => { + if (Object.is(entry.expireAfterSeconds, NaN)) { + nan_index.push({ ns: `${collDetails.db}.${c}`, index: entry }); + } + }) + ); + } + }); + + return nan_index; }; - - getNaNIndexes(); + + getNaNIndexes(); .. step:: Correct misconfigured indexes. @@ -343,4 +345,3 @@ To avoid problems, either drop or correct any misconfigured TTL indexes. As an alternative, you can :dbcommand:`drop ` any misconfigured TTL indexes and recreate them later using the :dbcommand:`createIndexes` command. - From 2d7157155b8f27c6bca3ff1fd2447b1e31aeddf6 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Thu, 25 Jan 2024 15:59:08 -0500 Subject: [PATCH 046/308] (DOCSP-35335): Add maxConnecting setting for connection pools (#5917) * (DOCSP-35335): Add maxConnecting setting for connection pools * formatting fix * add definition * wording * add context to changing maxConnecting * wording * note relationship with maxPoolSize * edit * address tech review comments * review edit * add definition for connection storm * wording * typo * more edits * edit * wording --- .../connection-pool-overview.txt | 109 ++++++++++-------- .../max-connecting-use-case.rst | 6 + source/reference/connection-string.txt | 11 +- source/reference/glossary.txt | 8 ++ 4 files changed, 85 insertions(+), 49 deletions(-) create mode 100644 source/includes/connection-pool/max-connecting-use-case.rst diff --git a/source/administration/connection-pool-overview.txt b/source/administration/connection-pool-overview.txt index 4c213b7826a..19a4307657f 100644 --- a/source/administration/connection-pool-overview.txt +++ b/source/administration/connection-pool-overview.txt @@ -4,6 +4,10 @@ Connection Pool Overview ======================== +.. facet:: + :name: genre + :values: reference + .. default-domain:: mongodb .. contents:: On this page @@ -79,13 +83,13 @@ to be established. Connection Pool Configuration Settings -------------------------------------- -To configure the connection pool, set the options: +You can specify connection pool settings in these locations: -- through the :ref:`MongoDB URI `, +- The :ref:`MongoDB URI ` -- programmatically when building the ``MongoClient`` instance, or +- Your application's ``MongoClient`` instance -- in your application framework's configuration files. +- Your application framework's configuration files Settings ~~~~~~~~ @@ -97,6 +101,33 @@ Settings * - Setting - Description + * - :urioption:`connectTimeoutMS` + + - Most drivers default to never time out. Some versions of the + Java drivers (for example, version 3.7) default to ``10``. + + *Default:* ``0`` for most drivers. See your :driver:`driver ` + documentation. + + * - :urioption:`maxConnecting` + + - Maximum number of connections a pool may be establishing + concurrently. + + ``maxConnecting`` is supported for all drivers **except** the + :driver:`Rust Driver `. + + .. include:: /includes/connection-pool/max-connecting-use-case.rst + + *Default:* ``2`` + + * - :urioption:`maxIdleTimeMS` + + - The maximum number of milliseconds that a connection can + remain idle in the pool before being removed and closed. + + *Default:* See your :driver:`driver ` documentation. + * - :urioption:`maxPoolSize` - .. _maxpoolsize-cp-setting: @@ -118,51 +149,31 @@ Settings *Default*: ``0`` - * - :urioption:`connectTimeoutMS` - - - Most drivers default to never time out. Some versions of the - Java drivers (for example, version 3.7) default to ``10``. - - *Default:* ``0`` for most drivers. See your :driver:`driver ` - documentation. + * - :parameter:`ShardingTaskExecutorPoolMaxSize` - * - :urioption:`socketTimeoutMS` + - Maximum number of outbound connections each TaskExecutor + connection pool can open to any given :binary:`~bin.mongod` + instance. - - Number of milliseconds to wait before timeout on a TCP - connection. - - Do *not* use :urioption:`socketTimeoutMS` as a mechanism for - preventing long-running server operations. + *Default*: 2\ :sup:`64` - 1 - Setting low socket timeouts may result in operations that error - before the server responds. - - *Default*: ``0``, which means no timeout. See your - :driver:`driver ` documentation. + Parameter only applies to sharded deployments. - * - :urioption:`maxIdleTimeMS` - - - The maximum number of milliseconds that a connection can - remain idle in the pool before being removed and closed. + * - :parameter:`ShardingTaskExecutorPoolMaxSizeForConfigServers` - *Default:* See your :driver:`driver ` documentation. + - .. include:: /includes/ShardingTaskExecutorPoolMaxSizeForConfigServers-parameter.rst - * - :urioption:`waitQueueTimeoutMS` + *Default*: ``-1`` - - Maximum wait time in milliseconds that a can thread wait for - a connection to become available. A value of ``0`` means there - is no limit. + .. versionadded:: 6.0 - *Default*: ``0``. See your :driver:`driver ` documentation. - * - :parameter:`ShardingTaskExecutorPoolMinSize` - Minimum number of outbound connections each TaskExecutor connection pool can open to any given :binary:`~bin.mongod` instance. - *Default*: ``1``. See - :parameter:`ShardingTaskExecutorPoolMinSize`. + *Default*: ``1`` Parameter only applies to sharded deployments. @@ -174,24 +185,26 @@ Settings .. versionadded:: 6.0 - * - :parameter:`ShardingTaskExecutorPoolMaxSize` - - - Maximum number of outbound connections each TaskExecutor - connection pool can open to any given :binary:`~bin.mongod` - instance. - - *Default*: 2\ :sup:`64` - 1. See - :parameter:`ShardingTaskExecutorPoolMaxSize`. + * - :urioption:`socketTimeoutMS` - Parameter only applies to sharded deployments. + - Number of milliseconds to wait before timeout on a TCP + connection. + + Do *not* use :urioption:`socketTimeoutMS` as a mechanism for + preventing long-running server operations. - * - :parameter:`ShardingTaskExecutorPoolMaxSizeForConfigServers` + Setting low socket timeouts may result in operations that error + before the server responds. + + *Default*: ``0``, which means no timeout. - - .. include:: /includes/ShardingTaskExecutorPoolMaxSizeForConfigServers-parameter.rst + * - :urioption:`waitQueueTimeoutMS` - *Default*: ``-1`` + - Maximum wait time in milliseconds that a can thread wait for + a connection to become available. A value of ``0`` means there + is no limit. - .. versionadded:: 6.0 + *Default*: ``0`` .. toctree:: :titlesonly: diff --git a/source/includes/connection-pool/max-connecting-use-case.rst b/source/includes/connection-pool/max-connecting-use-case.rst new file mode 100644 index 00000000000..cd87cd070c2 --- /dev/null +++ b/source/includes/connection-pool/max-connecting-use-case.rst @@ -0,0 +1,6 @@ +Raising the value of ``maxConnecting`` allows the client to establish +connection to the server faster, but increases the chance of +:term:`connection storms `. If the value of +``maxConnecting`` is too low, your connection pool may experience heavy +throttling and increased tail latency for clients checking out +connections. diff --git a/source/reference/connection-string.txt b/source/reference/connection-string.txt index f3b4bfe075c..41551973d49 100644 --- a/source/reference/connection-string.txt +++ b/source/reference/connection-string.txt @@ -697,6 +697,16 @@ connecting to the MongoDB deployment. drivers. For information on your driver, see the :driver:`Drivers ` documentation. + * - .. urioption:: maxConnecting + + - Maximum number of connections a pool may be establishing + concurrently. The default value is ``2``. + + ``maxConnecting`` is supported for all drivers **except** the + :driver:`Rust Driver `. + + .. include:: /includes/connection-pool/max-connecting-use-case.rst + * - .. urioption:: maxIdleTimeMS - The maximum number of milliseconds that a connection can remain @@ -1481,4 +1491,3 @@ The following connects to a sharded cluster with three :binary:`~bin.mongos` ins ``D1fficultP%40ssw0rd``: .. include:: /includes/connection-examples-by-language-sharded.rst - diff --git a/source/reference/glossary.txt b/source/reference/glossary.txt index e8d444a02f7..a0bb89c95d3 100644 --- a/source/reference/glossary.txt +++ b/source/reference/glossary.txt @@ -252,6 +252,14 @@ Glossary retrying one of the operations in any :term:`write conflict`. + connection storm + A scenario where a driver attempts to open more connections to a + deployment than that deployment can handle. When requests for new + connections fail, the driver requests to establish even more + connections in response to the deployment slowing down or failing + to open new connections. These continuous requests can overload + the deployment and lead to outages. + config database An internal database with metadata for a :term:`sharded cluster`. Typically, you don't modify the ``config`` database. For more From dfb5f67e1b6e7ef046f171f19eea266f28c48ad9 Mon Sep 17 00:00:00 2001 From: Ashley Brown <98361885+mdb-ashley@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:30:51 -0500 Subject: [PATCH 047/308] Fix date typos (#6002) --- source/release-notes/4.4.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/release-notes/4.4.txt b/source/release-notes/4.4.txt index d9e4f2f21c5..20687ca5065 100644 --- a/source/release-notes/4.4.txt +++ b/source/release-notes/4.4.txt @@ -46,7 +46,7 @@ Patch Releases .. _4.4.28-release-notes: -4.4.28 - Jan 18, 2023 +4.4.28 - Jan 18, 2024 ~~~~~~~~~~~~~~~~~~~~~ - :issue:`SERVER-77506` Sharded multi-document transactions can mismatch @@ -65,7 +65,7 @@ Patch Releases .. _4.4.27-release-notes: -4.4.27 - Jan 3, 2023 +4.4.27 - Jan 3, 2024 ~~~~~~~~~~~~~~~~~~~~ - :issue:`SERVER-63865` Handle missing index idents during standalone startup From ff3f6fa68c669c41c813b171210eadee1ccb4bd5 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:37:19 -0500 Subject: [PATCH 048/308] DOCSP-35889 Missing Redirect for First Array Element Operator (#6001) * DOCSP-35889 Missing Redirect for First Array Element Operator * bump version boundary to 6.1+ --- config/redirects | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/redirects b/config/redirects index 33abdf99a8d..62716802442 100644 --- a/config/redirects +++ b/config/redirects @@ -2570,3 +2570,6 @@ raw: https://mongodb.github.io/mongo-java-driver/ -> ${base}/drivers/java/sync/c [*-v6.3]: ${prefix}/${version}/data-modeling/schema-design-process/map-relationships -> ${base}/${version}/core/data-modeling-introduction [v7.0-*]: ${prefix}/${version}/core/data-modeling-introduction -> ${base}/${version}/data-modeling [v7.0-*]: ${prefix}/${version}/core/data-model-design -> ${base}/${version}/data-modeling/embedding-vs-references + +# DOCSP-35889 +(v6.1-*]: ${prefix}/${version}/reference/operator/aggregation/first-array-element -> ${base}/${version}/reference/operator/aggregation/first/ \ No newline at end of file From b406089397f6194d888a688f57a42215a64356bc Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Fri, 26 Jan 2024 09:15:52 -0500 Subject: [PATCH 049/308] DOCSP-34511 clarify c field limitation (#6000) * DOCSP-34511 clarify c field limitation * DOCSP-34511 clarify c field limitation --- source/reference/command/update.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/reference/command/update.txt b/source/reference/command/update.txt index 3b6ce629a72..5984acaab5a 100644 --- a/source/reference/command/update.txt +++ b/source/reference/command/update.txt @@ -185,7 +185,8 @@ Each document contains the following fields: - document - .. _update-command-c: - Optional. + Optional. You can specify ``c`` only if :ref:`u + ` is a pipeline. .. include:: /includes/let-variables-syntax.rst From 043b908fa9898ec736a74d86e8fe68f434abdbd0 Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:31:39 -0500 Subject: [PATCH 050/308] DOCSP-32736 duplicate minimum oplog section (#5983) * DOCSP-32736-duplicate-minimum-oplog-section * DOCSP-32736: Removing duplicate information from introduction. * DOCSP-32736: Adding taxonomy tags. * DOCSP-32736: Fixing typo in referenced document, editorial suggestions. * Added period to list item for consistency. --- source/core/replica-set-oplog.txt | 12 ++++-------- source/includes/extracts-4.4-changes.yaml | 6 +++--- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/source/core/replica-set-oplog.txt b/source/core/replica-set-oplog.txt index ebd8e8976ff..6839b54d945 100644 --- a/source/core/replica-set-oplog.txt +++ b/source/core/replica-set-oplog.txt @@ -6,6 +6,10 @@ Replica Set Oplog .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -20,14 +24,6 @@ Unlike other capped collections, the oplog can grow past its configured size limit to avoid deleting the :data:`majority commit point `. -.. versionadded:: 4.4 - - MongoDB 4.4 supports specifying a minimum oplog retention - period in hours, where MongoDB only removes an oplog entry if: - - - The oplog has reached the maximum configured size, *and* - - The oplog entry is older than the configured number of hours. - MongoDB applies database operations on the :term:`primary` and then records the operations on the primary's oplog. The :term:`secondary` members then copy and apply diff --git a/source/includes/extracts-4.4-changes.yaml b/source/includes/extracts-4.4-changes.yaml index b8375ce62f5..7a942e17f3f 100644 --- a/source/includes/extracts-4.4-changes.yaml +++ b/source/includes/extracts-4.4-changes.yaml @@ -258,11 +258,11 @@ ref: 4.4-changes-minimum-oplog-retention-period content: | Starting in MongoDB 4.4, you can specify the minimum number of hours - to preserve an oplog entry. The :binary:`~bin.mongod` only removes - an oplog entry *if*: + to preserve an oplog entry where :binary:`~bin.mongod` only removes + an oplog entry *if* both of the following criteria are met: - The oplog has reached the :ref:`maximum configured size - `, *and* + `. - The oplog entry is older than the configured number of hours based on the host system clock. From 0eb119789e5419f0bc5074d4e58e63f6421e616a Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Fri, 26 Jan 2024 11:05:39 -0800 Subject: [PATCH 051/308] DOCS-16593-chunks-update (#5904) * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update * DOCS-16593-chunks-update --------- Co-authored-by: jason-price-mongodb --- source/reference/config-database.txt | 54 ++++++++++++++++------------ 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index 51aa8be30bc..f484d1a2a2c 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -164,7 +164,7 @@ to support sharding: .. data:: config.changelog.what - Reflects the type of change recorded. Possible values include: + The type of change recorded. Possible values include: - ``dropCollection`` - ``dropCollection.start`` @@ -181,7 +181,7 @@ to support sharding: .. data:: config.changelog.details - A :term:`document` that contains additional details regarding + A :term:`document` that contains additional details for the change. The structure of the :data:`~config.changelog.details` document depends on the type of change. @@ -189,30 +189,40 @@ to support sharding: .. include:: /includes/admonition-config-db-is-internal.rst - The :data:`~config.chunks` collection stores a document for each chunk in - the cluster. Consider the following example of a document for a - chunk named ``mydb.foo-a_\"cat\"``: + The :data:`config.chunks` collection stores a document for each + chunk in the cluster. The following example shows a document: .. code-block:: javascript { - "_id" : "mydb.foo-a_\"cat\"", - "lastmod" : Timestamp(2, 1), - "uuid": "c025d039-e626-435e-b2d2-c1d436038041", - "min" : { - "animal" : "cat" - }, - "max" : { - "animal" : "dog" - }, - "shard" : "shard0004", - "history" : [ { "validAfter" : Timestamp(1569368571, 27), "shard" : "shard0004" } ] + _id: ObjectId('65a954c0de11596e08e7c1dc'), + uuid: UUID('a4479215-a38d-478f-a82b-e5e95d455e55'), + min: { a: Long('121204345') }, + max: { a: Long('993849349') }, + shard: 'shard01', + lastmod: Timestamp({ t: 1, i: 0 }), + history: [ + { + validAfter: Timestamp({ t: 1705596095, i: 14 }), + shard: 'shard01' + } + ] } - These documents store the range of values for the shard key that - describe the chunk in the ``min`` and ``max`` fields. Additionally - the ``shard`` field identifies the shard in the cluster that "owns" - the chunk. + In the document: + + - ``_id`` is the chunk identifier. + - ``min`` and ``max`` are the range of values for the chunk's shard + key. + - ``shard`` is the name of the shard that stores the chunk in the + cluster. + + .. tip:: + + To find the chunks in a collection, retrieve the collection's + ``uuid`` identifier from the :data:`config.collections` + collection. Then, use ``uuid`` to retrieve the matching document + with the same ``uuid`` from the ``config.chunks`` collection. .. data:: config.collections @@ -412,7 +422,7 @@ to support sharding: .. include:: /includes/admonition-config-db-is-internal.rst The :data:`~config.version` collection holds the current metadata version number. This - collection contains only one document. For example: + collection contains only one document. For example: .. code-block:: javascript @@ -430,7 +440,7 @@ to support sharding: Collections to Support Sessions ------------------------------- -Starting in MongoDB 3.6, the ``config`` database contains the +The ``config`` database contains the *internal* collections to support :ref:`causally consistent sessions ` for standalones, replica sets, and sharded clusters and retryable writes and :ref:`transactions ` for From a01aea6cdd298a521ba2e0a127755833693a749a Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Fri, 26 Jan 2024 13:19:39 -0800 Subject: [PATCH 052/308] DOCS-16603-database-profiler-link-error (#6010) Co-authored-by: jason-price-mongodb --- source/tutorial/manage-the-database-profiler.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tutorial/manage-the-database-profiler.txt b/source/tutorial/manage-the-database-profiler.txt index 1aa9d42fc04..19e802b5aa2 100644 --- a/source/tutorial/manage-the-database-profiler.txt +++ b/source/tutorial/manage-the-database-profiler.txt @@ -59,7 +59,7 @@ You can enable database profiling for :binary:`~bin.mongod` instances. This section shows how you use the :binary:`~bin.mongosh` helper method :method:`db.setProfilingLevel()` to enable profiling. To use a driver -method instead, see the :driver:`driver documentation`. +method instead, see the :api:`driver documentation <>`. To enable profiling for a :binary:`~bin.mongod` instance, set the :ref:`profiling level ` to a value From 1b07592ad4720578247431f7734ce2845e1b7e72 Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:49:00 -0500 Subject: [PATCH 053/308] DOCSP-35753 serverStatus metric stepDown moved to stateTransaction (#5927) * DOCSP-35753-serverStatus-metric-stepDown-moved-to-stateTransaction * DOCSP-35753: Adding stateTransition object for replication stepDown info. Deprecating stepDown metric and linking to new object. * Empty-Commit * DOCSP-35753: Removing references to unsupported previous behavior. Added missing heading for lasteStateTransaction. Modified language per style guide. * DOCSP-35753: Fixing monospace issue. * DOCSP-35753: Typo fix * DOCSP-35753: Small editorial changes per feedback. --- source/reference/command/serverStatus.txt | 53 +++++++++++++++++------ 1 file changed, 40 insertions(+), 13 deletions(-) diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index f7681592a39..7c4a20dc61a 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -1755,7 +1755,8 @@ metrics reconfig : { numAutoReconfigsForRemovalOfNewlyAddedFields : Long("") }, - stepDown : { + stateTransition : { + lastStateTransition : , userOperationsKilled : Long(""), userOperationsRunning : Long("") }, @@ -2567,26 +2568,52 @@ metrics .. versionadded:: 5.0 -.. serverstatus:: metrics.repl.stepDown +.. serverstatus:: metrics.repl.stateTransition - Information on user operations that were running when the - :binary:`~bin.mongod` stepped down. + Information on user operations when the member undergoes one of the + following transitions that can stop user operations: - .. versionadded:: 4.2 + - The member steps up to become a primary. -.. serverstatus:: metrics.repl.stepDown.userOperationsKilled + - The member steps down to become a secondary. - The number of user operations killed when the :binary:`~bin.mongod` - stepped down. + - The member is actively performing a rollback. - .. versionadded:: 4.2 +.. serverstatus:: metrics.repl.stateTransition.lastStateTransition -.. serverstatus:: metrics.repl.stepDown.userOperationsRunning + The transition being reported: - The number of user operations that remained running when the - :binary:`~bin.mongod` stepped down. + .. list-table:: + :widths: 20 80 + :header-rows: 1 - .. versionadded:: 4.2 + * - State Change + - Description + + * - ``"stepUp"`` + + - The member steps up to become a primary. + + * - ``"stepDown"`` + - The member steps down to become a secondary. + + * - ``"rollback"`` + + - The member is actively performing a rollback. + + * - ``""`` + + - The member has not undergone any state changes. + +.. serverstatus:: metrics.repl.stateTransition.userOperationsKilled + + The number of user operations stopped during the + :binary:`~bin.mongod` instance's state change. + +.. serverstatus:: metrics.repl.stateTransition.userOperationsRunning + + The number of user operations that remained running during the + ``mongod`` instance's state change. .. serverstatus:: metrics.repl.syncSource From 6a295b37ec4db65bdf08e011c7ae5a6f370bd8ae Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:49:24 -0500 Subject: [PATCH 054/308] DOCSP-35286 tlsUseSystemCA Parameter (#5938) * DOCSP-35286 tlsUseSystemCA Parameter * typo * JA feedback --- source/includes/extracts-ssl-facts.yaml | 6 ++--- source/includes/extracts-tls-facts.yaml | 6 ++--- .../fact-ssl-tlsCAFile-tlsUseSystemCA.rst | 8 ++++++ source/reference/parameters.txt | 26 +++++++++++++++++++ source/reference/program/mongod.txt | 6 +++-- source/tutorial/configure-ssl.txt | 4 +++ source/tutorial/upgrade-cluster-to-ssl.txt | 2 +- 7 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 source/includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst diff --git a/source/includes/extracts-ssl-facts.yaml b/source/includes/extracts-ssl-facts.yaml index fe7d3a04a90..38833f8bd73 100644 --- a/source/includes/extracts-ssl-facts.yaml +++ b/source/includes/extracts-ssl-facts.yaml @@ -16,9 +16,9 @@ content: | If ``--tlsCAFile``/``net.tls.CAFile`` (or their aliases ``--sslCAFile``/``net.ssl.CAFile``) is not specified - and you are not using x.509 authentication, the system-wide CA - certificate store will be used when connecting to an TLS/SSL-enabled - server. + and you are not using x.509 authentication, you must set the + :parameter:`tlsUseSystemCA` parameter to ``true``. This makes MongoDB use + the system-wide CA certificate store when connecting to a TLS-enabled server. .. include:: /includes/extracts/ssl-facts-x509-ca-file.rst diff --git a/source/includes/extracts-tls-facts.yaml b/source/includes/extracts-tls-facts.yaml index 2bcec88b450..397ce0379e6 100644 --- a/source/includes/extracts-tls-facts.yaml +++ b/source/includes/extracts-tls-facts.yaml @@ -13,9 +13,9 @@ ref: tls-facts-ca-file content: | If ``--tlsCAFile`` or ``tls.CAFile`` is not - specified and you are not using x.509 authentication, the - system-wide CA certificate store will be used when connecting to an - TLS-enabled server. + specified and you are not using x.509 authentication, you must set the + :parameter:`tlsUseSystemCA` parameter to ``true``. This makes MongoDB use + the system-wide CA certificate store when connecting to a TLS-enabled server. .. include:: /includes/extracts/tls-facts-x509-ca-file.rst diff --git a/source/includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst b/source/includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst new file mode 100644 index 00000000000..3f6df2e4406 --- /dev/null +++ b/source/includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst @@ -0,0 +1,8 @@ +When starting a :binary:`~bin.mongod` instance with +:ref:`TLS/SSL enabled `, you must +specify a value for the :option:`--tlsCAFile ` flag, the +:setting:`tls.CAFile` configuration option, or the :parameter:`tlsUseSystemCA` +parameter. + +``--tlsCAFile``, ``tls.CAFile``, and ``tlsUseSystemCA`` are all mutually +exclusive. diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 5dcd3e06f00..4a705df575d 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -930,6 +930,32 @@ Authentication Parameters - :parameter:`ocspValidationRefreshPeriodSecs` - :parameter:`tlsOCSPStaplingTimeoutSecs` +.. parameter:: tlsUseSystemCA + + |mongod-only| + + *Type*: boolean + + *Default*: false + + Specifies whether MongoDB loads TLS certificates that are already + available to the operating system's certificate authority. + + .. important:: + + .. include:: /includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst + + You can set ``tlsUseSystemCA`` only during startup in the + :setting:`configuration file ` or with the ``--setParameter`` + option on the command line. For example, to set ``tlsUseSystemCA`` to + ``true``: + + .. code-block:: bash + + mongod --setParameter tlsUseSystemCA=true + + .. include:: /includes/extracts/ssl-facts-see-more.rst + .. parameter:: tlsWithholdClientCertificate .. versionadded:: 4.2 diff --git a/source/reference/program/mongod.txt b/source/reference/program/mongod.txt index a26c55bbc07..0f48b23e0dc 100644 --- a/source/reference/program/mongod.txt +++ b/source/reference/program/mongod.txt @@ -1920,8 +1920,6 @@ TLS Options .. include:: /includes/extracts/tls-facts-ca-file.rst .. include:: /includes/extracts/tls-facts-see-more.rst - - .. option:: --tlsClusterFile @@ -2078,6 +2076,10 @@ TLS Options Specifies the :file:`.pem` file that contains the root certificate chain from the Certificate Authority. Specify the file name of the :file:`.pem` file using relative or absolute paths. + + .. important:: + + .. include:: /includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst Windows/macOS Only If using :option:`--tlsCertificateSelector` and/or diff --git a/source/tutorial/configure-ssl.txt b/source/tutorial/configure-ssl.txt index ea29f25c56d..eed56b9102c 100644 --- a/source/tutorial/configure-ssl.txt +++ b/source/tutorial/configure-ssl.txt @@ -345,6 +345,10 @@ your :binary:`mongod` / :binary:`mongos` instance's certificate chain includes the certificate of the root Certificate Authority. +.. important:: + + .. include:: /includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst + For example, consider the following :ref:`configuration file ` for a :binary:`~bin.mongod` instance: diff --git a/source/tutorial/upgrade-cluster-to-ssl.txt b/source/tutorial/upgrade-cluster-to-ssl.txt index 5fdca5855f2..0b374bfa9ac 100644 --- a/source/tutorial/upgrade-cluster-to-ssl.txt +++ b/source/tutorial/upgrade-cluster-to-ssl.txt @@ -61,7 +61,7 @@ process. .. code-block:: bash - mongod --replSet --tlsMode allowTLS --tlsCertificateKeyFile --sslCAFile + mongod --replSet --tlsMode allowTLS --tlsCertificateKeyFile --tlsCAFile - id: config name: Configuration File Options From 862022c05ca327d23a1ac9aff97dffd5b62ff9d2 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Mon, 29 Jan 2024 09:56:21 -0800 Subject: [PATCH 055/308] DOCS-16601-appendOplogNote-updates (#5979) * DOCS-16601-appendOplogNote-updates * DOCS-16601-appendOplogNote-updates * DOCS-16601-appendOplogNote-updates * DOCS-16601-appendOplogNote-updates * DOCS-16601-appendOplogNote-updates * DOCS-16601-appendOplogNote-updates --------- Co-authored-by: jason-price-mongodb --- source/reference/command/appendOplogNote.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/source/reference/command/appendOplogNote.txt b/source/reference/command/appendOplogNote.txt index c1a6cd1e783..4b1f2c13263 100644 --- a/source/reference/command/appendOplogNote.txt +++ b/source/reference/command/appendOplogNote.txt @@ -17,17 +17,20 @@ Definition Writes a non-operational entry to the :term:`oplog`. - Syntax ------ -You can only issue the ``appendOplogNote`` command against the ``admin`` database. +You can only run the ``appendOplogNote`` command on the ``admin`` +database. + +The command has this syntax: .. code-block:: javascript + :copyable: false db.adminCommand( { - appendOplogNote: 1 + appendOplogNote: 1, data: } ) @@ -42,9 +45,11 @@ Command Fields * - Field - Type - Description + * - ``appendOplogNote`` - any - Set to any value. + * - ``data`` - document - The document to append to the :term:`oplog`. @@ -59,9 +64,9 @@ To append a non-operational entry to the :term:`oplog`, use the db.adminCommand( { - appendOplogNote: 1 + appendOplogNote: 1, data: { - msg: "Appending test msg to oplog" + msg: "Appending test message to oplog" } } ) @@ -75,11 +80,10 @@ Example ``oplog`` entry: op: "n", ns: "", o: { - msg: "Appending test msg to oplog" + msg: "Appending test message to oplog" }, ts: Timestamp({ t: 1689177321, i: 1 }), t: Long("1"), v: Long("2"), wall: ISODate("2023-07-12T15:55:21.180Z") } - From dbdcdc8eb6fa1901e8f3394df05b9b533448634f Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Mon, 29 Jan 2024 10:57:27 -0800 Subject: [PATCH 056/308] QuickStart and Tutorial for QE and CSFLE: Update the required permissions and move to an include (#5597) * Update required permissions and move to an include * Simplify the permissions include * fix typo and formatting * add note about convention and move most to include --- .../core/queryable-encryption/quick-start.txt | 83 ++----------------- .../includes/note-key-vault-permissions.rst | 5 ++ .../includes/qe-tutorials/qe-quick-start.rst | 18 ++++ .../queryable-encryption/quick-start/dek.rst | 5 +- .../tutorials/exp/dek.rst | 5 +- source/includes/quick-start/dek.rst | 5 +- 6 files changed, 35 insertions(+), 86 deletions(-) create mode 100644 source/includes/note-key-vault-permissions.rst create mode 100644 source/includes/qe-tutorials/qe-quick-start.rst diff --git a/source/core/queryable-encryption/quick-start.txt b/source/core/queryable-encryption/quick-start.txt index 6cdcbe1fb80..e5e12a86af8 100644 --- a/source/core/queryable-encryption/quick-start.txt +++ b/source/core/queryable-encryption/quick-start.txt @@ -90,23 +90,7 @@ Procedure .. tab:: :tabid: shell - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"local"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. + .. include:: /includes/qe-tutorials/qe-quick-start.rst You can declare these variables by using the following code: @@ -119,23 +103,7 @@ Procedure .. tab:: :tabid: nodejs - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"local"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. + .. include:: /includes/qe-tutorials/qe-quick-start.rst You can declare these variables by using the following code: @@ -157,7 +125,8 @@ Procedure encryption keys (DEKs) will be stored. Set this variable to ``"encryption"``. - **key_vault_collection_name** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. + will be stored. Set this variable to ``"__keyVault"``, which is the + convention to help prevent mistaking it for a user collection. - **key_vault_namespace** - The namespace in MongoDB where your DEKs will be stored. Set this variable to the values of the ``key_vault_database_name`` and ``key_vault_collection_name`` variables, separated by a period. @@ -177,23 +146,7 @@ Procedure .. tab:: :tabid: java-sync - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"local"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. + .. include:: /includes/qe-tutorials/qe-quick-start.rst You can declare these variables by using the following code: @@ -206,23 +159,7 @@ Procedure .. tab:: :tabid: go - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"local"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. + .. include:: /includes/qe-tutorials/qe-quick-start.rst You can declare these variables by using the following code: @@ -241,7 +178,8 @@ Procedure encryption keys (DEKs) will be stored. Set the value of ``keyVaultDatabaseName`` to ``"encryption"``. - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set the value of ``keyVaultCollectionName`` to ``"__keyVault"``. + will be stored. Set this variable to ``"__keyVault"``, which is the + convention to help prevent mistaking it for a user collection. - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will be stored. Set ``keyVaultNamespace`` to a new ``CollectionNamespace`` object whose name is the values of the ``keyVaultDatabaseName`` and ``keyVaultCollectionName`` variables, @@ -264,10 +202,7 @@ Procedure .. important:: {+key-vault-long-title+} Namespace Permissions - The {+key-vault-long+} is in the ``encryption.__keyVault`` - namespace. Ensure that the database user your application uses to connect - to MongoDB has :ref:`ReadWrite ` - permissions on this namespace. + .. include:: /includes/note-key-vault-permissions .. include:: /includes/queryable-encryption/env-variables.rst diff --git a/source/includes/note-key-vault-permissions.rst b/source/includes/note-key-vault-permissions.rst new file mode 100644 index 00000000000..ffb548028d3 --- /dev/null +++ b/source/includes/note-key-vault-permissions.rst @@ -0,0 +1,5 @@ +To complete this tutorial, the database user your application uses to connect to +MongoDB must have :authrole:`dbAdmin` permissions on the following namespaces: + +- ``encryption.__keyVault`` +- ``medicalRecords`` database diff --git a/source/includes/qe-tutorials/qe-quick-start.rst b/source/includes/qe-tutorials/qe-quick-start.rst new file mode 100644 index 00000000000..ee001b1ba2a --- /dev/null +++ b/source/includes/qe-tutorials/qe-quick-start.rst @@ -0,0 +1,18 @@ +- **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. + Set this variable to ``"local"`` for this tutorial. +- **uri** - Your MongoDB deployment connection URI. Set your connection + URI in the ``MONGODB_URI`` environment variable or replace the value + directly. +- **keyVaultDatabaseName** - The database in MongoDB where your data + encryption keys (DEKs) will be stored. Set this variable + to ``"encryption"``. +- **keyVaultCollectionName** - The collection in MongoDB where your DEKs + will be stored. Set this variable to ``"__keyVault"``, which is the convention + to help prevent mistaking it for a user collection. +- **keyVaultNamespace** - The namespace in MongoDB where your DEKs will + be stored. Set this variable to the values of the ``keyVaultDatabaseName`` + and ``keyVaultCollectionName`` variables, separated by a period. +- **encryptedDatabaseName** - The database in MongoDB where your encrypted + data will be stored. Set this variable to ``"medicalRecords"``. +- **encryptedCollectionName** - The collection in MongoDB where your encrypted + data will be stored. Set this variable to ``"patients"``. diff --git a/source/includes/queryable-encryption/quick-start/dek.rst b/source/includes/queryable-encryption/quick-start/dek.rst index 22821ad09d1..fd6ab12494d 100644 --- a/source/includes/queryable-encryption/quick-start/dek.rst +++ b/source/includes/queryable-encryption/quick-start/dek.rst @@ -80,10 +80,7 @@ .. note:: {+key-vault-long-title+} Namespace Permissions - The {+key-vault-long+} is in the ``encryption.__keyVault`` - namespace. Ensure that the database user your application uses to connect - to MongoDB has :ref:`ReadWrite ` - permissions on this namespace. + .. include:: /includes/note-key-vault-permissions .. tabs-drivers:: diff --git a/source/includes/queryable-encryption/tutorials/exp/dek.rst b/source/includes/queryable-encryption/tutorials/exp/dek.rst index ef8274e906d..a075b28eb08 100644 --- a/source/includes/queryable-encryption/tutorials/exp/dek.rst +++ b/source/includes/queryable-encryption/tutorials/exp/dek.rst @@ -71,10 +71,7 @@ .. note:: {+key-vault-long-title+} Namespace Permissions - The {+key-vault-long+} is in the ``encryption.__keyVault`` - namespace. Ensure that the database user your application uses to connect - to MongoDB has :ref:`ReadWrite ` - permissions on this namespace. + .. include:: /includes/note-key-vault-permissions .. tabs-drivers:: diff --git a/source/includes/quick-start/dek.rst b/source/includes/quick-start/dek.rst index bbb0c2ba2ef..06715fd3f6a 100644 --- a/source/includes/quick-start/dek.rst +++ b/source/includes/quick-start/dek.rst @@ -69,10 +69,7 @@ .. note:: {+key-vault-long-title+} Namespace Permissions - The {+key-vault-long+} is in the ``encryption.__keyVault`` - namespace. Ensure that the database user your application uses to connect - to MongoDB has :ref:`ReadWrite ` - permissions on this namespace. + .. include:: /includes/note-key-vault-permissions .. tabs-drivers:: From 39d7d5fd7168c38b9bd5b0258f9573bbdfc2f2f0 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Mon, 29 Jan 2024 16:06:49 -0500 Subject: [PATCH 057/308] DOCS-16574 SBE Only in Group and Lookup Stage (#5919) * DOCS-16574 SBE Only in Group and Lookup Stage * CH feedback * CH feedback * * * build error * CH feedback 2/2 --- source/reference/sbe.txt | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/source/reference/sbe.txt b/source/reference/sbe.txt index 0499305aff2..602e9a7c08a 100644 --- a/source/reference/sbe.txt +++ b/source/reference/sbe.txt @@ -36,25 +36,16 @@ MongoDB uses the classic engine for queries that are ineligible for the Eligible Queries for the {+sbe-short-title+} ---------------------------------------------------- -MongoDB can use the {+sbe-short+} for the following queries: +MongoDB determines eligibility for using the {+sbe-short+} on a per-query basis, +and considers support for each operator and expressions present in the query. +For example, two common pipelines that use {+sbe-short+} are aggregations with +:pipeline:`$group` or :pipeline:`$lookup` stages. However, support for the +{+sbe-short+} is version specific and actively changing. -- :pipeline:`$group` and :pipeline:`$lookup` pipeline stages when - specific conditions are met. For more information, see - :ref:`sbe-pipeline-optimizations`. +To see whether your query used the {+sbe-short+}, refer to the +:ref:`sbe-determine-query-engine` section. -- :pipeline:`$match` and :pipeline:`$project` pipeline stages that use - supported query operators and expressions. - -- Certain :pipeline:`$sort` pipeline stages that do not include - :expression:`$meta` sorts. - -- :method:`~db.collection.find()` queries that use supported query - operators and expressions. - -.. note:: - - The {+sbe-short+} does not support :ref:`geospatial query operators - `. +.. _sbe-determine-query-engine: Determine which Query Engine was Used ------------------------------------- @@ -67,7 +58,8 @@ Check Query Explain Results The explain results for a query differ based on which query engine was used. For example, explain results for queries -executed using the {+sbe-short+} include the ``explain.queryPlanner.winningPlan.slotBasedPlan`` field. +executed using the {+sbe-short+} include the +``explain.queryPlanner.winningPlan.slotBasedPlan`` field. For more information about the differences in explain results between query engines, see :ref:`explain-output-structure`. From ed95e845214f3e14b9467286ff22fd7279ff916b Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Mon, 29 Jan 2024 16:30:20 -0500 Subject: [PATCH 058/308] DOCSP-28645 Standardize release note landing page behavior (#6056) --- snooty.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/snooty.toml b/snooty.toml index c9b23ec23e1..5035537806f 100644 --- a/snooty.toml +++ b/snooty.toml @@ -201,14 +201,17 @@ toc_landing_pages = [ "/release-notes/4.4-downgrade", "/release-notes/4.4", "/release-notes/5.0", + "/release-notes/5.0-downgrade", "/release-notes/5.1", "/release-notes/5.2", "/release-notes/5.3", "/release-notes/6.0", + "/release-notes/6.0-downgrade", "/release-notes/6.1", "/release-notes/6.2", "/release-notes/6.3", "/release-notes/7.0", + "/release-notes/7.0-downgrade", "/release-notes/7.1", "/release-notes/7.2", "/release-notes/7.3", From 9a220b8ceafc688893e506d552911f5bb22d4eda Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Mon, 29 Jan 2024 16:55:14 -0500 Subject: [PATCH 059/308] DOCSP-35883 fix collision typo (#6066) --- source/core/indexes/index-types/index-hashed.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/indexes/index-types/index-hashed.txt b/source/core/indexes/index-types/index-hashed.txt index 7edb45b00df..a09178787d2 100644 --- a/source/core/indexes/index-types/index-hashed.txt +++ b/source/core/indexes/index-types/index-hashed.txt @@ -46,7 +46,7 @@ Floating-Point Numbers Hashed indexes truncate floating-point numbers to 64-bit integers before hashing. For example, a hashed index uses the same hash to store the -values ``2.3``, ``2.2``, and ``2.9``. This is a **collison**, where +values ``2.3``, ``2.2``, and ``2.9``. This is a **collision**, where multiple values are assigned to a single hash key. Collisions may negatively impact query performance. From 7106f406de660c9fbc2f6ecc944eb0c4dba97dc2 Mon Sep 17 00:00:00 2001 From: Sarah Olson <98367156+sarah-olson-mongodb@users.noreply.github.com> Date: Tue, 30 Jan 2024 06:58:38 -0800 Subject: [PATCH 060/308] Docsp 33601 redux -- removing release notes from TOC (#6071) * DOCSP-33601: Removes Release Notes from TOC * DOCSP-33601-redux: Add no index metadata * DOCSP-33601-redux: Build error fix * DOCSP-33601-redux: Fixes * empty commit --- source/release-notes.txt | 61 ++++++------------- source/release-notes/1.2.txt | 7 +++ source/release-notes/1.4.txt | 9 ++- source/release-notes/1.6.txt | 7 +++ source/release-notes/1.8.txt | 7 +++ source/release-notes/2.0.txt | 7 +++ source/release-notes/2.2.txt | 7 +++ source/release-notes/2.4-changelog.txt | 7 +++ source/release-notes/2.4-index-types.txt | 7 +++ source/release-notes/2.4-javascript.txt | 7 +++ source/release-notes/2.4-upgrade.txt | 7 +++ source/release-notes/2.4.txt | 7 +++ source/release-notes/2.6-changelog.txt | 7 +++ source/release-notes/2.6-compatibility.txt | 7 +++ source/release-notes/2.6-downgrade.txt | 7 +++ .../2.6-upgrade-authorization.txt | 7 +++ source/release-notes/2.6-upgrade.txt | 7 +++ source/release-notes/2.6.txt | 7 +++ source/release-notes/3.0-changelog.txt | 7 +++ source/release-notes/3.0-compatibility.txt | 7 +++ source/release-notes/3.0-downgrade.txt | 7 +++ source/release-notes/3.0-scram.txt | 7 +++ source/release-notes/3.0-upgrade.txt | 7 +++ source/release-notes/3.0.txt | 7 +++ source/release-notes/3.2-changelog.txt | 7 +++ source/release-notes/3.2-compatibility.txt | 9 ++- source/release-notes/3.2-downgrade.txt | 7 +++ source/release-notes/3.2-javascript.txt | 7 +++ source/release-notes/3.2-upgrade.txt | 7 +++ source/release-notes/3.2.txt | 7 +++ source/release-notes/3.4-changelog.txt | 7 +++ source/release-notes/3.4-compatibility.txt | 7 ++- .../3.4-downgrade-replica-set.txt | 7 +++ .../3.4-downgrade-sharded-cluster.txt | 7 +++ .../3.4-downgrade-standalone.txt | 7 +++ source/release-notes/3.4-downgrade.txt | 7 +++ .../release-notes/3.4-upgrade-replica-set.txt | 7 +++ .../3.4-upgrade-sharded-cluster.txt | 7 +++ .../release-notes/3.4-upgrade-standalone.txt | 8 ++- source/release-notes/3.4.txt | 7 +++ source/release-notes/3.6-changelog.txt | 7 +++ source/release-notes/3.6-compatibility.txt | 7 +++ .../3.6-downgrade-replica-set.txt | 7 +++ .../3.6-downgrade-sharded-cluster.txt | 7 +++ .../3.6-downgrade-standalone.txt | 7 +++ .../release-notes/3.6-upgrade-replica-set.txt | 7 +++ .../3.6-upgrade-sharded-cluster.txt | 7 +++ .../release-notes/3.6-upgrade-standalone.txt | 8 ++- source/release-notes/3.6.txt | 7 +++ source/release-notes/4.0-changelog.txt | 7 +++ source/release-notes/4.0-compatibility.txt | 7 +++ .../4.0-downgrade-replica-set.txt | 7 +++ .../4.0-downgrade-sharded-cluster.txt | 7 +++ .../4.0-downgrade-standalone.txt | 7 +++ .../release-notes/4.0-upgrade-replica-set.txt | 7 +++ .../4.0-upgrade-sharded-cluster.txt | 7 +++ .../release-notes/4.0-upgrade-standalone.txt | 8 ++- source/release-notes/4.0.txt | 7 +++ source/release-notes/4.2-changelog.txt | 7 +++ source/release-notes/4.2-compatibility.txt | 7 +++ .../4.2-downgrade-replica-set.txt | 7 +++ .../4.2-downgrade-sharded-cluster.txt | 7 +++ .../4.2-downgrade-standalone.txt | 7 +++ source/release-notes/4.2-downgrade.txt | 7 +++ .../release-notes/4.2-upgrade-replica-set.txt | 7 +++ .../4.2-upgrade-sharded-cluster.txt | 7 +++ .../release-notes/4.2-upgrade-standalone.txt | 8 ++- source/release-notes/4.2.txt | 7 +++ source/release-notes/5.1-changelog.txt | 7 +++ source/release-notes/5.1-compatibility.txt | 7 +++ source/release-notes/5.1.txt | 7 +++ source/release-notes/5.2-changelog.txt | 7 +++ source/release-notes/5.2-compatibility.txt | 7 +++ source/release-notes/5.2.txt | 7 +++ source/release-notes/5.3-changelog.txt | 9 ++- source/release-notes/5.3-compatibility.txt | 7 +++ source/release-notes/5.3.txt | 7 +++ source/release-notes/6.1-changelog.txt | 7 +++ source/release-notes/6.1-compatibility.txt | 7 +++ source/release-notes/6.1.txt | 7 +++ source/release-notes/6.2-changelog.txt | 7 +++ source/release-notes/6.2-compatibility.txt | 7 +++ source/release-notes/6.2.txt | 7 +++ source/release-notes/6.3-changelog.txt | 7 +++ source/release-notes/6.3-compatibility.txt | 9 ++- source/release-notes/6.3.txt | 7 +++ 86 files changed, 617 insertions(+), 51 deletions(-) diff --git a/source/release-notes.txt b/source/release-notes.txt index a99d3a00649..acb356f2ee8 100644 --- a/source/release-notes.txt +++ b/source/release-notes.txt @@ -38,12 +38,6 @@ Previous Rapid Releases ~~~~~~~~~~~~~~~~~~~~~~~ - :ref:`release-notes-7.1` -- :ref:`release-notes-6.3` -- :ref:`release-notes-6.2` -- :ref:`release-notes-6.1` -- :ref:`release-notes-5.3` -- :ref:`release-notes-5.2` -- :ref:`release-notes-5.1` Previous Stable Releases ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -58,21 +52,25 @@ EOL Releases .. hlist:: :columns: 2 - - :ref:`release-notes-4.2` - - :ref:`release-notes-4.0` - - :ref:`release-notes-3.6` - - :ref:`release-notes-3.4` - - :ref:`release-notes-3.2` - - :ref:`release-notes-3.0` - - :ref:`release-notes-2.6` - - :ref:`release-notes-2.4` - - :ref:`release-notes-2.2` - - :ref:`release-notes-2.0` - - :ref:`release-notes-1.8` - - :ref:`release-notes-1.6` - - :ref:`release-notes-1.4` - - :ref:`release-notes-1.2` - + - 4.2 + - 4.0 + - 3.6 + - 3.4 + - 3.2 + - 3.0 + - 2.6 + - 2.4 + - 2.2 + - 2.0 + - 1.8 + - 1.6 + - 1.4 + - 1.2 + +.. note:: + + For documentation associated with an EOL release, see + `the legacy documentation `__. .. toctree:: :maxdepth: 1 @@ -82,29 +80,10 @@ EOL Releases /release-notes/7.2 /release-notes/7.1 /release-notes/7.0 - /release-notes/6.3 - /release-notes/6.2 - /release-notes/6.1 /release-notes/6.0 - /release-notes/5.3 - /release-notes/5.2 - /release-notes/5.1 /release-notes/5.0 /release-notes/4.4 - /release-notes/4.2 - /release-notes/4.0 - /release-notes/3.6 - /release-notes/3.4 - /release-notes/3.2 - /release-notes/3.0 - /release-notes/2.6 - /release-notes/2.4 - /release-notes/2.2 - /release-notes/2.0 - /release-notes/1.8 - /release-notes/1.6 - /release-notes/1.4 - /release-notes/1.2 + .. end-include-here diff --git a/source/release-notes/1.2.txt b/source/release-notes/1.2.txt index c69d241fa5a..23256a4b52f 100644 --- a/source/release-notes/1.2.txt +++ b/source/release-notes/1.2.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + .. _release-notes-1.2: =============================== diff --git a/source/release-notes/1.4.txt b/source/release-notes/1.4.txt index 0749cd70a17..bf6bf5cf174 100644 --- a/source/release-notes/1.4.txt +++ b/source/release-notes/1.4.txt @@ -1,4 +1,11 @@ -.. _release-notes-1.4: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + + .. _release-notes-1.4: ============================= Release Notes for MongoDB 1.4 diff --git a/source/release-notes/1.6.txt b/source/release-notes/1.6.txt index 39c0b53c90d..38e0920cd09 100644 --- a/source/release-notes/1.6.txt +++ b/source/release-notes/1.6.txt @@ -1,5 +1,12 @@ .. _release-notes-1.6: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 1.6 ============================= diff --git a/source/release-notes/1.8.txt b/source/release-notes/1.8.txt index 46f608d8f21..b5e336bc25a 100644 --- a/source/release-notes/1.8.txt +++ b/source/release-notes/1.8.txt @@ -1,5 +1,12 @@ .. _release-notes-1.8: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 1.8 ============================= diff --git a/source/release-notes/2.0.txt b/source/release-notes/2.0.txt index e0b3653b4b8..b9f929e6468 100644 --- a/source/release-notes/2.0.txt +++ b/source/release-notes/2.0.txt @@ -1,5 +1,12 @@ .. _release-notes-2.0: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 2.0 ============================= diff --git a/source/release-notes/2.2.txt b/source/release-notes/2.2.txt index 9407aab70de..8a7fcfec2e1 100644 --- a/source/release-notes/2.2.txt +++ b/source/release-notes/2.2.txt @@ -1,5 +1,12 @@ .. _release-notes-2.2: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 2.2 ============================= diff --git a/source/release-notes/2.4-changelog.txt b/source/release-notes/2.4-changelog.txt index 5c41372944d..6802066d714 100644 --- a/source/release-notes/2.4-changelog.txt +++ b/source/release-notes/2.4-changelog.txt @@ -1,5 +1,12 @@ .. _release-notes-2.4: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 2.4 Changelog ============= diff --git a/source/release-notes/2.4-index-types.txt b/source/release-notes/2.4-index-types.txt index b7ccc849b7d..3efd81efade 100644 --- a/source/release-notes/2.4-index-types.txt +++ b/source/release-notes/2.4-index-types.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + =================================================== Compatibility and Index Type Changes in MongoDB 2.4 =================================================== diff --git a/source/release-notes/2.4-javascript.txt b/source/release-notes/2.4-javascript.txt index a5d09b05bfa..fa1be6eff8d 100644 --- a/source/release-notes/2.4-javascript.txt +++ b/source/release-notes/2.4-javascript.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================= JavaScript Changes in MongoDB 2.4 ================================= diff --git a/source/release-notes/2.4-upgrade.txt b/source/release-notes/2.4-upgrade.txt index e2c3b309c23..715e811861a 100644 --- a/source/release-notes/2.4-upgrade.txt +++ b/source/release-notes/2.4-upgrade.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ====================== Upgrade MongoDB to 2.4 ====================== diff --git a/source/release-notes/2.4.txt b/source/release-notes/2.4.txt index 7dcc67aea30..18f540764ad 100644 --- a/source/release-notes/2.4.txt +++ b/source/release-notes/2.4.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 2.4 ============================= diff --git a/source/release-notes/2.6-changelog.txt b/source/release-notes/2.6-changelog.txt index 26cd59b4147..ed5c112ee71 100644 --- a/source/release-notes/2.6-changelog.txt +++ b/source/release-notes/2.6-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 2.6 Changelog ============= diff --git a/source/release-notes/2.6-compatibility.txt b/source/release-notes/2.6-compatibility.txt index 81f81b43264..e458e6a2a1d 100644 --- a/source/release-notes/2.6-compatibility.txt +++ b/source/release-notes/2.6-compatibility.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 2.6 ==================================== diff --git a/source/release-notes/2.6-downgrade.txt b/source/release-notes/2.6-downgrade.txt index 4dddd88a80e..4cc90d385f9 100644 --- a/source/release-notes/2.6-downgrade.txt +++ b/source/release-notes/2.6-downgrade.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ========================== Downgrade MongoDB from 2.6 ========================== diff --git a/source/release-notes/2.6-upgrade-authorization.txt b/source/release-notes/2.6-upgrade-authorization.txt index 2aa3b0ee7a9..b0c5990cc34 100644 --- a/source/release-notes/2.6-upgrade-authorization.txt +++ b/source/release-notes/2.6-upgrade-authorization.txt @@ -1,5 +1,12 @@ .. _2.6-upgrade-authorization-model: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================================= Upgrade User Authorization Data to 2.6 Format ============================================= diff --git a/source/release-notes/2.6-upgrade.txt b/source/release-notes/2.6-upgrade.txt index 416b1e60b7d..7c92f571838 100644 --- a/source/release-notes/2.6-upgrade.txt +++ b/source/release-notes/2.6-upgrade.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ====================== Upgrade MongoDB to 2.6 ====================== diff --git a/source/release-notes/2.6.txt b/source/release-notes/2.6.txt index f64d10265c1..9f9f1d05e0e 100644 --- a/source/release-notes/2.6.txt +++ b/source/release-notes/2.6.txt @@ -1,5 +1,12 @@ .. _release-notes-2.6: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 2.6 ============================= diff --git a/source/release-notes/3.0-changelog.txt b/source/release-notes/3.0-changelog.txt index 2d475e72f0e..dc1b39f27c6 100644 --- a/source/release-notes/3.0-changelog.txt +++ b/source/release-notes/3.0-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 3.0 Changelog ============= diff --git a/source/release-notes/3.0-compatibility.txt b/source/release-notes/3.0-compatibility.txt index 6e8737301dc..d7bda355d65 100644 --- a/source/release-notes/3.0-compatibility.txt +++ b/source/release-notes/3.0-compatibility.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 3.0 ==================================== diff --git a/source/release-notes/3.0-downgrade.txt b/source/release-notes/3.0-downgrade.txt index 7022381b20c..184923f964e 100644 --- a/source/release-notes/3.0-downgrade.txt +++ b/source/release-notes/3.0-downgrade.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ========================== Downgrade MongoDB from 3.0 ========================== diff --git a/source/release-notes/3.0-scram.txt b/source/release-notes/3.0-scram.txt index 673ca7528ca..ccc1455d07a 100644 --- a/source/release-notes/3.0-scram.txt +++ b/source/release-notes/3.0-scram.txt @@ -1,5 +1,12 @@ .. _3.0-scram: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================ Upgrade to SCRAM ================ diff --git a/source/release-notes/3.0-upgrade.txt b/source/release-notes/3.0-upgrade.txt index e293dc78993..745f72f79da 100644 --- a/source/release-notes/3.0-upgrade.txt +++ b/source/release-notes/3.0-upgrade.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ====================== Upgrade MongoDB to 3.0 ====================== diff --git a/source/release-notes/3.0.txt b/source/release-notes/3.0.txt index 81a0a8aafd7..90a14e21526 100644 --- a/source/release-notes/3.0.txt +++ b/source/release-notes/3.0.txt @@ -1,5 +1,12 @@ .. _release-notes-3.0: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 3.0 ============================= diff --git a/source/release-notes/3.2-changelog.txt b/source/release-notes/3.2-changelog.txt index 7370957eec3..bbf4889c969 100644 --- a/source/release-notes/3.2-changelog.txt +++ b/source/release-notes/3.2-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 3.2 Changelog ============= diff --git a/source/release-notes/3.2-compatibility.txt b/source/release-notes/3.2-compatibility.txt index 5a3c7ab18ce..42e53354002 100644 --- a/source/release-notes/3.2-compatibility.txt +++ b/source/release-notes/3.2-compatibility.txt @@ -1,5 +1,10 @@ -:orphan: - +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 3.2 ==================================== diff --git a/source/release-notes/3.2-downgrade.txt b/source/release-notes/3.2-downgrade.txt index 3f88e28fc04..9ba2188cd3a 100644 --- a/source/release-notes/3.2-downgrade.txt +++ b/source/release-notes/3.2-downgrade.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ========================== Downgrade MongoDB from 3.2 ========================== diff --git a/source/release-notes/3.2-javascript.txt b/source/release-notes/3.2-javascript.txt index 450a493d1bf..1a33612a603 100644 --- a/source/release-notes/3.2-javascript.txt +++ b/source/release-notes/3.2-javascript.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================= JavaScript Changes in MongoDB 3.2 ================================= diff --git a/source/release-notes/3.2-upgrade.txt b/source/release-notes/3.2-upgrade.txt index 1c575e4ff89..275d9527245 100644 --- a/source/release-notes/3.2-upgrade.txt +++ b/source/release-notes/3.2-upgrade.txt @@ -1,5 +1,12 @@ .. _upgrade-to-3.2: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ====================== Upgrade MongoDB to 3.2 ====================== diff --git a/source/release-notes/3.2.txt b/source/release-notes/3.2.txt index 2a95f83e247..16d4a560391 100644 --- a/source/release-notes/3.2.txt +++ b/source/release-notes/3.2.txt @@ -1,5 +1,12 @@ .. _release-notes-3.2: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 3.2 ============================= diff --git a/source/release-notes/3.4-changelog.txt b/source/release-notes/3.4-changelog.txt index f13db08f423..e977a344ee8 100644 --- a/source/release-notes/3.4-changelog.txt +++ b/source/release-notes/3.4-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 3.4 Changelog ============= diff --git a/source/release-notes/3.4-compatibility.txt b/source/release-notes/3.4-compatibility.txt index 6164dca7640..d2d6ac04d7c 100644 --- a/source/release-notes/3.4-compatibility.txt +++ b/source/release-notes/3.4-compatibility.txt @@ -1,4 +1,9 @@ -:orphan: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet ==================================== Compatibility Changes in MongoDB 3.4 diff --git a/source/release-notes/3.4-downgrade-replica-set.txt b/source/release-notes/3.4-downgrade-replica-set.txt index a6b7281956f..f97da572620 100644 --- a/source/release-notes/3.4-downgrade-replica-set.txt +++ b/source/release-notes/3.4-downgrade-replica-set.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================ Downgrade 3.4 Replica Set to 3.2 ================================ diff --git a/source/release-notes/3.4-downgrade-sharded-cluster.txt b/source/release-notes/3.4-downgrade-sharded-cluster.txt index 511c90fe981..e46cf9ef99a 100644 --- a/source/release-notes/3.4-downgrade-sharded-cluster.txt +++ b/source/release-notes/3.4-downgrade-sharded-cluster.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Downgrade 3.4 Sharded Cluster to 3.2 ==================================== diff --git a/source/release-notes/3.4-downgrade-standalone.txt b/source/release-notes/3.4-downgrade-standalone.txt index 8f956d66ed0..765e23cd4e8 100644 --- a/source/release-notes/3.4-downgrade-standalone.txt +++ b/source/release-notes/3.4-downgrade-standalone.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + =============================== Downgrade 3.4 Standalone to 3.2 =============================== diff --git a/source/release-notes/3.4-downgrade.txt b/source/release-notes/3.4-downgrade.txt index a7b0e15b70f..5d3e83eb8c5 100644 --- a/source/release-notes/3.4-downgrade.txt +++ b/source/release-notes/3.4-downgrade.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================ Downgrade MongoDB 3.4 to 3.2 ============================ diff --git a/source/release-notes/3.4-upgrade-replica-set.txt b/source/release-notes/3.4-upgrade-replica-set.txt index 042d9557bec..5fe56cafa13 100644 --- a/source/release-notes/3.4-upgrade-replica-set.txt +++ b/source/release-notes/3.4-upgrade-replica-set.txt @@ -1,5 +1,12 @@ .. _3.4-upgrade-replica-set: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================ Upgrade a Replica Set to 3.4 ============================ diff --git a/source/release-notes/3.4-upgrade-sharded-cluster.txt b/source/release-notes/3.4-upgrade-sharded-cluster.txt index 7c2a1420833..911b76f04bb 100644 --- a/source/release-notes/3.4-upgrade-sharded-cluster.txt +++ b/source/release-notes/3.4-upgrade-sharded-cluster.txt @@ -1,5 +1,12 @@ .. _3.4-upgrade-sharded-cluster: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================ Upgrade a Sharded Cluster to 3.4 ================================ diff --git a/source/release-notes/3.4-upgrade-standalone.txt b/source/release-notes/3.4-upgrade-standalone.txt index 405b9a69c10..8bb364a1eaa 100644 --- a/source/release-notes/3.4-upgrade-standalone.txt +++ b/source/release-notes/3.4-upgrade-standalone.txt @@ -1,6 +1,12 @@ - .. _3.4-upgrade-standalone: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + =========================== Upgrade a Standalone to 3.4 =========================== diff --git a/source/release-notes/3.4.txt b/source/release-notes/3.4.txt index d0076370ef5..19ad49ce427 100644 --- a/source/release-notes/3.4.txt +++ b/source/release-notes/3.4.txt @@ -1,5 +1,12 @@ .. _release-notes-3.4: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 3.4 ============================= diff --git a/source/release-notes/3.6-changelog.txt b/source/release-notes/3.6-changelog.txt index 8ba2c9352b3..5cb32d5e866 100644 --- a/source/release-notes/3.6-changelog.txt +++ b/source/release-notes/3.6-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 3.6 Changelog ============= diff --git a/source/release-notes/3.6-compatibility.txt b/source/release-notes/3.6-compatibility.txt index 7982c245453..71363e2a982 100644 --- a/source/release-notes/3.6-compatibility.txt +++ b/source/release-notes/3.6-compatibility.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 3.6 ==================================== diff --git a/source/release-notes/3.6-downgrade-replica-set.txt b/source/release-notes/3.6-downgrade-replica-set.txt index 61b1dbeb73e..b00af709846 100644 --- a/source/release-notes/3.6-downgrade-replica-set.txt +++ b/source/release-notes/3.6-downgrade-replica-set.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================ Downgrade 3.6 Replica Set to 3.4 ================================ diff --git a/source/release-notes/3.6-downgrade-sharded-cluster.txt b/source/release-notes/3.6-downgrade-sharded-cluster.txt index 717a19dbdf0..a1d32225020 100644 --- a/source/release-notes/3.6-downgrade-sharded-cluster.txt +++ b/source/release-notes/3.6-downgrade-sharded-cluster.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Downgrade 3.6 Sharded Cluster to 3.4 ==================================== diff --git a/source/release-notes/3.6-downgrade-standalone.txt b/source/release-notes/3.6-downgrade-standalone.txt index 9d8215083a8..4f54cf2db07 100644 --- a/source/release-notes/3.6-downgrade-standalone.txt +++ b/source/release-notes/3.6-downgrade-standalone.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================================= Downgrade |newversion| Standalone to |oldversion| ================================================= diff --git a/source/release-notes/3.6-upgrade-replica-set.txt b/source/release-notes/3.6-upgrade-replica-set.txt index 591ef33e225..fe194119d22 100644 --- a/source/release-notes/3.6-upgrade-replica-set.txt +++ b/source/release-notes/3.6-upgrade-replica-set.txt @@ -1,5 +1,12 @@ .. _3.6-upgrade-replica-set: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================ Upgrade a Replica Set to 3.6 ============================ diff --git a/source/release-notes/3.6-upgrade-sharded-cluster.txt b/source/release-notes/3.6-upgrade-sharded-cluster.txt index ce4ecff2425..79650145f45 100644 --- a/source/release-notes/3.6-upgrade-sharded-cluster.txt +++ b/source/release-notes/3.6-upgrade-sharded-cluster.txt @@ -1,5 +1,12 @@ .. _3.6-upgrade-sharded-cluster: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================ Upgrade a Sharded Cluster to 3.6 ================================ diff --git a/source/release-notes/3.6-upgrade-standalone.txt b/source/release-notes/3.6-upgrade-standalone.txt index 66ce43bb172..d75f7f91c98 100644 --- a/source/release-notes/3.6-upgrade-standalone.txt +++ b/source/release-notes/3.6-upgrade-standalone.txt @@ -1,6 +1,12 @@ - .. _3.6-upgrade-standalone: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + =========================== Upgrade a Standalone to 3.6 =========================== diff --git a/source/release-notes/3.6.txt b/source/release-notes/3.6.txt index dad44dc4e2b..4f4b046ecc5 100644 --- a/source/release-notes/3.6.txt +++ b/source/release-notes/3.6.txt @@ -1,5 +1,12 @@ .. _release-notes-3.6: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 3.6 ============================= diff --git a/source/release-notes/4.0-changelog.txt b/source/release-notes/4.0-changelog.txt index 43003e06919..d154990d5cf 100644 --- a/source/release-notes/4.0-changelog.txt +++ b/source/release-notes/4.0-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 4.0 Changelog ============= diff --git a/source/release-notes/4.0-compatibility.txt b/source/release-notes/4.0-compatibility.txt index 589f59571b0..0b551e1c7be 100644 --- a/source/release-notes/4.0-compatibility.txt +++ b/source/release-notes/4.0-compatibility.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 4.0 ==================================== diff --git a/source/release-notes/4.0-downgrade-replica-set.txt b/source/release-notes/4.0-downgrade-replica-set.txt index d7e84a8e21e..16a72f3cba4 100644 --- a/source/release-notes/4.0-downgrade-replica-set.txt +++ b/source/release-notes/4.0-downgrade-replica-set.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================ Downgrade 4.0 Replica Set to 3.6 ================================ diff --git a/source/release-notes/4.0-downgrade-sharded-cluster.txt b/source/release-notes/4.0-downgrade-sharded-cluster.txt index cebc49ff755..e5253d65b9f 100644 --- a/source/release-notes/4.0-downgrade-sharded-cluster.txt +++ b/source/release-notes/4.0-downgrade-sharded-cluster.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Downgrade 4.0 Sharded Cluster to 3.6 ==================================== diff --git a/source/release-notes/4.0-downgrade-standalone.txt b/source/release-notes/4.0-downgrade-standalone.txt index 9b8d22bbf6f..0af43f63097 100644 --- a/source/release-notes/4.0-downgrade-standalone.txt +++ b/source/release-notes/4.0-downgrade-standalone.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================================= Downgrade |newversion| Standalone to |oldversion| ================================================= diff --git a/source/release-notes/4.0-upgrade-replica-set.txt b/source/release-notes/4.0-upgrade-replica-set.txt index 17e1501840b..8534fa31d40 100644 --- a/source/release-notes/4.0-upgrade-replica-set.txt +++ b/source/release-notes/4.0-upgrade-replica-set.txt @@ -1,5 +1,12 @@ .. _4.0-upgrade-replica-set: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================ Upgrade a Replica Set to 4.0 ============================ diff --git a/source/release-notes/4.0-upgrade-sharded-cluster.txt b/source/release-notes/4.0-upgrade-sharded-cluster.txt index 30a986d5c2f..71d6bb88987 100644 --- a/source/release-notes/4.0-upgrade-sharded-cluster.txt +++ b/source/release-notes/4.0-upgrade-sharded-cluster.txt @@ -1,5 +1,12 @@ .. _4.0-upgrade-sharded-cluster: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================ Upgrade a Sharded Cluster to 4.0 ================================ diff --git a/source/release-notes/4.0-upgrade-standalone.txt b/source/release-notes/4.0-upgrade-standalone.txt index 67964c22803..04700cb1de0 100644 --- a/source/release-notes/4.0-upgrade-standalone.txt +++ b/source/release-notes/4.0-upgrade-standalone.txt @@ -1,6 +1,12 @@ - .. _4.0-upgrade-standalone: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + =========================== Upgrade a Standalone to 4.0 =========================== diff --git a/source/release-notes/4.0.txt b/source/release-notes/4.0.txt index 99d1a404962..229287235d5 100644 --- a/source/release-notes/4.0.txt +++ b/source/release-notes/4.0.txt @@ -1,5 +1,12 @@ .. _release-notes-4.0: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 4.0 ============================= diff --git a/source/release-notes/4.2-changelog.txt b/source/release-notes/4.2-changelog.txt index e73c3999674..08168ac6b52 100644 --- a/source/release-notes/4.2-changelog.txt +++ b/source/release-notes/4.2-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 4.2 Changelog ============= diff --git a/source/release-notes/4.2-compatibility.txt b/source/release-notes/4.2-compatibility.txt index e2b3097b4ae..2453bd73acf 100644 --- a/source/release-notes/4.2-compatibility.txt +++ b/source/release-notes/4.2-compatibility.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 4.2 ==================================== diff --git a/source/release-notes/4.2-downgrade-replica-set.txt b/source/release-notes/4.2-downgrade-replica-set.txt index ac3e6321e4f..9b720414551 100644 --- a/source/release-notes/4.2-downgrade-replica-set.txt +++ b/source/release-notes/4.2-downgrade-replica-set.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================================== Downgrade |newversion| Replica Set to |oldversion| ================================================== diff --git a/source/release-notes/4.2-downgrade-sharded-cluster.txt b/source/release-notes/4.2-downgrade-sharded-cluster.txt index 973e2ea6e36..885ff6d3ee1 100644 --- a/source/release-notes/4.2-downgrade-sharded-cluster.txt +++ b/source/release-notes/4.2-downgrade-sharded-cluster.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ====================================================== Downgrade |newversion| Sharded Cluster to |oldversion| ====================================================== diff --git a/source/release-notes/4.2-downgrade-standalone.txt b/source/release-notes/4.2-downgrade-standalone.txt index 907d1bc2a50..abbe31c7c6a 100644 --- a/source/release-notes/4.2-downgrade-standalone.txt +++ b/source/release-notes/4.2-downgrade-standalone.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ================================================= Downgrade |newversion| Standalone to |oldversion| ================================================= diff --git a/source/release-notes/4.2-downgrade.txt b/source/release-notes/4.2-downgrade.txt index c1b536bc239..c2d590772eb 100644 --- a/source/release-notes/4.2-downgrade.txt +++ b/source/release-notes/4.2-downgrade.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ====================================== Downgrade |newversion| to |oldversion| ====================================== diff --git a/source/release-notes/4.2-upgrade-replica-set.txt b/source/release-notes/4.2-upgrade-replica-set.txt index 56784cb5d36..58d27b01bb0 100644 --- a/source/release-notes/4.2-upgrade-replica-set.txt +++ b/source/release-notes/4.2-upgrade-replica-set.txt @@ -1,5 +1,12 @@ .. _4.2-upgrade-replica-set: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================ Upgrade a Replica Set to 4.2 ============================ diff --git a/source/release-notes/4.2-upgrade-sharded-cluster.txt b/source/release-notes/4.2-upgrade-sharded-cluster.txt index 117983253c6..84d59ff0f38 100644 --- a/source/release-notes/4.2-upgrade-sharded-cluster.txt +++ b/source/release-notes/4.2-upgrade-sharded-cluster.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + .. _4.2-upgrade-sharded-cluster: ================================ diff --git a/source/release-notes/4.2-upgrade-standalone.txt b/source/release-notes/4.2-upgrade-standalone.txt index 070e3f9a4dc..ab9507d171c 100644 --- a/source/release-notes/4.2-upgrade-standalone.txt +++ b/source/release-notes/4.2-upgrade-standalone.txt @@ -1,6 +1,12 @@ - .. _4.2-upgrade-standalone: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + =========================== Upgrade a Standalone to 4.2 =========================== diff --git a/source/release-notes/4.2.txt b/source/release-notes/4.2.txt index a5336004e56..e07b211a454 100644 --- a/source/release-notes/4.2.txt +++ b/source/release-notes/4.2.txt @@ -1,5 +1,12 @@ .. _release-notes-4.2: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 4.2 ============================= diff --git a/source/release-notes/5.1-changelog.txt b/source/release-notes/5.1-changelog.txt index 0942974283d..9785255dcda 100644 --- a/source/release-notes/5.1-changelog.txt +++ b/source/release-notes/5.1-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 5.1 Changelog ============= diff --git a/source/release-notes/5.1-compatibility.txt b/source/release-notes/5.1-compatibility.txt index f14c3055585..2b5ddebea9f 100644 --- a/source/release-notes/5.1-compatibility.txt +++ b/source/release-notes/5.1-compatibility.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 5.1 ==================================== diff --git a/source/release-notes/5.1.txt b/source/release-notes/5.1.txt index 295164af728..53fccc48fe0 100644 --- a/source/release-notes/5.1.txt +++ b/source/release-notes/5.1.txt @@ -1,5 +1,12 @@ .. _release-notes-5.1: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 5.1 ============================= diff --git a/source/release-notes/5.2-changelog.txt b/source/release-notes/5.2-changelog.txt index b7846ff3001..e2a6276a7c1 100644 --- a/source/release-notes/5.2-changelog.txt +++ b/source/release-notes/5.2-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 5.2 Changelog ============= diff --git a/source/release-notes/5.2-compatibility.txt b/source/release-notes/5.2-compatibility.txt index 202e421b5b1..430406fcd33 100644 --- a/source/release-notes/5.2-compatibility.txt +++ b/source/release-notes/5.2-compatibility.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 5.2 ==================================== diff --git a/source/release-notes/5.2.txt b/source/release-notes/5.2.txt index 88c5d8963ad..78ef934db7f 100644 --- a/source/release-notes/5.2.txt +++ b/source/release-notes/5.2.txt @@ -1,5 +1,12 @@ .. _release-notes-5.2: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 5.2 ============================= diff --git a/source/release-notes/5.3-changelog.txt b/source/release-notes/5.3-changelog.txt index 98aef12fce5..a4841985d5a 100644 --- a/source/release-notes/5.3-changelog.txt +++ b/source/release-notes/5.3-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 5.3 Changelog ============= @@ -14,4 +21,4 @@ .. include:: /includes/changelogs/releases/5.3.1.rst -.. include:: /includes/changelogs/releases/5.3.0.rst \ No newline at end of file +.. include:: /includes/changelogs/releases/5.3.0.rst diff --git a/source/release-notes/5.3-compatibility.txt b/source/release-notes/5.3-compatibility.txt index d0257bfff3b..66eb04b5741 100644 --- a/source/release-notes/5.3-compatibility.txt +++ b/source/release-notes/5.3-compatibility.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 5.3 ==================================== diff --git a/source/release-notes/5.3.txt b/source/release-notes/5.3.txt index c642b1c9463..e9c05de4e77 100644 --- a/source/release-notes/5.3.txt +++ b/source/release-notes/5.3.txt @@ -1,5 +1,12 @@ .. _release-notes-5.3: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 5.3 ============================= diff --git a/source/release-notes/6.1-changelog.txt b/source/release-notes/6.1-changelog.txt index cea0fa23ff3..cfb8c99d09d 100644 --- a/source/release-notes/6.1-changelog.txt +++ b/source/release-notes/6.1-changelog.txt @@ -1,5 +1,12 @@ .. _6.1-changelog-full: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 6.1 Changelog ============= diff --git a/source/release-notes/6.1-compatibility.txt b/source/release-notes/6.1-compatibility.txt index c2f6f53b49f..edc55c567d1 100644 --- a/source/release-notes/6.1-compatibility.txt +++ b/source/release-notes/6.1-compatibility.txt @@ -1,5 +1,12 @@ .. _6.1-compatibility: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 6.1 ==================================== diff --git a/source/release-notes/6.1.txt b/source/release-notes/6.1.txt index 239c6f7bc64..c996e63aa86 100644 --- a/source/release-notes/6.1.txt +++ b/source/release-notes/6.1.txt @@ -1,5 +1,12 @@ .. _release-notes-6.1: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 6.1 ============================= diff --git a/source/release-notes/6.2-changelog.txt b/source/release-notes/6.2-changelog.txt index 18408f75831..2641467cee5 100644 --- a/source/release-notes/6.2-changelog.txt +++ b/source/release-notes/6.2-changelog.txt @@ -1,5 +1,12 @@ .. _6.2-changelog-full: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 6.2 Changelog ============= diff --git a/source/release-notes/6.2-compatibility.txt b/source/release-notes/6.2-compatibility.txt index eb3bcfa62b1..019f3dd2e75 100644 --- a/source/release-notes/6.2-compatibility.txt +++ b/source/release-notes/6.2-compatibility.txt @@ -1,5 +1,12 @@ .. _6.2-compatibility: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 6.2 ==================================== diff --git a/source/release-notes/6.2.txt b/source/release-notes/6.2.txt index 726458be618..2b11e8bf010 100644 --- a/source/release-notes/6.2.txt +++ b/source/release-notes/6.2.txt @@ -1,5 +1,12 @@ .. _release-notes-6.2: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 6.2 ============================= diff --git a/source/release-notes/6.3-changelog.txt b/source/release-notes/6.3-changelog.txt index a8549218c60..6f47db07205 100644 --- a/source/release-notes/6.3-changelog.txt +++ b/source/release-notes/6.3-changelog.txt @@ -1,3 +1,10 @@ +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============= 6.3 Changelog ============= diff --git a/source/release-notes/6.3-compatibility.txt b/source/release-notes/6.3-compatibility.txt index cd4ffa4b45e..118f314406a 100644 --- a/source/release-notes/6.3-compatibility.txt +++ b/source/release-notes/6.3-compatibility.txt @@ -1,5 +1,12 @@ .. _6.3-compatibility: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ==================================== Compatibility Changes in MongoDB 6.3 ==================================== @@ -44,4 +51,4 @@ Partial TTL Indexes for Time Series Collections Starting in MongoDB 6.3, you can create partial :ref:`Time To Live (TTL) ` indexes on time series collections. To downgrade below 6.3, you must remove all partial TTL indexes from your -time series collections. \ No newline at end of file +time series collections. diff --git a/source/release-notes/6.3.txt b/source/release-notes/6.3.txt index 37f74658829..3b8a3084075 100644 --- a/source/release-notes/6.3.txt +++ b/source/release-notes/6.3.txt @@ -1,5 +1,12 @@ .. _release-notes-6.3: +.. This page is hidden from the TOC and search indexing. + +:orphan: + +.. meta:: + :robots: noindex, nosnippet + ============================= Release Notes for MongoDB 6.3 ============================= From 0908a249f7e6ed4c927a05849485b2035e7b97fc Mon Sep 17 00:00:00 2001 From: Nora Reidy Date: Tue, 30 Jan 2024 10:23:48 -0500 Subject: [PATCH 061/308] DOCSP-33168: Add missing sharding step (#6018) * DOCSP-33168: Add missing sharding step * rewording * copy review --- source/includes/steps-shard-existing-tsc.yaml | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/source/includes/steps-shard-existing-tsc.yaml b/source/includes/steps-shard-existing-tsc.yaml index 5dd32a0aa23..ea418d27cca 100644 --- a/source/includes/steps-shard-existing-tsc.yaml +++ b/source/includes/steps-shard-existing-tsc.yaml @@ -34,13 +34,13 @@ content: | ... --- -title: Shard the collection. -ref: new-sharded-tsc-create +title: Create a hashed index on your collection. +ref: new-sharded-tsc-index stepnum: 3 level: 4 content: | - Use the :method:`~sh.shardCollection()` method to shard the - collection. + Enable sharding on your collection by creating an index that supports + the :ref:`shard key `. Consider a time series collection with the following properties: @@ -67,11 +67,28 @@ content: | "speed": 50 } ) - To shard the collection, run the following command: + Run the following command to create a hashed index on the + ``metadata.location`` field: + + .. code-block:: javascript + + db.deliverySensor.createIndex( { "metadata.location" : "hashed" } ) + +--- +title: Shard your collection. +ref: new-sharded-tsc-create +stepnum: 4 +level: 4 +content: | + Use the :method:`~sh.shardCollection()` method to shard the + collection. + + To shard the ``deliverySensor`` collection described in the preceding step, run + the following command: .. code-block:: javascript - sh.shardCollection( "test.deliverySensor", { "metadata.location": 1 } ) + sh.shardCollection( "test.deliverySensor", { "metadata.location": "hashed" } ) In this example, :method:`sh.shardCollection()`: From 984bf0be3e61c4c73a9303ee6a087178210d62de Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:20:26 -0500 Subject: [PATCH 062/308] DOCSP-34259 re-use $expr example on find() (#6057) * DOCSP-34259 re-use $expr example on find() * internal review --- source/includes/use-expr-in-find-query.rst | 27 +++++++++++++++++ .../reference/method/db.collection.find.txt | 2 ++ source/reference/operator/query/expr.txt | 29 +------------------ 3 files changed, 30 insertions(+), 28 deletions(-) create mode 100644 source/includes/use-expr-in-find-query.rst diff --git a/source/includes/use-expr-in-find-query.rst b/source/includes/use-expr-in-find-query.rst new file mode 100644 index 00000000000..7202692b943 --- /dev/null +++ b/source/includes/use-expr-in-find-query.rst @@ -0,0 +1,27 @@ +Compare Two Fields from A Single Document +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Consider a ``monthlyBudget`` collection with the following documents: + +.. code-block:: javascript + + { "_id" : 1, "category" : "food", "budget": 400, "spent": 450 } + { "_id" : 2, "category" : "drinks", "budget": 100, "spent": 150 } + { "_id" : 3, "category" : "clothes", "budget": 100, "spent": 50 } + { "_id" : 4, "category" : "misc", "budget": 500, "spent": 300 } + { "_id" : 5, "category" : "travel", "budget": 200, "spent": 650 } + +The following operation uses :query:`$expr` to find documents +where the ``spent`` amount exceeds the ``budget``: + +.. code-block:: javascript + + db.monthlyBudget.find( { $expr: { $gt: [ "$spent" , "$budget" ] } } ) + +The operation returns the following results: + +.. code-block:: javascript + + { "_id" : 1, "category" : "food", "budget" : 400, "spent" : 450 } + { "_id" : 2, "category" : "drinks", "budget" : 100, "spent" : 150 } + { "_id" : 5, "category" : "travel", "budget" : 200, "spent" : 650 } diff --git a/source/reference/method/db.collection.find.txt b/source/reference/method/db.collection.find.txt index 29855bd4595..d2f8f88279d 100644 --- a/source/reference/method/db.collection.find.txt +++ b/source/reference/method/db.collection.find.txt @@ -373,6 +373,8 @@ field does not exists: For a list of the query operators, see :ref:`query-selectors`. +.. include:: /includes/use-expr-in-find-query.rst + .. _query-subdocuments: .. _query-embedded-documents: diff --git a/source/reference/operator/query/expr.txt b/source/reference/operator/query/expr.txt index 381f4edb3c2..45cf45c33b3 100644 --- a/source/reference/operator/query/expr.txt +++ b/source/reference/operator/query/expr.txt @@ -59,34 +59,7 @@ If the :pipeline:`$match` stage is part of a :pipeline:`$lookup` stage, Examples -------- -Compare Two Fields from A Single Document -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Consider an ``monthlyBudget`` collection with the following documents: - -.. code-block:: javascript - - { "_id" : 1, "category" : "food", "budget": 400, "spent": 450 } - { "_id" : 2, "category" : "drinks", "budget": 100, "spent": 150 } - { "_id" : 3, "category" : "clothes", "budget": 100, "spent": 50 } - { "_id" : 4, "category" : "misc", "budget": 500, "spent": 300 } - { "_id" : 5, "category" : "travel", "budget": 200, "spent": 650 } - -The following operation uses :query:`$expr` to find documents -where the ``spent`` amount exceeds the ``budget``: - -.. code-block:: javascript - - db.monthlyBudget.find( { $expr: { $gt: [ "$spent" , "$budget" ] } } ) - -The operation returns the following results: - -.. code-block:: javascript - - { "_id" : 1, "category" : "food", "budget" : 400, "spent" : 450 } - { "_id" : 2, "category" : "drinks", "budget" : 100, "spent" : 150 } - { "_id" : 5, "category" : "travel", "budget" : 200, "spent" : 650 } - +.. include:: /includes/use-expr-in-find-query.rst Using ``$expr`` With Conditional Statements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 3f70278166bf4110751b7255fb605ffb50f3cf91 Mon Sep 17 00:00:00 2001 From: Sarah Lin <55722001+sarahemlin@users.noreply.github.com> Date: Tue, 30 Jan 2024 08:53:04 -0800 Subject: [PATCH 063/308] DOCSP-33171 batch 3 added meta descriptions (#6052) * DOCSP-33171 batch 3 added meta descriptions * Update source/core/wiredtiger.txt Co-authored-by: Jeff Allen --------- Co-authored-by: Jeff Allen --- source/core/views.txt | 3 +++ source/core/wiredtiger.txt | 3 +++ 2 files changed, 6 insertions(+) diff --git a/source/core/views.txt b/source/core/views.txt index 2e6397e0b1c..974d7d0aaa2 100644 --- a/source/core/views.txt +++ b/source/core/views.txt @@ -10,6 +10,9 @@ Views :name: genre :values: reference +.. meta:: + :description: Understand use cases for read-only views in MongoDB. + .. contents:: On this page :local: :backlinks: none diff --git a/source/core/wiredtiger.txt b/source/core/wiredtiger.txt index ed6634162ac..f4f472149cc 100644 --- a/source/core/wiredtiger.txt +++ b/source/core/wiredtiger.txt @@ -11,6 +11,9 @@ WiredTiger Storage Engine :name: genre :values: reference +.. meta:: + :description: Learn how WiredTiger, MongoDB's default storage engine, works. + .. contents:: On this page :local: :backlinks: none From 8d63816df309dcff21221829e4ba2c09cfd5f012 Mon Sep 17 00:00:00 2001 From: Jordan Smith <45415425+jordan-smith721@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:11:31 -0800 Subject: [PATCH 064/308] DOCSP-35713- Remove group from QE supported aggregation stages (#5920) * remove group from QE supported agg stages * add taxonomy * add group back to list * remove ref to deleted section * clarify group on unencrypted fields --- .gitignore | 2 +- .../reference/supported-operations.txt | 31 +++++-------------- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index c674fa83fcf..bc3bbd949ca 100644 --- a/.gitignore +++ b/.gitignore @@ -85,4 +85,4 @@ primer/source/includes/table-linux-kernel-version-production.yaml venv .vscode changelogs/.mongodb-jira.yaml -source/includes/qe-tutorials/csharp/obj/Debug/ \ No newline at end of file +source/includes/qe-tutorials/csharp/obj/ \ No newline at end of file diff --git a/source/core/queryable-encryption/reference/supported-operations.txt b/source/core/queryable-encryption/reference/supported-operations.txt index d62cccb3b46..a71b130182a 100644 --- a/source/core/queryable-encryption/reference/supported-operations.txt +++ b/source/core/queryable-encryption/reference/supported-operations.txt @@ -4,14 +4,19 @@ Supported Operations for {+qe+} ============================================= -.. default-domain:: mongodb - .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: QE, read operations, write operations + This page documents the specific commands, query operators, update operators, aggregation stages, and aggregation expressions supported for {+qe+} compatible drivers. @@ -225,8 +230,7 @@ aggregation pipeline stages: - :pipeline:`$collStats` - :pipeline:`$count` - :pipeline:`$geoNear` -- :pipeline:`$group` (For usage requirements, see - :ref:`qe-group-behavior`) +- :pipeline:`$group` on unencrypted fields - :pipeline:`$indexStats` - :pipeline:`$limit` - :pipeline:`$lookup` and :pipeline:`$graphLookup` (For usage @@ -253,25 +257,6 @@ Each supported stage must specify only supported :ref:`aggregation expressions `. -.. _qe-group-behavior: - -``$group`` Behavior -~~~~~~~~~~~~~~~~~~~ - -:pipeline:`$group` has the following behaviors specific to {+qe+}. - -``$group`` supports: - -- Grouping on encrypted fields. -- Using :group:`$addToSet` and :group:`$push` accumulators on encrypted - fields. - -``$group`` does not support: - -- Matching on the array returned by :group:`$addToSet` and :group:`$push` - accumulators. -- Arithmetic accumulators on encrypted fields. - .. _qe-csfle-lookup-graphLookup-behavior: ``$lookup`` and ``$graphLookup`` Behavior From a71a838306ac580a98f73ea0b695381e43247998 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:13:35 -0800 Subject: [PATCH 065/308] removing medianKey. TBD: update .TX/config? (#6070) --- draft/commands-locks.txt | 4 ---- source/reference/command.txt | 6 ----- source/reference/command/medianKey.txt | 28 ----------------------- source/reference/command/nav-sharding.txt | 5 ---- source/reference/sharding.txt | 4 ---- 5 files changed, 47 deletions(-) delete mode 100644 source/reference/command/medianKey.txt diff --git a/draft/commands-locks.txt b/draft/commands-locks.txt index 171545fb27b..93f7ac051f3 100644 --- a/draft/commands-locks.txt +++ b/draft/commands-locks.txt @@ -265,10 +265,6 @@ command>` in MongoDB. - - - - * - :dbcommand:`medianKey` - - - - - - * - :dbcommand:`moveChunk` - - diff --git a/source/reference/command.txt b/source/reference/command.txt index 899aa5c0a86..fe7fb8890c4 100644 --- a/source/reference/command.txt +++ b/source/reference/command.txt @@ -676,12 +676,6 @@ Sharding Commands - No support for :atlas:`serverless instances `. - * - :dbcommand:`medianKey` - - - Deprecated internal command. See :dbcommand:`splitVector`. - - - Yes - * - :dbcommand:`moveChunk` - Internal command that migrates chunks between shards. diff --git a/source/reference/command/medianKey.txt b/source/reference/command/medianKey.txt deleted file mode 100644 index 1ef8d6734db..00000000000 --- a/source/reference/command/medianKey.txt +++ /dev/null @@ -1,28 +0,0 @@ -========= -medianKey -========= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -.. dbcommand:: medianKey - - :dbcommand:`medianKey` is an internal command. - - .. slave-ok, read-lock - -Compatibility -------------- - -This command is available in deployments hosted in the following environments: - -.. include:: /includes/fact-environments-atlas-only.rst - -.. include:: /includes/fact-environments-atlas-support-all.rst - -.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/command/nav-sharding.txt b/source/reference/command/nav-sharding.txt index 282d03e3318..5eb22703fc8 100644 --- a/source/reference/command/nav-sharding.txt +++ b/source/reference/command/nav-sharding.txt @@ -128,10 +128,6 @@ Sharding Commands * - :dbcommand:`listShards` - Returns a list of configured shards. - - * - :dbcommand:`medianKey` - - - Deprecated internal command. See :dbcommand:`splitVector`. * - :dbcommand:`moveChunk` @@ -237,7 +233,6 @@ Sharding Commands /reference/command/getShardVersion /reference/command/isdbgrid /reference/command/listShards - /reference/command/medianKey /reference/command/moveChunk /reference/command/movePrimary /reference/command/moveRange diff --git a/source/reference/sharding.txt b/source/reference/sharding.txt index af6c7c1b83b..dbc94e15eee 100644 --- a/source/reference/sharding.txt +++ b/source/reference/sharding.txt @@ -295,10 +295,6 @@ The following database commands support :term:`sharded clusters - Returns a list of configured shards. - * - :dbcommand:`medianKey` - - - Deprecated internal command. See :dbcommand:`splitVector`. - * - :dbcommand:`moveChunk` - Internal command that migrates chunks between shards. From 657d001f59d559c26f246df348efa74d43253dbd Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Tue, 30 Jan 2024 15:47:24 -0500 Subject: [PATCH 066/308] DOCSP-36064 Reword import/export firewall rules (#6076) * DOCSP-36064 Reword import/export firewall rules * add facet * typo * review edits --- .../configure-windows-netsh-firewall.txt | 47 +++++++++++-------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/source/tutorial/configure-windows-netsh-firewall.txt b/source/tutorial/configure-windows-netsh-firewall.txt index 4e204dd9b31..35bfbfbf30f 100644 --- a/source/tutorial/configure-windows-netsh-firewall.txt +++ b/source/tutorial/configure-windows-netsh-firewall.txt @@ -10,6 +10,10 @@ Configure Windows ``netsh`` Firewall for MongoDB :depth: 1 :class: singlecol +.. facet:: + :name: genre + :values: tutorial + On Windows Server systems, the ``netsh`` program provides methods for managing the :guilabel:`Windows Firewall`. These firewall rules make it possible for administrators to control what hosts can connect to the system, @@ -209,16 +213,16 @@ servers, and the :binary:`mongos.exe` instances. .. include:: /includes/fact-deprecated-http-interface.rst -Manage and Maintain *Windows Firewall* Configurations ------------------------------------------------------ +Manage Windows Firewall Configurations +-------------------------------------- This section contains a number of basic operations for managing and using ``netsh``. While you can use the GUI front ends to manage the :guilabel:`Windows Firewall`, all core functionality is accessible is accessible from ``netsh``. -Delete all *Windows Firewall* Rules -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Delete Windows Firewall Rules for Default MongoDB Ports +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To delete the firewall rule allowing :binary:`mongod.exe` traffic: @@ -228,8 +232,8 @@ To delete the firewall rule allowing :binary:`mongod.exe` traffic: netsh advfirewall firewall delete rule name="Open mongod shard port 27018" protocol=tcp localport=27018 -List All *Windows Firewall* Rules -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +List All Windows Firewall Rules +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To return a list of all :guilabel:`Windows Firewall` rules: @@ -237,8 +241,8 @@ To return a list of all :guilabel:`Windows Firewall` rules: netsh advfirewall firewall show rule name=all -Reset *Windows Firewall* -~~~~~~~~~~~~~~~~~~~~~~~~ +Reset Windows Firewall +~~~~~~~~~~~~~~~~~~~~~~ To reset the :guilabel:`Windows Firewall` rules: @@ -246,22 +250,25 @@ To reset the :guilabel:`Windows Firewall` rules: netsh advfirewall reset -Backup and Restore *Windows Firewall* Rules -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Backup and Restore Windows Firewall Rules +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To simplify administration of larger collection of systems, you can export or -import firewall systems from different servers) rules very easily on Windows: +To simplify administration of larger systems, you can export or import +Windows Firewall rules. -Export all firewall rules with the following command: +- To export all Windows Firewall rules, run the following command: -.. code-block:: bat + .. code-block:: bat - netsh advfirewall export "C:\temp\MongoDBfw.wfw" + netsh advfirewall export "C:\temp\MongoDBfw.wfw" -Replace ``"C:\temp\MongoDBfw.wfw"`` with a path of your choosing. You -can use a command in the following form to import a file created using -this operation: + Replace ``"C:\temp\MongoDBfw.wfw"`` with a path of your choosing. -.. code-block:: bat +- To import Windows Firewall rules, run the following command: + + .. code-block:: bat + + netsh advfirewall import "C:\temp\MongoDBfw.wfw" - netsh advfirewall import "C:\temp\MongoDBfw.wfw" + Replace ``"C:\temp\MongoDBfw.wfw"`` with the path to the file that + contains your Windows Firewall rules. From 1be53e52855b37e034ae5076a42fd76887ffec60 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:32:29 -0500 Subject: [PATCH 067/308] DOCS-16614 lookup performance fix (#6080) * DOCS-16614 lookup performance fix: * DOCS-16614 lookup performance fix * DOCS-16614 adding note about source collection * DOCS-16614 adding note about source collection * DOCS-16614 adding admonotion * DOCS-16614 adding admonotion * DOCS-16614 typo * DOCS-16614 fixing format * DOCS-16614 fixing format * DOCS-16614 copy edits * DOCS-16614 copy edits * DOCS-16614 copy edits * DOCS-16614 tech edit * DOCS-16614 tech edit --- source/reference/operator/aggregation/lookup.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/reference/operator/aggregation/lookup.txt b/source/reference/operator/aggregation/lookup.txt index 4129574e643..538a6c1001e 100644 --- a/source/reference/operator/aggregation/lookup.txt +++ b/source/reference/operator/aggregation/lookup.txt @@ -544,11 +544,14 @@ different ``$lookup`` operations. - .. _equality-match-performance: - ``$lookup`` operations that perform equality matches with a - single join typically perform better when the source collection - contains an index on the ``localField``. + single join perform better when the foreign collection contains + an index on the ``foreignField``. - - An index on the ``foreignField`` in the foreign collection - cannot support an equality match with a single join. + .. important:: + + If a supporting index on the ``foreignField`` does not + exist, a ``$lookup`` operation that performs an equality + match with a single join will likely have poor performance. * - :ref:`Uncorrelated Subqueries ` @@ -574,10 +577,7 @@ different ``$lookup`` operations. - .. _correlated-subqueries-performance: - ``$lookup`` operations that contain correlated subqueries - typically perform better when the following conditions apply: - - - The source collection contains an index on the - ``localField``. + perform better when the following conditions apply: - The foreign collection contains an index on the ``foreignField``. From 86d4ee737830fa67f47f7c215670349a1b6ee9bf Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:39:37 -0600 Subject: [PATCH 068/308] DOCSP-35870 Atlas support for Role Management methods (#6075) Co-authored-by: pierwill --- source/reference/method/db.dropAllRoles.txt | 15 +++++++++++++++ .../reference/method/db.grantPrivilegesToRole.txt | 15 +++++++++++++++ source/reference/method/db.grantRolesToRole.txt | 15 +++++++++++++++ .../method/db.revokePrivilegesFromRole.txt | 14 ++++++++++++++ .../reference/method/db.revokeRolesFromRole.txt | 15 +++++++++++++++ source/reference/method/db.updateRole.txt | 15 +++++++++++++++ 6 files changed, 89 insertions(+) diff --git a/source/reference/method/db.dropAllRoles.txt b/source/reference/method/db.dropAllRoles.txt index bcccb8de08f..4b3c05b9c89 100644 --- a/source/reference/method/db.dropAllRoles.txt +++ b/source/reference/method/db.dropAllRoles.txt @@ -49,6 +49,21 @@ Definition .. |local-cmd-name| replace:: :method:`db.dropAllRoles()` + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Behavior -------- diff --git a/source/reference/method/db.grantPrivilegesToRole.txt b/source/reference/method/db.grantPrivilegesToRole.txt index 53f0a09de3c..7d90dc86515 100644 --- a/source/reference/method/db.grantPrivilegesToRole.txt +++ b/source/reference/method/db.grantPrivilegesToRole.txt @@ -64,6 +64,21 @@ Definition .. |local-cmd-name| replace:: :method:`db.grantPrivilegesToRole()` + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Behavior -------- diff --git a/source/reference/method/db.grantRolesToRole.txt b/source/reference/method/db.grantRolesToRole.txt index fec555f9a58..54b0b780fcf 100644 --- a/source/reference/method/db.grantRolesToRole.txt +++ b/source/reference/method/db.grantRolesToRole.txt @@ -50,6 +50,21 @@ Definition .. |local-cmd-name| replace:: :method:`db.grantRolesToRole()` .. include:: /includes/fact-roles-array-contents.rst + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Behavior -------- diff --git a/source/reference/method/db.revokePrivilegesFromRole.txt b/source/reference/method/db.revokePrivilegesFromRole.txt index 1dd088d0462..839c8b776d4 100644 --- a/source/reference/method/db.revokePrivilegesFromRole.txt +++ b/source/reference/method/db.revokePrivilegesFromRole.txt @@ -58,6 +58,20 @@ Definition - .. include:: /includes/fact-write-concern-spec-link.rst +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Behavior -------- diff --git a/source/reference/method/db.revokeRolesFromRole.txt b/source/reference/method/db.revokeRolesFromRole.txt index 56529aad112..e1ea51c9d00 100644 --- a/source/reference/method/db.revokeRolesFromRole.txt +++ b/source/reference/method/db.revokeRolesFromRole.txt @@ -49,6 +49,21 @@ Definition .. |local-cmd-name| replace:: :method:`db.revokeRolesFromRole()` .. include:: /includes/fact-roles-array-contents.rst + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Behavior -------- diff --git a/source/reference/method/db.updateRole.txt b/source/reference/method/db.updateRole.txt index ac61c516f9b..5161567918a 100644 --- a/source/reference/method/db.updateRole.txt +++ b/source/reference/method/db.updateRole.txt @@ -139,6 +139,21 @@ Definition The :method:`db.updateRole()` method wraps the :dbcommand:`updateRole` command. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Roles ~~~~~ From 96939fad8a8a7b80eeed254c5862f95392197b23 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Wed, 31 Jan 2024 09:55:05 -0800 Subject: [PATCH 069/308] Clarify that english is the default; add reference for more info (#6081) * Clarify that english is the default; add refernce for more info * update references * links can not start with $ * how many times can I mess up a ref? --- .../create-text-index-multiple-languages.txt | 10 +++++++++- source/reference/command/createIndexes.txt | 7 ++++--- source/reference/operator/query/text.txt | 5 ++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/source/core/indexes/index-types/index-text/specify-language-text-index/create-text-index-multiple-languages.txt b/source/core/indexes/index-types/index-text/specify-language-text-index/create-text-index-multiple-languages.txt index db25838c63b..8ea718dc607 100644 --- a/source/core/indexes/index-types/index-text/specify-language-text-index/create-text-index-multiple-languages.txt +++ b/source/core/indexes/index-types/index-text/specify-language-text-index/create-text-index-multiple-languages.txt @@ -93,7 +93,15 @@ The following operation creates a text index on the ``original`` and .. code-block:: javascript - db.quotes.createIndex( { original: "text", "translation.quote": "text" } ) + db.quotes.createIndex({ original: "text", "translation.quote": "text", "default_language" : "fr" }) + +.. note:: + + English is the default language for indexes. If you do not specify the + :ref:`default_language `, your query must + specify the language with the :ref:`$language ` parameter. + For more information, refer to :ref:``. + Results ------- diff --git a/source/reference/command/createIndexes.txt b/source/reference/command/createIndexes.txt index 4c2772b1e53..986980bf7fd 100644 --- a/source/reference/command/createIndexes.txt +++ b/source/reference/command/createIndexes.txt @@ -310,13 +310,14 @@ Each document in the ``indexes`` array can take the following fields: :ref:`control-text-search-results` to adjust the scores. The default value is ``1``. - - + * - ``default_language`` - string - - Optional. For :ref:`text ` indexes, the language that + - .. _createIndexes-default-language: + + Optional. For :ref:`text ` indexes, the language that determines the list of stop words and the rules for the stemmer and tokenizer. See :ref:`text-search-languages` for the available languages and diff --git a/source/reference/operator/query/text.txt b/source/reference/operator/query/text.txt index 299efaa0532..fffc501b42b 100644 --- a/source/reference/operator/query/text.txt +++ b/source/reference/operator/query/text.txt @@ -75,7 +75,10 @@ following fields: * - ``$language`` - string - - Optional. The language that determines the list of stop words for the search and + + - .. _language-field: + + Optional. The language that determines the list of stop words for the search and the rules for the stemmer and tokenizer. If not specified, the search uses the default language of the index. For supported languages, see :ref:`text-search-languages`. From f95ab1ec2cbb847b7214d9f2845da71ceb272e0b Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Wed, 31 Jan 2024 09:55:19 -0800 Subject: [PATCH 070/308] add closing paren (#6107) --- source/reference/glossary.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/reference/glossary.txt b/source/reference/glossary.txt index a0bb89c95d3..529b58c5e03 100644 --- a/source/reference/glossary.txt +++ b/source/reference/glossary.txt @@ -1108,7 +1108,8 @@ Glossary :binary:`~bin.mongosh`) for initial discovery of the replica set configuration. Seed lists can be provided as a list of ``host:port`` pairs (see :ref:`connections-standard-connection-string-format` - or through DNS entries. For more information, see :ref:`connections-dns-seedlist`. + or through DNS entries.) For more information, + see :ref:`connections-dns-seedlist`. set name The arbitrary name given to a replica set. All members of a From 39ed9bfbad51a6505953bd9d3875e9785226d6e6 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:10:42 -0800 Subject: [PATCH 071/308] Change occurrences of ID== to IA== (#6077) * change occurrences of ID== to IA== * Update source/reference/operator/query/bitsAllClear.txt Co-authored-by: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> * change MC== to MA== --------- Co-authored-by: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> --- source/reference/operator/query/bitsAllClear.txt | 6 +++--- source/reference/operator/query/bitsAllSet.txt | 4 ++-- source/reference/operator/query/bitsAnyClear.txt | 4 ++-- source/reference/operator/query/bitsAnySet.txt | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/source/reference/operator/query/bitsAllClear.txt b/source/reference/operator/query/bitsAllClear.txt index 862794ae2e2..edccc53d0c8 100644 --- a/source/reference/operator/query/bitsAllClear.txt +++ b/source/reference/operator/query/bitsAllClear.txt @@ -84,13 +84,13 @@ The following query uses the :query:`$bitsAllClear` operator: .. code-block:: javascript - db.collection.find( { a: { $bitsAllClear: BinData(0, "ID==") } } ) + db.collection.find( { a: { $bitsAllClear: BinData(0, "IA==") } } ) The query: - Specifies ``0`` as the first value for :bsontype:`BinData - `, which indicates ``ID==`` is to be interpreted as - binary. The base-64 value ``ID==`` in binary is ``00100000``, which + `, which indicates ``IA==`` should be interpreted as + binary. The base-64 value ``IA==`` in binary is ``00100000``, which has ``1`` in position 5. - Uses :query:`$bitsAllClear` to return documents where the ``a`` field diff --git a/source/reference/operator/query/bitsAllSet.txt b/source/reference/operator/query/bitsAllSet.txt index a86a4ecfa05..b1f1b5431e0 100644 --- a/source/reference/operator/query/bitsAllSet.txt +++ b/source/reference/operator/query/bitsAllSet.txt @@ -81,11 +81,11 @@ BinData Bitmask The following query uses the :query:`$bitsAllSet` operator to test whether field ``a`` has bits set at positions ``4`` and ``5`` -(the binary representation of ``BinData(0, "MC==")`` is ``00110000``). +(the binary representation of ``BinData(0, "MA==")`` is ``00110000``). .. code-block:: javascript - db.collection.find( { a: { $bitsAllSet: BinData(0, "MC==") } } ) + db.collection.find( { a: { $bitsAllSet: BinData(0, "MA==") } } ) The query matches the following document: diff --git a/source/reference/operator/query/bitsAnyClear.txt b/source/reference/operator/query/bitsAnyClear.txt index c84297fad31..9f065f365db 100644 --- a/source/reference/operator/query/bitsAnyClear.txt +++ b/source/reference/operator/query/bitsAnyClear.txt @@ -83,11 +83,11 @@ BinData Bitmask ~~~~~~~~~~~~~~~ The following query uses the :query:`$bitsAnyClear` operator to test whether field ``a`` has any bits clear at positions ``4`` and ``5`` -(the binary representation of ``BinData(0, "MC==")`` is ``00110000``). +(the binary representation of ``BinData(0, "MA==")`` is ``00110000``). .. code-block:: javascript - db.collection.find( { a: { $bitsAnyClear: BinData(0, "MC==") } } ) + db.collection.find( { a: { $bitsAnyClear: BinData(0, "MA==") } } ) The query matches the following documents: diff --git a/source/reference/operator/query/bitsAnySet.txt b/source/reference/operator/query/bitsAnySet.txt index 8c62434be1f..a7d87277f5c 100644 --- a/source/reference/operator/query/bitsAnySet.txt +++ b/source/reference/operator/query/bitsAnySet.txt @@ -82,11 +82,11 @@ BinData Bitmask The following query uses the :query:`$bitsAnySet` operator to test whether field ``a`` has any bits set at positions ``4``, and ``5`` -(the binary representation of ``BinData(0, "MC==")`` is ``00110000``). +(the binary representation of ``BinData(0, "MA==")`` is ``00110000``). .. code-block:: javascript - db.collection.find( { a: { $bitsAnySet: BinData(0, "MC==") } } ) + db.collection.find( { a: { $bitsAnySet: BinData(0, "MA==") } } ) The query matches the following documents: From cf2ec15f6e5d7ba48d89d736129f87ec408623d5 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 31 Jan 2024 14:46:43 -0600 Subject: [PATCH 072/308] DOCSP-35871 Atlas support for Query Plan Cache methods (#6116) * DOCSP-35871 Atlas support for Query Plan Cache methods * Rm whitespace --------- Co-authored-by: pierwill --- source/reference/method/db.collection.find.txt | 10 ++++++++-- .../reference/method/db.collection.findAndModify.txt | 12 +++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/source/reference/method/db.collection.find.txt b/source/reference/method/db.collection.find.txt index d2f8f88279d..03d8d5bd28b 100644 --- a/source/reference/method/db.collection.find.txt +++ b/source/reference/method/db.collection.find.txt @@ -35,9 +35,15 @@ Definition Compatibility ------------- -.. |operator-method| replace:: ``db.collection.find()`` +.. |command| replace:: method -.. include:: /includes/fact-compatibility.rst +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-limited-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/method/db.collection.findAndModify.txt b/source/reference/method/db.collection.findAndModify.txt index 33b46af0210..cd27cf81185 100644 --- a/source/reference/method/db.collection.findAndModify.txt +++ b/source/reference/method/db.collection.findAndModify.txt @@ -29,14 +29,20 @@ Definition Modifies and returns a single document. By default, the returned document does not include the modifications made on the update. To return the document with the modifications made on the update, use - the ``new`` option. + the ``new`` option. Compatibility ------------- -.. |operator-method| replace:: ``db.collection.findAndModify()`` +.. |command| replace:: method -.. include:: /includes/fact-compatibility.rst +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ From e190eefbd8495bae8391348ce0a19d183cca5493 Mon Sep 17 00:00:00 2001 From: Sarah Olson <98367156+sarah-olson-mongodb@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:39:08 -0800 Subject: [PATCH 073/308] Docsp 35998 -- New constant for current rapid releases (#6131) * DOCSP-35998: New constant * DOCSP-35998: Testing * DOCSP-35998: Fix --- snooty.toml | 1 + source/includes/rapid-release-short.rst | 4 ++-- source/includes/rapid-release.rst | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/snooty.toml b/snooty.toml index 5035537806f..9989f7b6df0 100644 --- a/snooty.toml +++ b/snooty.toml @@ -266,6 +266,7 @@ package-name-org = "mongodb-org" package-name-enterprise = "mongodb-enterprise" package-name = "mongodb" version = "7.3" +current-rapid-release = "7.2" latest-lts-version = "7.0" last-supported-version = "5.0" release = "7.2.0" diff --git a/source/includes/rapid-release-short.rst b/source/includes/rapid-release-short.rst index c8d47517e84..d87e480962c 100644 --- a/source/includes/rapid-release-short.rst +++ b/source/includes/rapid-release-short.rst @@ -1,6 +1,6 @@ .. important:: - MongoDB |version| is a rapid release and is only supported for - MongoDB Atlas. MongoDB |version| is not supported for use + MongoDB {+current-rapid-release+} is a rapid release and is only supported for + MongoDB Atlas. MongoDB {+current-rapid-release+} is not supported for use on-premises. For more information, see :ref:`release-version-numbers`. diff --git a/source/includes/rapid-release.rst b/source/includes/rapid-release.rst index f3f2e281570..337848face7 100644 --- a/source/includes/rapid-release.rst +++ b/source/includes/rapid-release.rst @@ -1,7 +1,7 @@ .. important:: - MongoDB |version| is a rapid release and is only supported for - MongoDB Atlas. MongoDB |version| is not supported for use + MongoDB {+current-rapid-release+} is a rapid release and is only supported for + MongoDB Atlas. MongoDB {+current-rapid-release+} is not supported for use on-premises. For more information, see :ref:`release-version-numbers`. From 0d758fd01c37726f80e616bcc766288a0225a002 Mon Sep 17 00:00:00 2001 From: Sarah Olson <98367156+sarah-olson-mongodb@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:25:10 -0800 Subject: [PATCH 074/308] DOCSP-33602: Deleted 1.x release notes from repo (#6136) * DOCSP-33602: Deleted 1.x release notes from repo * DOCSP-33602: Some additional fixes --- source/release-notes/1.2.txt | 79 ---- source/release-notes/1.4.txt | 105 ----- source/release-notes/1.6.txt | 123 ------ source/release-notes/1.8.txt | 412 ------------------ source/release-notes/2.0.txt | 4 +- source/release-notes/2.2.txt | 4 +- source/release-notes/2.4-changelog.txt | 4 +- source/release-notes/2.4-index-types.txt | 2 + .../2.6-upgrade-authorization.txt | 4 +- source/release-notes/2.6.txt | 4 +- source/release-notes/3.0-scram.txt | 4 +- source/release-notes/3.0.txt | 4 +- source/release-notes/3.2-upgrade.txt | 4 +- source/release-notes/3.2.txt | 4 +- .../release-notes/3.4-upgrade-replica-set.txt | 4 +- .../3.4-upgrade-sharded-cluster.txt | 4 +- .../release-notes/3.4-upgrade-standalone.txt | 4 +- source/release-notes/3.4.txt | 4 +- .../release-notes/3.6-upgrade-replica-set.txt | 4 +- .../3.6-upgrade-sharded-cluster.txt | 4 +- .../release-notes/3.6-upgrade-standalone.txt | 4 +- source/release-notes/3.6.txt | 4 +- .../release-notes/4.0-upgrade-replica-set.txt | 4 +- .../4.0-upgrade-sharded-cluster.txt | 4 +- .../release-notes/4.0-upgrade-standalone.txt | 4 +- source/release-notes/4.0.txt | 4 +- .../release-notes/4.2-upgrade-replica-set.txt | 4 +- .../release-notes/4.2-upgrade-standalone.txt | 4 +- source/release-notes/4.2.txt | 4 +- 29 files changed, 50 insertions(+), 767 deletions(-) delete mode 100644 source/release-notes/1.2.txt delete mode 100644 source/release-notes/1.4.txt delete mode 100644 source/release-notes/1.6.txt delete mode 100644 source/release-notes/1.8.txt diff --git a/source/release-notes/1.2.txt b/source/release-notes/1.2.txt deleted file mode 100644 index 23256a4b52f..00000000000 --- a/source/release-notes/1.2.txt +++ /dev/null @@ -1,79 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -.. _release-notes-1.2: - -=============================== -Release Notes for MongoDB 1.2.x -=============================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -New Features ------------- - -- More indexes per collection - -- Faster index creation - -- Map/Reduce - -- Stored JavaScript functions - -- Configurable fsync time - -- Several small features and fixes - -DB Upgrade Required -------------------- - -There are some changes that will require doing an upgrade if your -previous version is <= 1.0.x. If you're already using a version >= 1.1.x -then these changes aren't required. There are 2 ways to do it: - -- ``--upgrade`` - - - stop your :binary:`~bin.mongod` process - - - run ``./mongod --upgrade`` - - - start :binary:`~bin.mongod` again - -- use a slave - - - start a slave on a different port and data directory - - - when its synced, shut down the master, and start the new slave on - the regular port. - -Ask in the forums or IRC for more help. - -Replication Changes -------------------- - -- There have been minor changes in replication. If you are upgrading a - master/slave setup from <= 1.1.2 you have to update the slave first. - -mongoimport ------------ - -- ``mongoimportjson`` has been removed and is replaced with - :binary:`~bin.mongoimport` that can do json/csv/tsv - -field filter changing ---------------------- - -- We've changed the semantics of the field filter a little bit. - Previously only objects with those fields would be returned. Now the - field filter only changes the output, not which objects are returned. - If you need that behavior, you can use :doc:`$exists ` diff --git a/source/release-notes/1.4.txt b/source/release-notes/1.4.txt deleted file mode 100644 index bf6bf5cf174..00000000000 --- a/source/release-notes/1.4.txt +++ /dev/null @@ -1,105 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - - .. _release-notes-1.4: - -============================= -Release Notes for MongoDB 1.4 -============================= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Upgrading ---------- - -We're pleased to announce the 1.4 release of MongoDB. 1.4 is a drop-in -replacement for 1.2. To upgrade you just need to shutdown -:binary:`~bin.mongod`, then restart with the new binaries. (Users upgrading -from release 1.0 should review the :ref:`1.2 release notes `, -in particular the instructions for upgrading the DB format.) - -Release 1.4 includes the following improvements over release 1.2: - -Core Server Enhancements ------------------------- - -- :ref:`concurrency ` improvements - -- indexing memory improvements - -- :ref:`background index creation ` - -- better detection of regular expressions so the index can be used in - more cases - -Replication and Sharding ------------------------- - -- better handling for restarting slaves offline for a while - -- fast new slaves from snapshots (``--fastsync``) - -- configurable slave delay (``--slavedelay``) - -- replication handles clock skew on master - -- :update:`$inc` replication fixes - -- sharding alpha 3 - notably 2-phase commit on config servers - -Deployment and Production -------------------------- - -- :ref:`configure "slow threshold" for profiling ` - -- ability to do :dbcommand:`fsync + lock ` for backing up raw files - -- option for separate directory per db (``--directoryperdb``) - -- ``http://localhost:28017/_status`` to get serverStatus via http - -- REST interface is off by default for security (``--rest`` to enable) - -- can rotate logs with a db command, :doc:`logRotate ` - -- enhancements to :dbcommand:`serverStatus` command - (db.serverStatus()) - counters and :ref:`replication lag - ` stats - -- new :binary:`~bin.mongostat` tool - -Query Language Improvements ---------------------------- - -- :query:`$all` with regex - -- :query:`$not` - -- partial matching of array elements :query:`$elemMatch` - -- $ operator for updating arrays - -- :update:`$addToSet` - -- :update:`$unset` - -- :update:`$pull` supports object matching - -- :update:`$set` with array indexes - -Geo ---- - -- :ref:`2d geospatial search <2d-index-internals>` - -- geo :query:`$center` and :query:`$box` searches diff --git a/source/release-notes/1.6.txt b/source/release-notes/1.6.txt deleted file mode 100644 index 38e0920cd09..00000000000 --- a/source/release-notes/1.6.txt +++ /dev/null @@ -1,123 +0,0 @@ -.. _release-notes-1.6: - -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -============================= -Release Notes for MongoDB 1.6 -============================= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Upgrading ---------- - -MongoDB 1.6 is a drop-in replacement for 1.4. To upgrade, simply -shutdown :binary:`~bin.mongod` then restart with the new binaries. - -*Please note that you should upgrade to the latest version of whichever -driver you're using. Certain drivers, including the Ruby driver, will -require the upgrade, and all the drivers will provide extra features for -connecting to replica sets.* - -Sharding --------- - -:doc:`/sharding` is now production-ready, making MongoDB horizontally -scalable, with no single point of failure. A single instance of -:binary:`~bin.mongod` can now be upgraded to a distributed cluster with zero -downtime when the need arises. - -- :doc:`/sharding` - -- :doc:`/tutorial/deploy-shard-cluster` - -- :doc:`/tutorial/convert-replica-set-to-replicated-shard-cluster` - -Replica Sets ------------- - -:ref:`Replica Sets `, which provide automated failover -among a cluster of ``n`` nodes, are also now available. - -Please note that replica pairs are now deprecated; we strongly recommend -that replica pair users upgrade to replica sets. - -- :doc:`/replication` - -- :doc:`/tutorial/deploy-replica-set` - -- :doc:`/tutorial/convert-standalone-to-replica-set` - -Other Improvements ------------------- - -- The ``w`` option (and ``wtimeout``) forces writes to be propagated to ``n`` - servers before returning success (this works especially well with - replica sets) - -- :doc:`$or queries ` - -- Improved concurrency - -- :doc:`$slice ` operator for returning - subsets of arrays - -- 64 indexes per collection (formerly 40 indexes per collection) - -- 64-bit integers can now be represented in the shell using NumberLong - -- The :dbcommand:`findAndModify` command - now supports upserts. It also allows you to specify fields to return - -- $showDiskLoc option to see disk location of a document - -- Support for IPv6 and UNIX domain sockets - -Installation ------------- - -- Windows service improvements - -- The C++ client is a separate tarball from the binaries - -1.6.x Release Notes -------------------- - -- `1.6.5 `_ - -1.5.x Release Notes -------------------- - -- `1.5.8 `_ - -- `1.5.7 `_ - -- `1.5.6 `_ - -- `1.5.5 `_ - -- `1.5.4 `_ - -- `1.5.3 `_ - -- `1.5.2 `_ - -- `1.5.1 `_ - -- `1.5.0 `_ - -You can see a full list of all changes on -`JIRA `_. - -Thank you everyone for your support and suggestions! diff --git a/source/release-notes/1.8.txt b/source/release-notes/1.8.txt deleted file mode 100644 index b5e336bc25a..00000000000 --- a/source/release-notes/1.8.txt +++ /dev/null @@ -1,412 +0,0 @@ -.. _release-notes-1.8: - -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -============================= -Release Notes for MongoDB 1.8 -============================= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Upgrading ---------- - -MongoDB 1.8 is a standard, incremental production release and works as -a drop-in replacement for MongoDB 1.6, except: - -- :term:`Replica set ` members should be upgraded in a - particular order, as described in :ref:`1.8-upgrade-replica-set`. - -- The :dbcommand:`mapReduce` command has changed in 1.8, causing - incompatibility with previous releases. :dbcommand:`mapReduce` no - longer generates temporary collections (thus, ``keepTemp`` has been - removed). Now, you must always supply a value for ``out``. See the - ``out`` field options in the :dbcommand:`mapReduce` document. If you - use MapReduce, this also likely means you need a recent version of - your client driver. - -Preparation -~~~~~~~~~~~ - -Read through all release notes before upgrading and ensure that no -changes will affect your deployment. - -.. _1.8-upgrade-standalone: - -Upgrading a Standalone ``mongod`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -1. Download the v1.8.x binaries from the `MongoDB Download Page`_. - -#. Shutdown your :binary:`~bin.mongod` instance. - -#. Replace the existing binary with the 1.8.x :binary:`~bin.mongod` binary. - -#. Restart MongoDB. - -.. _`MongoDB Download Page`: http://downloads.mongodb.org/ - -.. _1.8-upgrade-replica-set: - -Upgrading a Replica Set -~~~~~~~~~~~~~~~~~~~~~~~ - -1.8.x :term:`secondaries ` **can** replicate from 1.6.x -:term:`primaries `. - -1.6.x secondaries **cannot** replicate from 1.8.x primaries. - -Thus, to upgrade a :term:`replica set` you must replace all of your -secondaries first, then the primary. - -For example, suppose you have a replica set with a primary, an -:term:`arbiter` and several secondaries. To upgrade the set, do the -following: - -1. For the arbiter: - - a. Shut down the arbiter. - - #. Restart it with the 1.8.x binary from the `MongoDB Download Page`_. - -#. Change your config (optional) to prevent election of a new primary. - - It is possible that, when you start shutting down members of the set, - a new primary will be elected. To prevent this, you can give - all of the secondaries a priority of ``0`` before - upgrading, and then change them back afterwards. To do so: - - a. Record your current config. Run :method:`rs.config()` and paste the - results into a text file. - - #. Update your config so that all secondaries have - priority ``0``. For example: - - .. code-block:: javascript - - config = rs.conf() - { - "_id" : "foo", - "version" : 3, - "members" : [ - { - "_id" : 0, - "host" : "ubuntu:27017" - }, - { - "_id" : 1, - "host" : "ubuntu:27018" - }, - { - "_id" : 2, - "host" : "ubuntu:27019", - "arbiterOnly" : true - } - { - "_id" : 3, - "host" : "ubuntu:27020" - }, - { - "_id" : 4, - "host" : "ubuntu:27021" - }, - ] - } - config.version++ - 3 - rs.isMaster() - { - "setName" : "foo", - "ismaster" : false, - "secondary" : true, - "hosts" : [ - "ubuntu:27017", - "ubuntu:27018" - ], - "arbiters" : [ - "ubuntu:27019" - ], - "primary" : "ubuntu:27018", - "ok" : 1 - } - // for each secondary - config.members[0].priority = 0 - config.members[3].priority = 0 - config.members[4].priority = 0 - rs.reconfig(config) - -#. For each secondary: - - a. Shut down the secondary. - - #. Restart it with the 1.8.x binary from the `MongoDB Download Page`_. - -#. If you changed the config, change it back to its original state: - - .. code-block:: javascript - - config = rs.conf() - config.version++ - config.members[0].priority = 1 - config.members[3].priority = 1 - config.members[4].priority = 1 - rs.reconfig(config) - -#. Shut down the primary (the final 1.6 server), and then restart it - with the 1.8.x binary from the `MongoDB Download Page`_. - -.. _1.8-upgrade-shard-cluster: -.. _1.8-upgrade-sharded-cluster: - -Upgrading a Sharded Cluster -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -1. Turn off the balancer: - - .. code-block:: javascript - - mongo - use config - db.settings.update({_id:"balancer"},{$set : {stopped:true}}, true) - -#. For each :term:`shard`: - - - If the shard is a :term:`replica set`, follow the directions above for - :ref:`1.8-upgrade-replica-set`. - - - If the shard is a single :binary:`~bin.mongod` process, shut it down - and then restart it with the 1.8.x binary from the `MongoDB Download Page`_. - -#. For each :binary:`~bin.mongos`: - - a. Shut down the :binary:`~bin.mongos` process. - - #. Restart it with the 1.8.x binary from the `MongoDB Download Page`_. - -#. For each config server: - - a. Shut down the config server process. - - #. Restart it with the 1.8.x binary from the `MongoDB Download Page`_. - -#. Turn on the balancer: - - .. code-block:: javascript - - use config - db.settings.update({_id:"balancer"},{$set : {stopped:false}}) - -Returning to 1.6 -~~~~~~~~~~~~~~~~ - -If for any reason you must move back to 1.6, follow the steps above in -reverse. Please be careful that you have not inserted any documents -larger than 4MB while running on 1.8 (where the max size has increased -to 16MB). If you have you will get errors when the server tries to read -those documents. - -Journaling -`````````` - -Returning to 1.6 after using 1.8 -:ref:`Journaling ` works -fine, as journaling does not change anything about the data file format. -Suppose you are running 1.8.x with journaling enabled and you decide to -switch back to 1.6. There are two scenarios: - -- If you shut down cleanly with 1.8.x, just restart with the 1.6 mongod - binary. - -- If 1.8.x shut down uncleanly, start 1.8.x up again and let the journal - files run to fix any damage (incomplete writes) that may have existed - at the crash. Then shut down 1.8.x cleanly and restart with the 1.6 - mongod binary. - -Changes -------- - -Journaling -~~~~~~~~~~ - -MongoDB now supports write-ahead :doc:`/core/journaling` to -facilitate fast crash recovery and durability in the storage engine. -With journaling enabled, a :binary:`~bin.mongod` can be quickly restarted -following a crash without needing to repair the :term:`collections -`. An aggregation pipeline makes it possible to do -aggregation. - -Sparse and Covered Indexes -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:ref:`Sparse Indexes ` are indexes that only include -documents that contain the fields specified in the index. Documents -missing the field will not appear in the index at all. This can -significantly reduce index size for indexes of fields that contain only a -subset of documents within a :term:`collection`. - -:ref:`Covered Indexes ` enable MongoDB to answer -queries entirely from the index when the query only selects fields -that the index contains. - -Incremental MapReduce Support -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The :dbcommand:`mapReduce` command supports new options that enable -incrementally updating existing :term:`collections `. -Previously, a MapReduce job could output either to a temporary -collection or to a named permanent collection, which it would overwrite -with new data. - -You now have several options for the output of your MapReduce jobs: - -- You can merge MapReduce output into an existing collection. Output - from the Reduce phase will replace existing keys in the output - collection if it already exists. Other keys will remain in the - collection. - -- You can now re-reduce your output with the contents of an existing - collection. Each key output by the reduce phase will be reduced with - the existing document in the output collection. - -- You can replace the existing output collection with the new results of - the MapReduce job (equivalent to setting a permanent output - collection in previous releases) - -- You can compute MapReduce inline and return results to the caller - without persisting the results of the job. This is similar to the - temporary collections generated in previous releases, except results - are limited to 8MB. - -For more information, see the ``out`` field options in the -:dbcommand:`mapReduce` document. - -Additional Changes and Enhancements -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -1.8.1 -````` - -- Sharding migrate fix when moving larger chunks. - -- Durability fix with background indexing. - -- Fixed mongos concurrency issue with many incoming connections. - -1.8.0 -````` - -- All changes from 1.7.x series. - -1.7.6 -````` - -- Bug fixes. - -1.7.5 -````` -- :ref:`Journaling `. - -- Extent allocation improvements. - -- Improved :term:`replica set` connectivity for :binary:`~bin.mongos`. - -- ``getLastError`` improvements for :term:`sharding`. - -1.7.4 -````` - -- :binary:`~bin.mongos` routes ``slaveOk`` queries to :term:`secondaries - ` in :term:`replica sets `. - -- New :dbcommand:`mapReduce` output options. - -- :ref:`index-type-sparse`. - -1.7.3 -````` - -- Initial :ref:`covered index ` support. - -- Distinct can use data from indexes when possible. - -- :dbcommand:`mapReduce` can merge or reduce results into an existing collection. - -- :binary:`~bin.mongod` tracks and :binary:`~bin.mongostat` displays network usage. See :ref:`mongostat`. - -- Sharding stability improvements. - -1.7.2 -````` - -- :update:`$rename` operator allows renaming of fields in a document. - -- ``db.eval()`` not to block. - -- Geo queries with sharding. - -- ``mongostat --discover`` option - -- Chunk splitting enhancements. - -- Replica sets network enhancements for servers behind a nat. - -1.7.1 -````` - -- Many sharding performance enhancements. - -- Better support for :projection:`$elemMatch` on primitives in embedded arrays. - -- Query optimizer enhancements on range queries. - -- Window service enhancements. - -- Replica set setup improvements. - -- :update:`$pull` works on primitives in arrays. - -1.7.0 -````` - -- Sharding performance improvements for heavy insert loads. - -- Slave delay support for replica sets. - -- ``local.system.replset.settings.getLastErrorDefaults`` for replica sets. - -- Auto completion in the shell. - -- Spherical distance for geo search. - -- All fixes from 1.6.1 and 1.6.2. - -Release Announcement Forum Pages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `1.8.1 `_, - `1.8.0 `_ - -- `1.7.6 `_, - `1.7.5 `_, - `1.7.4 `_, - `1.7.3 `_, - `1.7.2 `_, - `1.7.1 `_, - `1.7.0 `_ - -Resources ---------- - -- `MongoDB Downloads `_ -- `All JIRA Issues resolved in 1.8 `_ diff --git a/source/release-notes/2.0.txt b/source/release-notes/2.0.txt index b9f929e6468..55cde56f14d 100644 --- a/source/release-notes/2.0.txt +++ b/source/release-notes/2.0.txt @@ -1,5 +1,3 @@ -.. _release-notes-2.0: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-2.0: + ============================= Release Notes for MongoDB 2.0 ============================= diff --git a/source/release-notes/2.2.txt b/source/release-notes/2.2.txt index 8a7fcfec2e1..a66131a8787 100644 --- a/source/release-notes/2.2.txt +++ b/source/release-notes/2.2.txt @@ -1,5 +1,3 @@ -.. _release-notes-2.2: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-2.2: + ============================= Release Notes for MongoDB 2.2 ============================= diff --git a/source/release-notes/2.4-changelog.txt b/source/release-notes/2.4-changelog.txt index 6802066d714..d4019358130 100644 --- a/source/release-notes/2.4-changelog.txt +++ b/source/release-notes/2.4-changelog.txt @@ -1,5 +1,3 @@ -.. _release-notes-2.4: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-2.4: + ============= 2.4 Changelog ============= diff --git a/source/release-notes/2.4-index-types.txt b/source/release-notes/2.4-index-types.txt index 3efd81efade..3e8cd23dbc7 100644 --- a/source/release-notes/2.4-index-types.txt +++ b/source/release-notes/2.4-index-types.txt @@ -5,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-2.4: + =================================================== Compatibility and Index Type Changes in MongoDB 2.4 =================================================== diff --git a/source/release-notes/2.6-upgrade-authorization.txt b/source/release-notes/2.6-upgrade-authorization.txt index b0c5990cc34..9546851c670 100644 --- a/source/release-notes/2.6-upgrade-authorization.txt +++ b/source/release-notes/2.6-upgrade-authorization.txt @@ -1,5 +1,3 @@ -.. _2.6-upgrade-authorization-model: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _2.6-upgrade-authorization-model: + ============================================= Upgrade User Authorization Data to 2.6 Format ============================================= diff --git a/source/release-notes/2.6.txt b/source/release-notes/2.6.txt index 9f9f1d05e0e..eacfb103019 100644 --- a/source/release-notes/2.6.txt +++ b/source/release-notes/2.6.txt @@ -1,5 +1,3 @@ -.. _release-notes-2.6: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-2.6: + ============================= Release Notes for MongoDB 2.6 ============================= diff --git a/source/release-notes/3.0-scram.txt b/source/release-notes/3.0-scram.txt index ccc1455d07a..bbfd930d0b6 100644 --- a/source/release-notes/3.0-scram.txt +++ b/source/release-notes/3.0-scram.txt @@ -1,5 +1,3 @@ -.. _3.0-scram: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _3.0-scram: + ================ Upgrade to SCRAM ================ diff --git a/source/release-notes/3.0.txt b/source/release-notes/3.0.txt index 90a14e21526..4c83228ad16 100644 --- a/source/release-notes/3.0.txt +++ b/source/release-notes/3.0.txt @@ -1,5 +1,3 @@ -.. _release-notes-3.0: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-3.0: + ============================= Release Notes for MongoDB 3.0 ============================= diff --git a/source/release-notes/3.2-upgrade.txt b/source/release-notes/3.2-upgrade.txt index 275d9527245..58d262799ab 100644 --- a/source/release-notes/3.2-upgrade.txt +++ b/source/release-notes/3.2-upgrade.txt @@ -1,5 +1,3 @@ -.. _upgrade-to-3.2: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _upgrade-to-3.2: + ====================== Upgrade MongoDB to 3.2 ====================== diff --git a/source/release-notes/3.2.txt b/source/release-notes/3.2.txt index 16d4a560391..4976d19d035 100644 --- a/source/release-notes/3.2.txt +++ b/source/release-notes/3.2.txt @@ -1,5 +1,3 @@ -.. _release-notes-3.2: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-3.2: + ============================= Release Notes for MongoDB 3.2 ============================= diff --git a/source/release-notes/3.4-upgrade-replica-set.txt b/source/release-notes/3.4-upgrade-replica-set.txt index 5fe56cafa13..72882e5fe38 100644 --- a/source/release-notes/3.4-upgrade-replica-set.txt +++ b/source/release-notes/3.4-upgrade-replica-set.txt @@ -1,5 +1,3 @@ -.. _3.4-upgrade-replica-set: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _3.4-upgrade-replica-set: + ============================ Upgrade a Replica Set to 3.4 ============================ diff --git a/source/release-notes/3.4-upgrade-sharded-cluster.txt b/source/release-notes/3.4-upgrade-sharded-cluster.txt index 911b76f04bb..0e32cb5f5bc 100644 --- a/source/release-notes/3.4-upgrade-sharded-cluster.txt +++ b/source/release-notes/3.4-upgrade-sharded-cluster.txt @@ -1,5 +1,3 @@ -.. _3.4-upgrade-sharded-cluster: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _3.4-upgrade-sharded-cluster: + ================================ Upgrade a Sharded Cluster to 3.4 ================================ diff --git a/source/release-notes/3.4-upgrade-standalone.txt b/source/release-notes/3.4-upgrade-standalone.txt index 8bb364a1eaa..88c9a21ed42 100644 --- a/source/release-notes/3.4-upgrade-standalone.txt +++ b/source/release-notes/3.4-upgrade-standalone.txt @@ -1,5 +1,3 @@ -.. _3.4-upgrade-standalone: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _3.4-upgrade-standalone: + =========================== Upgrade a Standalone to 3.4 =========================== diff --git a/source/release-notes/3.4.txt b/source/release-notes/3.4.txt index 19ad49ce427..3b551ffcdba 100644 --- a/source/release-notes/3.4.txt +++ b/source/release-notes/3.4.txt @@ -1,5 +1,3 @@ -.. _release-notes-3.4: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-3.4: + ============================= Release Notes for MongoDB 3.4 ============================= diff --git a/source/release-notes/3.6-upgrade-replica-set.txt b/source/release-notes/3.6-upgrade-replica-set.txt index fe194119d22..53a00ed91c8 100644 --- a/source/release-notes/3.6-upgrade-replica-set.txt +++ b/source/release-notes/3.6-upgrade-replica-set.txt @@ -1,5 +1,3 @@ -.. _3.6-upgrade-replica-set: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _3.6-upgrade-replica-set: + ============================ Upgrade a Replica Set to 3.6 ============================ diff --git a/source/release-notes/3.6-upgrade-sharded-cluster.txt b/source/release-notes/3.6-upgrade-sharded-cluster.txt index 79650145f45..a51355241ea 100644 --- a/source/release-notes/3.6-upgrade-sharded-cluster.txt +++ b/source/release-notes/3.6-upgrade-sharded-cluster.txt @@ -1,5 +1,3 @@ -.. _3.6-upgrade-sharded-cluster: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _3.6-upgrade-sharded-cluster: + ================================ Upgrade a Sharded Cluster to 3.6 ================================ diff --git a/source/release-notes/3.6-upgrade-standalone.txt b/source/release-notes/3.6-upgrade-standalone.txt index d75f7f91c98..92137c5e8d7 100644 --- a/source/release-notes/3.6-upgrade-standalone.txt +++ b/source/release-notes/3.6-upgrade-standalone.txt @@ -1,5 +1,3 @@ -.. _3.6-upgrade-standalone: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _3.6-upgrade-standalone: + =========================== Upgrade a Standalone to 3.6 =========================== diff --git a/source/release-notes/3.6.txt b/source/release-notes/3.6.txt index 4f4b046ecc5..dc6164f7c35 100644 --- a/source/release-notes/3.6.txt +++ b/source/release-notes/3.6.txt @@ -1,5 +1,3 @@ -.. _release-notes-3.6: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-3.6: + ============================= Release Notes for MongoDB 3.6 ============================= diff --git a/source/release-notes/4.0-upgrade-replica-set.txt b/source/release-notes/4.0-upgrade-replica-set.txt index 8534fa31d40..d866c175e6e 100644 --- a/source/release-notes/4.0-upgrade-replica-set.txt +++ b/source/release-notes/4.0-upgrade-replica-set.txt @@ -1,5 +1,3 @@ -.. _4.0-upgrade-replica-set: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _4.0-upgrade-replica-set: + ============================ Upgrade a Replica Set to 4.0 ============================ diff --git a/source/release-notes/4.0-upgrade-sharded-cluster.txt b/source/release-notes/4.0-upgrade-sharded-cluster.txt index 71d6bb88987..34303055672 100644 --- a/source/release-notes/4.0-upgrade-sharded-cluster.txt +++ b/source/release-notes/4.0-upgrade-sharded-cluster.txt @@ -1,5 +1,3 @@ -.. _4.0-upgrade-sharded-cluster: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _4.0-upgrade-sharded-cluster: + ================================ Upgrade a Sharded Cluster to 4.0 ================================ diff --git a/source/release-notes/4.0-upgrade-standalone.txt b/source/release-notes/4.0-upgrade-standalone.txt index 04700cb1de0..2ca63f0a3b3 100644 --- a/source/release-notes/4.0-upgrade-standalone.txt +++ b/source/release-notes/4.0-upgrade-standalone.txt @@ -1,5 +1,3 @@ -.. _4.0-upgrade-standalone: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _4.0-upgrade-standalone: + =========================== Upgrade a Standalone to 4.0 =========================== diff --git a/source/release-notes/4.0.txt b/source/release-notes/4.0.txt index 229287235d5..4e0feaa29dc 100644 --- a/source/release-notes/4.0.txt +++ b/source/release-notes/4.0.txt @@ -1,5 +1,3 @@ -.. _release-notes-4.0: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-4.0: + ============================= Release Notes for MongoDB 4.0 ============================= diff --git a/source/release-notes/4.2-upgrade-replica-set.txt b/source/release-notes/4.2-upgrade-replica-set.txt index 58d27b01bb0..9aebb450aca 100644 --- a/source/release-notes/4.2-upgrade-replica-set.txt +++ b/source/release-notes/4.2-upgrade-replica-set.txt @@ -1,5 +1,3 @@ -.. _4.2-upgrade-replica-set: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _4.2-upgrade-replica-set: + ============================ Upgrade a Replica Set to 4.2 ============================ diff --git a/source/release-notes/4.2-upgrade-standalone.txt b/source/release-notes/4.2-upgrade-standalone.txt index ab9507d171c..aed7f728ebb 100644 --- a/source/release-notes/4.2-upgrade-standalone.txt +++ b/source/release-notes/4.2-upgrade-standalone.txt @@ -1,5 +1,3 @@ -.. _4.2-upgrade-standalone: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _4.2-upgrade-standalone: + =========================== Upgrade a Standalone to 4.2 =========================== diff --git a/source/release-notes/4.2.txt b/source/release-notes/4.2.txt index e07b211a454..2fb8a33fd00 100644 --- a/source/release-notes/4.2.txt +++ b/source/release-notes/4.2.txt @@ -1,5 +1,3 @@ -.. _release-notes-4.2: - .. This page is hidden from the TOC and search indexing. :orphan: @@ -7,6 +5,8 @@ .. meta:: :robots: noindex, nosnippet +.. _release-notes-4.2: + ============================= Release Notes for MongoDB 4.2 ============================= From fa545564126e5f758aa8edc1575ee30e095e75ab Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:27:51 -0800 Subject: [PATCH 075/308] DOCS-16572-free-monitoring-option (#6128) * DOCS-16572-free-monitoring-option * DOCS-16572-free-monitoring-option * DOCS-16572-free-monitoring-option * DOCS-16572-free-monitoring-option * DOCS-16572-free-monitoring-option * DOCS-16572-free-monitoring-option --------- Co-authored-by: jason-price-mongodb --- source/release-notes/4.0.txt | 5 +++++ source/release-notes/7.0-compatibility.txt | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/source/release-notes/4.0.txt b/source/release-notes/4.0.txt index 4e0feaa29dc..88d3fcd3fce 100644 --- a/source/release-notes/4.0.txt +++ b/source/release-notes/4.0.txt @@ -1335,6 +1335,11 @@ You can also enable or disable free monitoring at startup using either: - the command-line option ``--enableFreeMonitoring`` +.. note:: + + Starting in MongoDB 7.0, :ref:`free monitoring + ` is decommissioned. + View Status ~~~~~~~~~~~ diff --git a/source/release-notes/7.0-compatibility.txt b/source/release-notes/7.0-compatibility.txt index 6ce585e2abf..a1ef3c9baee 100644 --- a/source/release-notes/7.0-compatibility.txt +++ b/source/release-notes/7.0-compatibility.txt @@ -43,6 +43,19 @@ Deprecations - *Deprecated in version 7.0.* +Free Monitoring Decommissioned +------------------------------ + +Starting in MongoDB 7.0, :ref:`free monitoring +` is decommissioned. The following aren't +available: + +- ``cloud.monitoring.free`` configuration option +- ``--enableFreeMonitoring`` server parameter +- ``db.enableFreeMonitoring()`` command +- ``db.disableFreeMonitoring()`` command +- ``setFreeMonitoring`` command + Queryable Encryption General Availability ----------------------------------------- From f5720a41e3f9545abb26b8a6745ac16e2871ae4c Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Thu, 1 Feb 2024 11:43:03 -0500 Subject: [PATCH 076/308] DOCSP-35211 fix setIsSubset example (#6127) --- source/reference/operator/aggregation/setIsSubset.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/operator/aggregation/setIsSubset.txt b/source/reference/operator/aggregation/setIsSubset.txt index ff6e8165002..6c7290faa46 100644 --- a/source/reference/operator/aggregation/setIsSubset.txt +++ b/source/reference/operator/aggregation/setIsSubset.txt @@ -103,7 +103,7 @@ The operation returns the following results: { "flowerFieldA" : [ "rose", "orchid" ], "flowerFieldB" : [ "rose", "orchid" ], "AisSubset" : true } { "flowerFieldA" : [ "rose", "orchid" ], "flowerFieldB" : [ "orchid", "rose", "orchid" ], "AisSubset" : true } - { "flowerFieldA" : [ "rose", "orchid" ], "flowerFieldB" : [ "rose", "blue", "jasmine" ], "AisSubset" : true } + { "flowerFieldA" : [ "rose", "orchid" ], "flowerFieldB" : [ "rose", "orchid", "jasmine" ], "AisSubset" : true } { "flowerFieldA" : [ "rose", "orchid" ], "flowerFieldB" : [ "jasmine", "rose" ], "AisSubset" : false } { "flowerFieldA" : [ "rose", "orchid" ], "flowerFieldB" : [ ], "AisSubset" : false } { "flowerFieldA" : [ "rose", "orchid" ], "flowerFieldB" : [ [ "rose" ], [ "orchid" ] ], "AisSubset" : false } From 2deb39c1d7ff130e5a4a0b47fb9e33ed0a75c331 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Thu, 1 Feb 2024 11:51:29 -0800 Subject: [PATCH 077/308] DOCSP-25718-windows-variables (#6137) * DOCSP-25718-windows-variables * DOCSP-25718-windows-variables * DOCSP-25718-windows-variables * DOCSP-25718-windows-variables * DOCSP-25718-windows-variables * DOCSP-25718-windows-variables * DOCSP-25718-windows-variables * DOCSP-25718-windows-variables --------- Co-authored-by: jason-price-mongodb --- source/reference/configuration-options.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/reference/configuration-options.txt b/source/reference/configuration-options.txt index 2cb2c1afe6e..578dafc04e4 100644 --- a/source/reference/configuration-options.txt +++ b/source/reference/configuration-options.txt @@ -27,6 +27,10 @@ versions of MongoDB, see the appropriate version of the MongoDB Manual. to configure settings for your {+atlas+} deployment, see :atlas:`Configure Additional Settings `. +In addition to using the configuration file options, the default +configuration for the MongoDB binaries also uses the operating system +environment variables. + .. _conf-file: Configuration File From aefdfd0dd6b678451e448cd045313373d2956622 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:35:18 -0500 Subject: [PATCH 078/308] DOCS-16612 Add minN to Agg Operators (#6106) * DOCS-16612 Add to agg operators * * * * * * --- source/includes/extracts-agg-operators.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/includes/extracts-agg-operators.yaml b/source/includes/extracts-agg-operators.yaml index be3fc6f1f30..d5a3cd300db 100644 --- a/source/includes/extracts-agg-operators.yaml +++ b/source/includes/extracts-agg-operators.yaml @@ -1133,6 +1133,19 @@ content: | Available in the :pipeline:`$setWindowFields` stage. + * - :group:`$minN` + + - Returns an aggregation of the ``n`` minimum valued elements + in a group. + Distinct from the :expression:`$minN` array operator. + + .. versionadded:: 5.2 + + Available in :pipeline:`$group`, + :pipeline:`$setWindowFields` + and as an :ref:`expression `. + + * - :group:`$percentile` - .. include:: /includes/aggregation/fact-return-percentile.rst From 95717696e011a7e7625130f4cd547ed3e1138117 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:35:29 -0500 Subject: [PATCH 079/308] DOCSP-35984 Remove View Restrictions (#6043) * DOCSP-35984 Remove View Restrictions * * * * * * * XR KS Feedback --- source/core/views.txt | 7 ------- source/core/views/create-view.txt | 2 -- source/includes/extracts-views.yaml | 5 ----- source/reference/limits.txt | 2 -- source/reference/operator/aggregation/geoNear.txt | 2 -- 5 files changed, 18 deletions(-) diff --git a/source/core/views.txt b/source/core/views.txt index 974d7d0aaa2..d53092c4b19 100644 --- a/source/core/views.txt +++ b/source/core/views.txt @@ -94,13 +94,6 @@ operations. .. include:: /includes/fact-allowDiskUseByDefault.rst -Sharded Views -~~~~~~~~~~~~~ - -Views are considered sharded if their underlying collection is sharded. -You cannot specify a sharded view for the ``from`` field in -:pipeline:`$lookup` and :pipeline:`$graphLookup` operations. - Time Series Collections ~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/core/views/create-view.txt b/source/core/views/create-view.txt index 972727d6af5..0e99743117f 100644 --- a/source/core/views/create-view.txt +++ b/source/core/views/create-view.txt @@ -75,8 +75,6 @@ Some operations are not available with views: - :query:`$text` operator, since ``$text`` operation in aggregation is valid only for the first stage. -- :pipeline:`$geoNear` pipeline stage. - - Renaming a view. For more information, see :ref:`views-supported-operations`. diff --git a/source/includes/extracts-views.yaml b/source/includes/extracts-views.yaml index 621353fe853..751db1f0580 100644 --- a/source/includes/extracts-views.yaml +++ b/source/includes/extracts-views.yaml @@ -14,11 +14,6 @@ ref: views-unsupported-rename content: | You cannot rename :ref:`views `. --- -ref: views-unsupported-geoNear -content: | - :ref:`Views ` do not support geoNear operations - (specifically, the :pipeline:`$geoNear` pipeline stage). ---- ref: views-unsupported-projection-operators content: | :method:`~db.collection.find()` operations on views do not support diff --git a/source/reference/limits.txt b/source/reference/limits.txt index b2e5ae0f302..67a4545510c 100644 --- a/source/reference/limits.txt +++ b/source/reference/limits.txt @@ -902,8 +902,6 @@ Operations - .. include:: /includes/extracts/views-unsupported-mapReduce.rst - - .. include:: /includes/extracts/views-unsupported-geoNear.rst - .. limit:: Projection Restrictions .. versionadded:: 4.4 diff --git a/source/reference/operator/aggregation/geoNear.txt b/source/reference/operator/aggregation/geoNear.txt index c16a4fa5b96..5363a788283 100644 --- a/source/reference/operator/aggregation/geoNear.txt +++ b/source/reference/operator/aggregation/geoNear.txt @@ -184,8 +184,6 @@ When using :pipeline:`$geoNear`, consider that: - .. include:: /includes/fact-geoNear-restrict-near-in-query.rst -- .. include:: /includes/extracts/views-unsupported-geoNear.rst - - Starting in version 4.2, :pipeline:`$geoNear` no longer has a default limit of 100 documents. From 221b269c32d4d724036621fc56718493605c58c7 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:35:42 -0500 Subject: [PATCH 080/308] DOCSP-33422 Add Stable API Explain Content (#5831) * DOCSP-33422 Add Stable API Explain Content * * * * * * * * * XR Comments * XR * * * Update source/reference/command/explain.txt Co-authored-by: Nick Villahermosa --------- Co-authored-by: Nick Villahermosa --- source/includes/fact-stable-api-explain.rst | 2 ++ source/reference/command/explain.txt | 18 ++++++++++++++++-- source/reference/stable-api-changelog.txt | 4 +--- 3 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 source/includes/fact-stable-api-explain.rst diff --git a/source/includes/fact-stable-api-explain.rst b/source/includes/fact-stable-api-explain.rst new file mode 100644 index 00000000000..d9887b69643 --- /dev/null +++ b/source/includes/fact-stable-api-explain.rst @@ -0,0 +1,2 @@ +MongoDB does not guarantee any specific output format from the +:dbcommand:`explain` command, even when using the Stable API. \ No newline at end of file diff --git a/source/reference/command/explain.txt b/source/reference/command/explain.txt index e94e5ad3272..c0605bc5b21 100644 --- a/source/reference/command/explain.txt +++ b/source/reference/command/explain.txt @@ -148,6 +148,20 @@ For write operations, the :dbcommand:`explain` command returns information about the write operation that would be performed but does not actually modify the database. +Stable API +~~~~~~~~~~ + +The :ref:`Stable API ` V1 supports the following +verbosity modes for the ``explain`` command: + +- :ref:`allPlansExecution ` +- :ref:`executionStats ` +- :ref:`queryPlanner` + +.. warning:: + + .. include:: /includes/fact-stable-api-explain.rst + Restrictions ~~~~~~~~~~~~ @@ -185,8 +199,8 @@ verbosity mode to return the query planning information for a .. _ex-executionStats: -``executionStats`` Mode -~~~~~~~~~~~~~~~~~~~~~~~~ +``executionStats`` Mode +~~~~~~~~~~~~~~~~~~~~~~~ The following :dbcommand:`explain` operation runs in ``"executionStats"`` verbosity mode to return the query planning and execution information diff --git a/source/reference/stable-api-changelog.txt b/source/reference/stable-api-changelog.txt index 2ff40395e86..54f97bb631e 100644 --- a/source/reference/stable-api-changelog.txt +++ b/source/reference/stable-api-changelog.txt @@ -126,9 +126,7 @@ The following table describes: .. [#stable-api-explain] - MongoDB does not guarantee that the output of the - :dbcommand:`explain` command will conform to the same format in - future API versions. + .. include:: /includes/fact-stable-api-explain.rst Aggregation Stages and Operators -------------------------------- From ac1ebd291ab516ace89896c648b321cd558ab0ee Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Thu, 1 Feb 2024 18:34:17 -0500 Subject: [PATCH 081/308] (DOCS-16615): Clarify case-insensitive regex query behavior (#6108) * (DOCS-16615): Clarify case-insensitive regex query behavior * fix key formatting * standardize hyphenation * fix case * fix placeholders * reorg behavior * reorg * use admonition * edits * tweaks * wording --- source/core/index-case-insensitive.txt | 79 ++++++++++++------- .../case-insensitive-regex-queries.rst | 3 + source/reference/operator/query/regex.txt | 21 +++-- 3 files changed, 66 insertions(+), 37 deletions(-) create mode 100644 source/includes/indexes/case-insensitive-regex-queries.rst diff --git a/source/core/index-case-insensitive.txt b/source/core/index-case-insensitive.txt index 33e86b9ea04..613fbcf47da 100644 --- a/source/core/index-case-insensitive.txt +++ b/source/core/index-case-insensitive.txt @@ -1,7 +1,7 @@ .. _index-feature-case-insensitive: ======================== -Case Insensitive Indexes +Case-Insensitive Indexes ======================== .. default-domain:: mongodb @@ -12,30 +12,52 @@ Case Insensitive Indexes :depth: 2 :class: singlecol -Case insensitive indexes support queries that perform string -comparisons without regard for case. +Case-insensitive indexes support queries that perform string comparisons +without regard for case. Case insensitivity is derived from +:ref:`collation `. -You can create a case insensitive index with -:method:`db.collection.createIndex()` by specifying the ``collation`` -parameter as an option. For example: +.. important:: -.. code-block:: javascript + .. include:: /includes/indexes/case-insensitive-regex-queries.rst - db.collection.createIndex( { "key" : 1 }, - { collation: { - locale : , - strength : - } - } ) +Command Syntax +-------------- -To specify a collation for a case sensitive index, include: +You can create a case-insensitive index with +:method:`db.collection.createIndex()` by specifying the ``collation`` +option: -- ``locale``: specifies language rules. See - :ref:`Collation Locales` for a list of - available locales. +.. code-block:: javascript -- ``strength``: determines comparison rules. A value of - ``1`` or ``2`` indicates a case insensitive collation. + db.collection.createIndex( + { + : + }, + { + collation: + { + locale : , + strength : < 1 | 2 > + } + } + ) + +To specify a collation for a case-insensitive index, include the +following fields in the ``collation`` object: + +.. list-table:: + :header-rows: 1 + :widths: 10 20 + + * - Field + - Description + + * - ``locale`` + - Specifies language rules. For a list of available locales, see + :ref:`collation-languages-locales`. + * - ``strength`` + - Determines comparison rules. A ``strength`` value of 1 or 2 + indicates case-insensitive collation. For additional collation fields, see :ref:`Collation`. @@ -43,11 +65,6 @@ For additional collation fields, see Behavior -------- -Using a case insensitive index does not affect -the results of a query, but it can increase performance; see -:ref:`Indexes ` for a detailed discussion of the costs and -benefits of indexes. - To use an index that specifies a collation, query and sort operations must specify the same collation as the index. If a collection has defined a collation, all queries and indexes inherit that collation @@ -58,10 +75,10 @@ Examples .. _no-default-collation-example: -Create a Case Insensitive Index +Create a Case-Insensitive Index ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To use a case insensitive index on a collection with no default +To use a case-insensitive index on a collection with no default collation, create an index with a collation and set the ``strength`` parameter to ``1`` or ``2`` (see :ref:`Collation` for a detailed @@ -69,15 +86,17 @@ description of the ``strength`` parameter). You must specify the same collation at the query level in order to use the index-level collation. The following example creates a collection with no default collation, -then adds an index on the ``type`` field with a case insensitive +then adds an index on the ``type`` field with a case-insensitive collation. .. code-block:: javascript db.createCollection("fruit") - db.fruit.createIndex( { type: 1}, - { collation: { locale: 'en', strength: 2 } } ) + db.fruit.createIndex( + { type: 1 }, + { collation: { locale: 'en', strength: 2 } } + ) To use the index, queries must specify the same collation. @@ -99,7 +118,7 @@ To use the index, queries must specify the same collation. .. _default-collation-example: -Case Insensitive Indexes on Collections with a Default Collation +Case-Insensitive Indexes on Collections with a Default Collation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When you create a collection with a default collation, all the indexes diff --git a/source/includes/indexes/case-insensitive-regex-queries.rst b/source/includes/indexes/case-insensitive-regex-queries.rst new file mode 100644 index 00000000000..f4aed20c612 --- /dev/null +++ b/source/includes/indexes/case-insensitive-regex-queries.rst @@ -0,0 +1,3 @@ +Case-insensitive indexes typically do not improve performance for +:query:`$regex` queries. The ``$regex`` implementation is not +collation-aware and cannot utilize case-insensitive indexes efficiently. diff --git a/source/reference/operator/query/regex.txt b/source/reference/operator/query/regex.txt index b58d7dd506c..14bdb7fcb1e 100644 --- a/source/reference/operator/query/regex.txt +++ b/source/reference/operator/query/regex.txt @@ -94,8 +94,8 @@ expression. - Syntax Restrictions * - ``i`` - - Case insensitivity to match upper and lower cases. - For an example, see :ref:`regex-case-insensitive`. + - Case insensitivity to match upper and lower cases. For an + example, see :ref:`regex-case-insensitive`. - * - ``m`` @@ -250,10 +250,16 @@ operation on both: Index Use ~~~~~~~~~~ +Index use and performance for ``$regex`` queries varies depending on +whether the query is case-sensitive or case-insensitive. + +Case-Sensitive Queries +`````````````````````` + .. TODO Probably should clean up a bit of the writing here -For case sensitive regular expression queries, if an index exists for -the field, then MongoDB matches the regular expression against the +For case sensitive regular expression queries, if an index exists +for the field, then MongoDB matches the regular expression against the values in the index, which can be faster than a collection scan. Further optimization can occur if the regular expression is a "prefix @@ -273,9 +279,10 @@ All of these expressions use an index if an appropriate index exists; however, ``/^a.*/``, and ``/^a.*$/`` are slower. ``/^a/`` can stop scanning after matching the prefix. -Case insensitive regular expression queries generally cannot use indexes -effectively. The ``$regex`` implementation is not collation-aware -and is unable to utilize case-insensitive indexes. +Case-Insensitive Queries +```````````````````````` + +.. include:: /includes/indexes/case-insensitive-regex-queries.rst Examples -------- From 852d63d808f69d047d8945b72ee98c324e80e60a Mon Sep 17 00:00:00 2001 From: Sarah Olson <98367156+sarah-olson-mongodb@users.noreply.github.com> Date: Thu, 1 Feb 2024 16:33:00 -0800 Subject: [PATCH 082/308] DOCSP-33603: Delete 2.x release notes (#6166) --- source/release-notes/2.0.txt | 438 -------- source/release-notes/2.2.txt | 753 -------------- source/release-notes/2.4-changelog.txt | 104 -- source/release-notes/2.4-index-types.txt | 85 -- source/release-notes/2.4-javascript.txt | 454 --------- source/release-notes/2.4-upgrade.txt | 623 ------------ source/release-notes/2.4.txt | 450 --------- source/release-notes/2.6-changelog.txt | 911 ----------------- source/release-notes/2.6-compatibility.txt | 955 ------------------ source/release-notes/2.6-downgrade.txt | 316 ------ .../2.6-upgrade-authorization.txt | 97 -- source/release-notes/2.6-upgrade.txt | 277 ----- source/release-notes/2.6.txt | 702 ------------- 13 files changed, 6165 deletions(-) delete mode 100644 source/release-notes/2.0.txt delete mode 100644 source/release-notes/2.2.txt delete mode 100644 source/release-notes/2.4-changelog.txt delete mode 100644 source/release-notes/2.4-index-types.txt delete mode 100644 source/release-notes/2.4-javascript.txt delete mode 100644 source/release-notes/2.4-upgrade.txt delete mode 100644 source/release-notes/2.4.txt delete mode 100644 source/release-notes/2.6-changelog.txt delete mode 100644 source/release-notes/2.6-compatibility.txt delete mode 100644 source/release-notes/2.6-downgrade.txt delete mode 100644 source/release-notes/2.6-upgrade-authorization.txt delete mode 100644 source/release-notes/2.6-upgrade.txt delete mode 100644 source/release-notes/2.6.txt diff --git a/source/release-notes/2.0.txt b/source/release-notes/2.0.txt deleted file mode 100644 index 55cde56f14d..00000000000 --- a/source/release-notes/2.0.txt +++ /dev/null @@ -1,438 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -.. _release-notes-2.0: - -============================= -Release Notes for MongoDB 2.0 -============================= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Upgrading ---------- - -Although the major version number has changed, MongoDB 2.0 is a -standard, incremental production release and works as a drop-in -replacement for MongoDB 1.8. - -Preparation -~~~~~~~~~~~ - -Read through all release notes before upgrading, and ensure that no -changes will affect your deployment. - -If you create new indexes in 2.0, then downgrading to 1.8 is possible -but you must reindex the new collections. - -:binary:`~bin.mongoimport` and :binary:`~bin.mongoexport` now correctly adhere to the CSV spec -for handling CSV input/output. This may break existing import/export -workflows that relied on the previous behavior. For more information see -:issue:`SERVER-1097`. - -:ref:`` is **enabled by default** in 2.0 for 64-bit builds. -If you still prefer to run without journaling, start :binary:`~bin.mongod` -with the ``--nojournal`` run-time option. Otherwise, MongoDB creates journal -files during startup. The first time you start :binary:`~bin.mongod` with -journaling, you will see a delay as :binary:`~bin.mongod` creates new files. -In addition, you may see reduced write throughput. - -2.0 :binary:`~bin.mongod` instances are interoperable with 1.8 -:binary:`~bin.mongod` instances; however, for best results, upgrade your -deployments using the following procedures: - -.. _2.0-upgrade-standalone: - -Upgrading a Standalone ``mongod`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -1. Download the v2.0.x binaries from the `MongoDB Download Page`_. - -#. Shutdown your :binary:`~bin.mongod` instance. Replace the existing - binary with the 2.0.x :binary:`~bin.mongod` binary and restart MongoDB. - -.. _`MongoDB Download Page`: http://downloads.mongodb.org/ - -.. _2.0-upgrade-replica-set: - -Upgrading a Replica Set -~~~~~~~~~~~~~~~~~~~~~~~ - -1. Upgrade the :term:`secondary` members of the set one at a time by - shutting down the :binary:`~bin.mongod` and replacing the 1.8 binary - with the 2.0.x binary from the `MongoDB Download Page`_. - -#. To avoid losing the last few updates on failover you can - temporarily halt your application (failover should take less than 10 - seconds), or you can set :ref:`write concern ` in your application - code to confirm that each update reaches multiple servers. - -#. Use the :method:`rs.stepDown()` to step down the primary to allow - the normal :ref:`failover ` procedure. - - :method:`rs.stepDown()` and :dbcommand:`replSetStepDown` provide for - shorter and more consistent failover procedures than simply - shutting down the primary directly. - - When the primary has stepped down, shut down its instance and - upgrade by replacing the :binary:`~bin.mongod` binary with the 2.0.x - binary. - -.. _2.0-upgrade-shard-cluster: -.. _2.0-upgrade-sharded-cluster: - -Upgrading a Sharded Cluster -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -1. Upgrade all :term:`config server ` instances - *first*, in any order. Since config servers use two-phase commit, - :term:`shard` configuration metadata updates will halt until all are - up and running. - -#. Upgrade :binary:`~bin.mongos` routers in any order. - -Changes -------- - -Compact Command -~~~~~~~~~~~~~~~ - -A :dbcommand:`compact` command is now available for compacting a single -collection and its indexes. Previously, the only way to compact was to -repair the entire database. - -Concurrency Improvements -~~~~~~~~~~~~~~~~~~~~~~~~ - -When going to disk, the server will yield the write lock when writing -data that is not likely to be in memory. The initial -implementation of this feature now exists: - -See :issue:`SERVER-2563` for more information. - -The specific operations yield in 2.0 are: - -- Updates by ``_id`` - -- Removes - -- Long cursor iterations - -Default Stack Size -~~~~~~~~~~~~~~~~~~ - -MongoDB 2.0 reduces the default stack size. This change can reduce total memory -usage when there are many (e.g., 1000+) client connections, as there is -a thread per connection. While portions of a thread's stack can be -swapped out if unused, some operating systems do this slowly enough that -it might be an issue. The default stack size is lesser of the -system setting or 1MB. - -.. _2.0-new-index-format: - -Index Performance Enhancements -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -v2.0 includes significant improvements to the -:v2.2:`index `. -Indexes are often 25% smaller and 25% faster (depends on the use case). -When upgrading from previous versions, the benefits of the new index -type are realized only if you create a new index or re-index an old one. - -Dates are now signed, and the max index key size has increased slightly -from 819 to 1024 bytes. - -All operations that create a new index will result in a 2.0 index by -default. For example: - -- Reindexing results on an older-version index results in a 2.0 index. - However, reindexing on a secondary does *not* work in versions prior - to 2.0. Do not reindex on a secondary. For a workaround, see - :issue:`SERVER-3866`. - -- The ``repairDatabase`` command converts indexes to a 2.0 - indexes. - -To convert all indexes for a given collection to the :ref:`2.0 type -<2.0-new-index-format>`, invoke the :dbcommand:`compact` command. - -Once you create new indexes, downgrading to 1.8.x will require a -re-index of any indexes created using 2.0. See -:v2.2:`/tutorial/roll-back-to-v1.8-index`. - -Sharding Authentication -~~~~~~~~~~~~~~~~~~~~~~~ - -Applications can now use authentication with :term:`sharded clusters `. - -Replica Sets -~~~~~~~~~~~~ - -Hidden Nodes in Sharded Clusters -```````````````````````````````` - -In 2.0, :binary:`~bin.mongos` instances can now determine when a member of -a replica set becomes "hidden" without requiring a restart. In 1.8, -:binary:`~bin.mongos` if you reconfigured a -member as hidden, you *had* to restart :binary:`~bin.mongos` to prevent -queries from reaching the hidden member. - -Priorities -`````````` - -Each :term:`replica set` member can now have a priority value consisting -of a floating-point from 0 to 1000, inclusive. Priorities let you -control which member of the set you prefer to have as :term:`primary` -the member with the highest priority that can see a majority of the set -will be elected primary. - -For example, suppose you have a replica set with three members, ``A``, ``B``, and -``C``, and suppose that their priorities are set as follows: - -- ``A``'s priority is ``2``. - -- ``B``'s priority is ``3``. - -- ``C``'s priority is ``1``. - -During normal operation, the set will always chose ``B`` as -primary. If ``B`` becomes unavailable, the set will elect ``A`` as primary. - -For more information, see the -:rsconf:`priority ` documentation. - -Data-Center Awareness -`````````````````````` - -You can now "tag" :term:`replica set` members to indicate their -location. You can use these tags to design custom :ref:`write rules ` -across data centers, racks, specific servers, or any other architecture -choice. - -For example, an administrator can define rules such as "very important write" or -``customerData`` or "audit-trail" to replicate to certain servers, -racks, data centers, etc. Then in the application code, the developer -would say: - -.. code-block:: javascript - - db.foo.insert(doc, {w : "very important write"}) - -which would succeed if it fulfilled the conditions the DBA defined for -"very important write". - -For more information, see :doc:`/data-center-awareness`. - -Drivers may also support tag-aware reads. Instead of -specifying ``slaveOk``, you specify ``slaveOk`` with tags indicating -which data-centers to read from. For details, see the -:driver:`Drivers ` documentation. - -``w`` : ``majority`` -```````````````````` - -You can also set ``w`` to ``majority`` to ensure that the write -propagates to a majority of nodes, effectively committing it. The -value for "majority" will automatically adjust as you add or -remove nodes from the set. - -For more information, see :doc:`/reference/write-concern`. - -Reconfiguration with a Minority Up -`````````````````````````````````` - -If the majority of servers in a set has been permanently lost, you can -now force a reconfiguration of the set to bring it back online. - -For more information see :doc:`/tutorial/reconfigure-replica-set-with-unavailable-members`. - -Primary Checks for a Caught up Secondary before Stepping Down -````````````````````````````````````````````````````````````` - -To minimize time without a :term:`primary`, the :method:`rs.stepDown()` -method will now fail if the primary does not see a :term:`secondary` -within 10 seconds of its latest optime. You can force the primary to -step down anyway, but by default it will return an error message. - -See also :doc:`/tutorial/force-member-to-be-primary`. - -Extended Shutdown on the Primary to Minimize Interruption -````````````````````````````````````````````````````````` - -When you call the :dbcommand:`shutdown` command, the :term:`primary` -will refuse to shut down unless there is a :term:`secondary` whose -optime is within 10 seconds of the primary. If such a secondary isn't -available, the primary will step down and wait up to a minute for the -secondary to be fully caught up before shutting down. - -Note that to get this behavior, you must issue the :dbcommand:`shutdown` -command explicitly; sending a signal to the process will not trigger -this behavior. - -You can also force the primary to shut down, even without an up-to-date -secondary available. - -Maintenance Mode -```````````````` - -When ``repairDatabase`` or :dbcommand:`compact` runs on a :term:`secondary`, the -secondary will automatically drop into "recovering" mode until the -operation finishes. This prevents clients from trying to read from it -while it's busy. - -Geospatial Features -~~~~~~~~~~~~~~~~~~~ - -Multi-Location Documents -```````````````````````` - -Indexing is now supported on documents which have multiple location -objects, embedded either inline or in embedded documents. Additional -command options are also supported, allowing results to return with -not only distance but the location used to generate the distance. - -For more information, see :ref:`geospatial-indexes-multi-location`. - -Polygon searches -```````````````` - -Polygonal :query:`$within` queries are also now supported for simple polygon -shapes. For details, see the :query:`$within` operator documentation. - -Journaling Enhancements -~~~~~~~~~~~~~~~~~~~~~~~ - -- Journaling is now enabled by default for 64-bit platforms. Use the - ``--nojournal`` command line option to disable it. - -- The journal is now compressed for faster commits to disk. - -- A new :option:`--journalCommitInterval ` run-time option exists for - specifying your own group commit interval. The default settings do - not change. - -- A new ``{ getLastError: { j: true } }`` option is available to wait - for the group commit. The group commit will happen sooner when a - client is waiting on ``{j: true}``. If journaling is disabled, - ``{j: true}`` is a no-op. - -New ``ContinueOnError`` Option for Bulk Insert -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Set the ``continueOnError`` option for bulk inserts, in the -:driver:`driver `, so that bulk insert will -continue to insert any remaining documents even if an insert fails, as -is the case with duplicate key exceptions or network interruptions. The ``getLastError`` -command will report whether any inserts have failed, not just the -last one. If multiple errors occur, the client will only receive the -most recent ``getLastError`` results. - -.. include:: /includes/note-bulk-inserts-on-sharded-clusters.rst - -Map Reduce -~~~~~~~~~~ - -Output to a Sharded Collection -`````````````````````````````` - -Using the new ``sharded`` flag, it is possible to send the result of a -map/reduce to a sharded collection. Combined with the ``reduce`` or -``merge`` flags, it is possible to keep adding data to very large -collections from map/reduce jobs. - -For more information, see :doc:`/core/map-reduce/` and the -:dbcommand:`mapReduce` reference. - -Performance Improvements -```````````````````````` - -Map/reduce performance will benefit from the following: - -- Larger in-memory buffer sizes, reducing the amount of disk I/O needed - during a job - -- Larger javascript heap size, allowing for larger objects - and less GC - -- Supports pure JavaScript execution with the ``jsMode`` flag. See the - :dbcommand:`mapReduce` reference. - -New Querying Features -~~~~~~~~~~~~~~~~~~~~~ - -Additional regex options: ``s`` -``````````````````````````````` - -Allows the dot (``.``) to match all characters including new lines. This is -in addition to the currently supported ``i``, ``m`` and ``x``. See :query:`$regex`. - -$and -```` - -A special boolean :query:`$and` query operator is now available. - -Command Output Changes -~~~~~~~~~~~~~~~~~~~~~~ - -The output of the :dbcommand:`validate` command and the documents in the -``system.profile`` collection have both been enhanced to return -information as BSON objects with keys for each value rather than as -free-form strings. - -Shell Features -~~~~~~~~~~~~~~ - -Custom Prompt -````````````` - -You can define a custom prompt for the ``mongo`` shell. You can -change the prompt at any time by setting the prompt variable to a string -or a custom JavaScript function returning a string. - -Default Shell Init Script -````````````````````````` - -On startup, the shell will check for a ``.mongorc.js`` file in the -user's home directory. The shell will execute this file after connecting -to the database and before displaying the prompt. - -If you would like the shell not to run the ``.mongorc.js`` file -automatically, start the shell with ``--norc``. - -For more information, see the ``mongo`` reference. - -Most Commands Require Authentication -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In 2.0, when running with authentication (e.g. :setting:`~security.authorization`) *all* -database commands require authentication, *except* the following -commands. - -- ``isMaster`` - -- :dbcommand:`authenticate` - -- ``getnonce`` - -- :dbcommand:`buildInfo` - -- :dbcommand:`ping` - -- :dbcommand:`isdbgrid` - -Resources ---------- - -- `MongoDB Downloads `_ -- `All JIRA Issues resolved in 2.0 `_ -- `All Backward Incompatible Changes `_ diff --git a/source/release-notes/2.2.txt b/source/release-notes/2.2.txt deleted file mode 100644 index a66131a8787..00000000000 --- a/source/release-notes/2.2.txt +++ /dev/null @@ -1,753 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -.. _release-notes-2.2: - -============================= -Release Notes for MongoDB 2.2 -============================= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Upgrading ---------- - -MongoDB 2.2 is a production release series and succeeds the 2.0 -production release series. - -MongoDB 2.0 data files are compatible with 2.2-series binaries without any -special migration process. However, always perform the upgrade process for replica -sets and sharded clusters using the procedures that follow. - -Synopsis -~~~~~~~~ - -- :binary:`~bin.mongod`, 2.2 is a drop-in replacement for 2.0 and 1.8. - -- Check your :driver:`driver ` documentation for - information regarding required compatibility upgrades, and always - run the recent release of your driver. - - Typically, only users running with authentication, will need to - upgrade drivers before continuing with the upgrade to 2.2. - -- For all deployments using authentication, upgrade the - drivers (i.e. client libraries), before upgrading the - :binary:`~bin.mongod` instance or instances. - -- For all upgrades of sharded clusters: - - - turn off the balancer during the upgrade process. See the - :ref:`sharding-balancing-disable-temporarily` section for more - information. - - - upgrade all :binary:`~bin.mongos` instances before upgrading any - :binary:`~bin.mongod` instances. - -Other than the above restrictions, 2.2 processes can interoperate with -2.0 and 1.8 tools and processes. You can safely upgrade the -:binary:`~bin.mongod` and :binary:`~bin.mongos` components of a deployment -one by one while the deployment is otherwise operational. Be sure to -read the detailed upgrade procedures below before upgrading production -systems. [#secondaries-first]_ - -.. [#secondaries-first] To minimize the interruption caused by - :ref:`election process `, always upgrade the - secondaries of the set first, then :dbcommand:`step down - ` the primary, and then upgrade the primary. - -.. _2.2-upgrade-standalone: - -Upgrading a Standalone ``mongod`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -#. Download binaries of the latest release in the 2.2 series from the - `MongoDB Download Page`_. - -#. Shutdown your :binary:`~bin.mongod` instance. Replace the existing - binary with the 2.2 :binary:`~bin.mongod` binary and restart MongoDB. - -.. _`MongoDB Download Page`: http://downloads.mongodb.org/ - -.. _2.2-upgrade-replica-set: - -Upgrading a Replica Set -~~~~~~~~~~~~~~~~~~~~~~~ - -You can upgrade to 2.2 by performing a "rolling" -upgrade of the set by upgrading the members individually while the -other members are available to minimize downtime. Use the following -procedure: - -#. Upgrade the :term:`secondary` members of the set one at a time by - shutting down the :binary:`~bin.mongod` and replacing the 2.0 binary - with the 2.2 binary. After upgrading a :binary:`~bin.mongod` instance, - wait for the member to recover to ``SECONDARY`` state - before upgrading the next instance. - To check the member's state, issue :method:`rs.status()` in the - ``mongo`` shell. - -#. Use the ``mongo`` shell method :method:`rs.stepDown()` to - step down the :term:`primary` to allow the normal :ref:`failover - ` procedure. :method:`rs.stepDown()` - expedites the failover procedure and is preferable to shutting down - the primary directly. - - Once the primary has stepped down and another member has assumed - ``PRIMARY`` state, as observed in the output of - :method:`rs.status()`, shut down the previous primary and replace - :binary:`~bin.mongod` binary with the 2.2 binary and start the new - process. - - .. note:: Replica set failover is not instant but will - render the set unavailable to read or accept writes - until the failover process completes. Typically this takes - 10 seconds or more. You may wish to plan the upgrade during - a predefined maintenance window. - -.. _2.2-upgrade-shard-cluster: -.. _2.2-upgrade-sharded-cluster: - -Upgrading a Sharded Cluster -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Use the following procedure to upgrade a sharded cluster: - -- :ref:`Disable the balancer `. - -- Upgrade all :binary:`~bin.mongos` instances *first*, in any order. - -- Upgrade all of the :binary:`~bin.mongod` config server instances - using the :ref:`stand alone <2.2-upgrade-standalone>` procedure. - To keep the cluster online, be sure that at all times at least one config - server is up. - -- Upgrade each shard's replica set, using the :ref:`upgrade - procedure for replica sets <2.2-upgrade-replica-set>` detailed above. - -- re-enable the balancer. - -.. note:: - - Balancing is not currently supported in *mixed* 2.0.x and 2.2.0 - deployments. Thus you will want to reach a consistent version for all - shards within a reasonable period of time, e.g. same-day. - See :issue:`SERVER-6902` for more information. - -Changes -------- - -Major Features -~~~~~~~~~~~~~~ - -Aggregation Pipeline -```````````````````` - -An aggregation pipeline makes it possible to do aggregation -operations without needing to use :term:`map-reduce`. The -:dbcommand:`aggregate` command creates an aggregation pipeline, and the -:method:`~db.collection.aggregate()` helper in the ``mongo`` shell -provides an interface to these operations. Consider the following -resources for background on aggregation pipelines and their use: - -- Documentation: :ref:`aggregation` - -- Reference: :doc:`/reference/aggregation` - -TTL Collections -``````````````` - -TTL collections remove expired data from a collection, using a special -index and a background thread that deletes expired documents every -minute. These collections are useful as an alternative to -:term:`capped collections ` in some cases, such as for data -warehousing and caching cases, including: machine generated event data, -logs, and session information that needs to persist in a database -for only a limited period of time. - -For more information, see the :doc:`/tutorial/expire-data` tutorial. - -Concurrency Improvements -```````````````````````` - -MongoDB 2.2 increases the server's capacity for concurrent -operations with the following improvements: - -#. :issue:`DB Level Locking ` -#. :issue:`Improved Yielding on Page Faults ` -#. :issue:`Improved Page Fault Detection on Windows ` - -To reflect these changes, MongoDB now provides changed and improved -reporting for concurrency and use. See :ref:`locks`, :v2.2:`recordStats -`, :method:`db.currentOp()`, -:binary:`~bin.mongotop`, and :binary:`~bin.mongostat`. - -.. todo:: add links to current op output documentation when it happens. - -Improved Data Center Awareness with Tag Aware Sharding -`````````````````````````````````````````````````````` - -MongoDB 2.2 adds additional support for geographic distribution or -other custom partitioning for sharded collections in :term:`clusters -`. By using this "tag aware" sharding, you can -automatically ensure that data in a sharded database system is always -on specific shards. For example, with tag aware sharding, you can -ensure that data is closest to the application servers that use that -data most frequently. - -Shard tagging controls data location, and is complementary but -separate from replica set tagging, which controls :doc:`read -preference ` and :ref:`write concern -`. For example, shard tagging can pin all -"USA" data to one or more logical shards, while replica set tagging -can control which :binary:`~bin.mongod` instances (e.g. "``production``" -or "``reporting``") the application uses to service requests. - -See the documentation for the following helpers in the ``mongo`` -shell that support tagged sharding configuration: - -- :method:`sh.addShardTag()` -- :method:`sh.addTagRange()` -- :method:`sh.removeShardTag()` - -Fully Supported Read Preference Semantics -````````````````````````````````````````` - -All MongoDB clients and drivers now support full :doc:`read -preferences `, including consistent -support for a full range of :ref:`read preference modes -` and :ref:`tag sets -`. This support extends to the -:binary:`~bin.mongos` and applies identically to single replica sets and -to the replica sets for each shard in a :term:`sharded cluster`. - -Additional read preference support now exists in the ``mongo`` -shell using the :method:`~cursor.readPref()` cursor method. - -.. including tagging - -Compatibility Changes -~~~~~~~~~~~~~~~~~~~~~ - -Authentication Changes -`````````````````````` - -MongoDB 2.2 provides more reliable and robust support for -authentication clients, including drivers and :binary:`~bin.mongos` -instances. - -If your cluster runs with authentication: - -- For all drivers, use the latest release of your driver and check - its release notes. - -- In sharded environments, - to ensure that your cluster remains available during the upgrade - process you **must** use the :ref:`upgrade procedure for sharded clusters - <2.2-upgrade-shard-cluster>`. - -.. _2.2-findandmodify-returns-null: - -``findAndModify`` Returns Null Value for Upserts that Perform Inserts -````````````````````````````````````````````````````````````````````` - -In version 2.2, for :term:`upsert` that perform inserts with the -``new`` option set to ``false``, :dbcommand:`findAndModify` commands will -now return the following output: - -.. code-block:: javascript - - { 'ok': 1.0, 'value': null } - -In the ``mongo`` shell, upsert :dbcommand:`findAndModify` -operations that perform inserts (with ``new`` set to ``false``.)only output a ``null`` value. - -In version 2.0 these operations would return an empty document, -e.g. ``{ }``. - -See: :issue:`SERVER-6226` for more information. - -``mongodump`` 2.2 Output Incompatible with Pre-2.2 ``mongorestore`` -``````````````````````````````````````````````````````````````````` - -If you use the :binary:`~bin.mongodump` tool from the 2.2 distribution to -create a dump of a database, you must use a 2.2 (or later) version of -:binary:`~bin.mongorestore` to restore that dump. - -See: :issue:`SERVER-6961` for more information. - -.. _2.2-ObjectId-toString-valueOf-methods: - -``ObjectId().toString()`` Returns String Literal ``ObjectId("...")`` -```````````````````````````````````````````````````````````````````` - -In version 2.2, the :method:`~ObjectId.toString()` method returns the -string representation of the :ref:`ObjectId() ` -object and has the format ``ObjectId("...")``. - -Consider the following example that calls the -:method:`~ObjectId.toString()` method on the -``ObjectId("507c7f79bcf86cd7994f6c0e")`` object: - -.. code-block:: javascript - - ObjectId("507c7f79bcf86cd7994f6c0e").toString() - -The method now returns the *string* -``ObjectId("507c7f79bcf86cd7994f6c0e")``. - -Previously, in version 2.0, the method would return the *hexadecimal -string* ``507c7f79bcf86cd7994f6c0e``. - -If compatibility between versions 2.0 and 2.2 is required, use -:ref:`ObjectId().str `, which holds the -hexadecimal string value in both versions. - -``ObjectId().valueOf()`` Returns hexadecimal string -``````````````````````````````````````````````````` - -In version 2.2, the :method:`~ObjectId.valueOf()` method returns the -value of the :ref:`ObjectId() ` object as a -lowercase hexadecimal string. - -Consider the following example that calls the :method:`~ObjectId.valueOf()` method on the -``ObjectId("507c7f79bcf86cd7994f6c0e")`` object: - -.. code-block:: javascript - - ObjectId("507c7f79bcf86cd7994f6c0e").valueOf() - -The method now returns the *hexadecimal string* -``507c7f79bcf86cd7994f6c0e``. - -Previously, in version 2.0, the method would return the *object* -``ObjectId("507c7f79bcf86cd7994f6c0e")``. - -If compatibility between versions 2.0 and 2.2 is required, use -:ref:`ObjectId().str ` attribute, which holds the -hexadecimal string value in both versions. - -Behavioral Changes -~~~~~~~~~~~~~~~~~~ - -.. _rn-2.2-collection-name-restriction: - -Restrictions on Collection Names -```````````````````````````````` - -In version 2.2, collection names cannot: - -- contain the ``$``. - -- be an empty string (i.e. ``""``). - -This change does not affect collections created with now illegal names -in earlier versions of MongoDB. - -These new restrictions are in addition to the existing restrictions on -collection names which are: - -- A collection name should begin with a letter or an underscore. - -- A collection name cannot contain the null character. - -- Begin with the ``system.`` prefix. MongoDB - reserves ``system.`` - for system collections, such as the - ``system.indexes`` collection. - -- The maximum size of a collection name is 128 characters, including - the name of the database. However, for maximum flexibility, - collections should have names less than 80 characters. - -Collections names may have any other valid UTF-8 string. - -See the :issue:`SERVER-4442` and the -:ref:`faq-restrictions-on-collection-names` FAQ item. - -.. _rn-2.2-database-name-restriction-windows: - -Restrictions on Database Names for Windows -`````````````````````````````````````````` - -Database names running on Windows can no longer contain the following -characters: - -.. code-block:: none - - /\. "*<>:|? - -The names of the data files include the database name. If you attempt -to upgrade a database instance with one or more of these characters, -:binary:`~bin.mongod` will refuse to start. - -Change the name of these databases before upgrading. See -:issue:`SERVER-4584` and :issue:`SERVER-6729` for more information. - -.. _2.2-id-indexes-capped-collections: - -``_id`` Fields and Indexes on Capped Collections -```````````````````````````````````````````````` - -All :term:`capped collections ` now have an ``_id`` -field by default, *if* they exist outside of the ``local`` database, -and now have indexes on the ``_id`` field. This change only affects capped -collections created with 2.2 instances and does not affect existing -capped collections. - -See: :issue:`SERVER-5516` for more information. - -New ``$elemMatch`` Projection Operator -`````````````````````````````````````` - -The :projection:`$elemMatch` operator allows applications to narrow -the data returned from queries so that the query operation will only -return the first matching element in an array. See the -:projection:`$elemMatch` reference and the -:issue:`SERVER-2238` and :issue:`SERVER-828` issues for more -information. - -Windows Specific Changes -~~~~~~~~~~~~~~~~~~~~~~~~ - -Windows XP is Not Supported -``````````````````````````` - -As of 2.2, MongoDB does not support Windows XP. Please upgrade to a -more recent version of Windows to use the latest releases of -MongoDB. See :issue:`SERVER-5648` for more information. - -Service Support for ``mongos.exe`` -`````````````````````````````````` - -You may now run :binary:`mongos.exe` instances as a Windows -Service. - -Log Rotate Command Support -`````````````````````````` - -MongoDB for Windows now supports log rotation by way of the -:dbcommand:`logRotate` database command. See :issue:`SERVER-2612` for -more information. - -New Build Using SlimReadWrite Locks for Windows Concurrency -``````````````````````````````````````````````````````````` - -Labeled "2008+" on the `Downloads Page`_, this build for 64-bit -versions of Windows Server 2008 R2 and for Windows 7 or newer, offers -increased performance over the standard 64-bit Windows build of -MongoDB. See :issue:`SERVER-3844` for more information. - -.. _`Downloads Page`: http://www.mongodb.org/downloads - -Tool Improvements -~~~~~~~~~~~~~~~~~ - -Index Definitions Handled by ``mongodump`` and ``mongorestore`` -``````````````````````````````````````````````````````````````` - -When you specify the ``--collection`` -option to :binary:`~bin.mongodump`, :binary:`~bin.mongodump` will now backup -the definitions for all indexes that exist on the source -database. When you attempt to restore this backup with -:binary:`~bin.mongorestore`, the target :binary:`~bin.mongod` will rebuild all -indexes. See :issue:`SERVER-808` for more information. - -:binary:`~bin.mongorestore` now includes the ``--noIndexRestore`` option -to provide the preceding behavior. Use ``--noIndexRestore`` to prevent -:binary:`~bin.mongorestore` from building previous indexes. - -``mongooplog`` for Replaying Oplogs -``````````````````````````````````` - -The ``mongooplog`` tool makes it possible to pull :term:`oplog` -entries from :binary:`~bin.mongod` instance and apply them to another -:binary:`~bin.mongod` instance. You can use ``mongooplog`` to -achieve point-in-time backup of a MongoDB data set. See the -:issue:`SERVER-3873` case and the ``mongooplog`` -reference. - -Authentication Support for ``mongotop`` and ``mongostat`` -````````````````````````````````````````````````````````` - -:binary:`~bin.mongotop` and :binary:`~bin.mongostat` now contain support for -username/password authentication. See :issue:`SERVER-3875` and -:issue:`SERVER-3871` for more information regarding this change. Also -consider the documentation of the following options for additional -information: - -- ``mongotop --username`` -- ``mongotop --password`` -- ``mongostat --username`` -- ``mongostat --password`` - -Write Concern Support for ``mongoimport`` and ``mongorestore`` -`````````````````````````````````````````````````````````````` - -:binary:`~bin.mongoimport` now provides an option to halt the import if -the operation encounters an error, such as a network interruption, a -duplicate key exception, or a write error. -The ``--stopOnError`` option -will -produce an error rather than silently continue importing data. See -:issue:`SERVER-3937` for more information. - -In :binary:`~bin.mongorestore`, the ``--w`` -option provides support for configurable write concern. - -``mongodump`` Support for Reading from Secondaries -`````````````````````````````````````````````````` - -You can now run :binary:`~bin.mongodump` when connected to a -:term:`secondary` member of a :term:`replica set`. See -:issue:`SERVER-3854` for more information. - -``mongoimport`` Support for full 16MB Documents -``````````````````````````````````````````````` - -Previously, :binary:`~bin.mongoimport` would only import documents that -were less than 4 megabytes in size. This issue is now corrected, and -you may use :binary:`~bin.mongoimport` to import documents that are at -least 16 megabytes ins size. See :issue:`SERVER-4593` for more -information. - -``Timestamp()`` Extended JSON format -```````````````````````````````````` - -MongoDB extended JSON now includes a new ``Timestamp()`` type to -represent the Timestamp type that MongoDB uses for timestamps in the -:term:`oplog` among other contexts. - -This permits tools like ``mongooplog`` and :binary:`~bin.mongodump` -to query for specific timestamps. Consider the following -:binary:`~bin.mongodump` operation: - -.. code-block:: bash - - mongodump --db local --collection oplog.rs --query '{"ts":{"$gt":{"$timestamp" : {"t": 1344969612000, "i": 1 }}}}' --out oplog-dump - -See :issue:`SERVER-3483` for more information. - -Shell Improvements -~~~~~~~~~~~~~~~~~~ - -Improved Shell User Interface -````````````````````````````` - -2.2 includes a number of changes that improve the overall quality and -consistency of the user interface for the ``mongo`` shell: - -- Full Unicode support. - -- Bash-like line editing features. See :issue:`SERVER-4312` for more - information. - -- Multi-line command support in shell history. - See :issue:`SERVER-3470` for more information. - -- Windows support for the ``edit`` command. See :issue:`SERVER-3998` for - more information. - -Helper to load Server-Side Functions -```````````````````````````````````` - -The ``db.loadServerScripts()`` method loads the contents of the current -database's ``system.js`` collection into the current ``mongo`` -shell session. See :issue:`SERVER-1651` for more information. - -Support for Bulk Inserts -```````````````````````` - -If you pass an array of :term:`documents ` to the -:method:`~db.collection.insert()` method, the ``mongo`` -shell will now perform a bulk insert operation. See -:issue:`SERVER-3819` and :issue:`SERVER-2395` for more information. - -.. include:: /includes/note-bulk-inserts-on-sharded-clusters.rst - -Operations -~~~~~~~~~~ - -Support for Logging to Syslog -````````````````````````````` - -See the :issue:`SERVER-2957` case and the documentation of -the :setting:`~systemLog.syslogFacility` run-time option or the :option:`mongod --syslog` -and :option:`mongos --syslog` command line-options. - -``touch`` Command -````````````````` - -Added the ``touch`` command to read the data and/or indexes -from a collection into memory. See: :issue:`SERVER-2023` and -``touch`` for more information. - -``indexCounters`` No Longer Report Sampled Data -``````````````````````````````````````````````` - -``indexCounters`` now report actual counters that reflect index -use and state. In previous versions, these data were sampled. See -:issue:`SERVER-5784` and ``indexCounters`` for more information. - -Padding Specifiable on ``compact`` Command -`````````````````````````````````````````` - -See the documentation of the :dbcommand:`compact` and the -:issue:`SERVER-4018` issue for more information. - -.. todo:: fix documentation and link - -Added Build Flag to Use System Libraries -```````````````````````````````````````` - -The Boost library, version 1.49, is now embedded in the MongoDB -code base. - -If you want to build MongoDB binaries using system Boost libraries, -you can pass ``scons`` using the ``--use-system-boost`` flag, as follows: - -.. code-block:: bash - - scons --use-system-boost - -When building MongoDB, you can also pass ``scons`` a flag to compile -MongoDB using only system libraries rather than the included versions -of the libraries. For example: - -.. code-block:: bash - - scons --use-system-all - -See the :issue:`SERVER-3829` and :issue:`SERVER-5172` issues for more -information. - -Memory Allocator Changed to TCMalloc -```````````````````````````````````` - -To improve performance, MongoDB 2.2 uses the TCMalloc memory -allocator from Google Perftools. For more information about this -change see the :issue:`SERVER-188` and :issue:`SERVER-4683`. For more -information about TCMalloc, see the documentation of `TCMalloc`_ itself. - -.. _`TCMalloc`: http://goog-perftools.sourceforge.net/doc/tcmalloc.html - -Replication -~~~~~~~~~~~ - -Improved Logging for Replica Set Lag -```````````````````````````````````` - -When :term:`secondary` members of a replica set fall behind in -replication, :binary:`~bin.mongod` now provides better reporting in the -log. This makes it possible to track replication in general and -identify what process may produce errors or halt replication. See -:issue:`SERVER-3575` for more information. - -Replica Set Members can Sync from Specific Members -`````````````````````````````````````````````````` - -.. the following has been copied to source/administration/replica-sets.txt - -The new :dbcommand:`replSetSyncFrom` command and new -:method:`rs.syncFrom()` helper in the ``mongo`` shell make it -possible for you to manually configure from which member of the set a -replica will poll :term:`oplog` entries. Use these commands to -override the default selection logic if needed. Always exercise -caution with :dbcommand:`replSetSyncFrom` when overriding the default -behavior. - -Replica Set Members will not Sync from Members Without Indexes Unless ``buildIndexes: false`` -````````````````````````````````````````````````````````````````````````````````````````````` - -.. the following has been copied to source/replication-internals.txt - -To prevent inconsistency between members of replica sets, if the -member of a replica set has -:rsconf:`buildIndexes ` set to ``true``, -other members of the replica set will *not* sync from this member, -unless they also have -:rsconf:`buildIndexes ` set to ``true``. See -:issue:`SERVER-4160` for more information. - -New Option To Configure Index Pre-Fetching during Replication -````````````````````````````````````````````````````````````` - -.. the following has been copied to source/replication-internals.txt - -By default, when replicating options, :term:`secondaries ` -will pre-fetch :ref:`indexes` associated with a query to improve replication -throughput in most cases. The ``replication.secondaryIndexPrefetch`` setting and -```--replIndexPrefetch`` option allow administrators to disable -this feature or allow the :binary:`~bin.mongod` to pre-fetch only the -index on the ``_id`` field. See :issue:`SERVER-6718` for more information. - -Map Reduce Improvements -~~~~~~~~~~~~~~~~~~~~~~~ - -In 2.2 Map Reduce received the following improvements: - -- :issue:`Improved support for sharded MapReduce `, and -- :issue:`MapReduce will retry jobs following a config error `. - -Sharding Improvements -~~~~~~~~~~~~~~~~~~~~~ - -Index on Shard Keys Can Now Be a Compound Index -``````````````````````````````````````````````` - -If your shard key uses the prefix of an existing index, then you do not -need to maintain a separate index for your shard key in addition to -your existing index. This index, however, cannot be a multi-key -index. See the :ref:`sharding-shard-key-indexes` documentation and -:issue:`SERVER-1506` for more information. - -Migration Thresholds Modified -````````````````````````````` - -The :ref:`migration thresholds ` have -changed in 2.2 to permit more even distribution of :term:`chunks -` in collections that have smaller quantities of data. See the -:ref:`sharding-migration-thresholds` documentation for more -information. - -.. Withholding from release notes. Internal feature. - - Option to Disable ``splitVector`` for :binary:`~bin.mongos` Instances - ````````````````````````````````````````````````````````````````` - - By default, all :binary:`~bin.mongos` instances are responsible for - creating chunk splits. For deployments with large numbers of - :binary:`~bin.mongos` instances, this may impact the performance of the - cluster. - - To ameliorate the additional load generated by these operations, - the new :binary:`~bin.mongos` option :option:`--noAutoSplit ` - disables chunk splitting for individual :binary:`~bin.mongos` instances. - - See :issue:`SERVER-6305` for more information. - -Licensing Changes ------------------ - -Added License notice for Google Perftools (TCMalloc Utility). See the -`License Notice `_ -and the :issue:`SERVER-4683` for more information. - -Resources ---------- - -- `MongoDB Downloads `_. -- `All JIRA issues resolved in 2.2 `_. -- `All backwards incompatible changes `_. -- `All third party license notices `_. -- `What's New in MongoDB 2.2 Online Conference `_. diff --git a/source/release-notes/2.4-changelog.txt b/source/release-notes/2.4-changelog.txt deleted file mode 100644 index d4019358130..00000000000 --- a/source/release-notes/2.4-changelog.txt +++ /dev/null @@ -1,104 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -.. _release-notes-2.4: - -============= -2.4 Changelog -============= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -.. _2.4.14-changelog: - -2.4.14 ------- - -- Packaging: Init script sets process ulimit to different value - compared to documentation (:issue:`SERVER-17780`) -- Security: Compute BinData length in v8 (:issue:`SERVER-17647`) -- Build: Upgrade PCRE Version from 8.30 to Latest (:issue:`SERVER-17252`) - -.. _2.4.13-changelog: - -2.4.13 - Changes ----------------- - -- Security: Enforce BSON BinData length validation (:issue:`SERVER-17278`) -- Security: Disable SSLv3 ciphers (:issue:`SERVER-15673`) -- Networking: Improve BSON validation (:issue:`SERVER-17264`) - -.. _2.4.12-changelog: - -2.4.12 - Changes ----------------- - -- Sharding: Sharded connection cleanup on setup error can crash mongos (:issue:`SERVER-15056`) -- Sharding: "type 7" (OID) error when acquiring distributed lock for first time (:issue:`SERVER-13616`) -- Storage: explicitly zero .ns files on creation (:issue:`SERVER-15369`) -- Storage: partially written journal last section causes recovery to fail (:issue:`SERVER-15111`) - -.. _2.4.11-changelog: - -2.4.11 - Changes ----------------- - -- Security: Potential information leak (:issue:`SERVER-14268`) -- Replication: ``_id`` with ``$prefix`` field causes replication failure due to unvalidated insert (:issue:`SERVER-12209`) -- Sharding: Invalid access: seg fault in ``SplitChunkCommand::run`` (:issue:`SERVER-14342`) -- Indexing: Creating descending index on ``_id`` can corrupt namespace (:issue:`SERVER-14833`) -- Text Search: Updates to documents with text-indexed fields may lead to incorrect entries (:issue:`SERVER-14738`) -- Build: Add SCons flag to override treating all warnings as errors (:issue:`SERVER-13724`) -- Packaging: Fix mongodb enterprise 2.4 init script to allow multiple processes per host (:issue:`SERVER-14336`) -- JavaScript: Do not store native function pointer as a property in function prototype (:issue:`SERVER-14254`) - -.. _2.4.10-changelog: - -2.4.10 - Changes ----------------- - -- Indexes: Fixed issue that can cause index corruption when building indexes concurrently (:issue:`SERVER-12990`) -- Indexes: Fixed issue that can cause index corruption when shutting down secondary node during index build (:issue:`SERVER-12956`) -- Indexes: Mongod now recognizes incompatible “future” text and geo index versions and exits gracefully (:issue:`SERVER-12914`) -- Indexes: Fixed issue that can cause secondaries to fail replication when building the same index multiple times concurrently (:issue:`SERVER-12662`) -- Indexes: Fixed issue that can cause index corruption on the tenth index in a collection if the index build fails (:issue:`SERVER-12481`) -- Indexes: Introduced versioning for text and geo indexes to ensure backwards compatibility (:issue:`SERVER-12175`) -- Indexes: Disallowed building indexes on the system.indexes collection, which can lead to initial sync failure on secondaries (:issue:`SERVER-10231`) -- Sharding: Avoid frequent immediate balancer retries when config servers are out of sync (:issue:`SERVER-12908`) -- Sharding: Add indexes to locks collection on config servers to avoid long queries in case of large numbers of collections (:issue:`SERVER-12548`) -- Sharding: Fixed issue that can corrupt the config metadata cache when sharding collections concurrently (:issue:`SERVER-12515`) -- Sharding: Don't move chunks created on collections with a hashed shard key if the collection already contains data (:issue:`SERVER-9259`) -- Replication: Fixed issue where node appears to be down in a replica set during a compact operation (:issue:`SERVER-12264`) -- Replication: Fixed issue that could cause delays in elections when a node is not vetoing an election (:issue:`SERVER-12170`) -- Replication: Step down all primaries if multiple primaries are detected in replica set to ensure correct election result (:issue:`SERVER-10793`) -- Replication: Upon clock skew detection, secondaries will switch to sync directly from the primary to avoid sync cycles (:issue:`SERVER-8375`) -- Runtime: The SIGXCPU signal is now caught and mongod writes a log message and exits gracefully (:issue:`SERVER-12034`) -- Runtime: Fixed issue where mongod fails to start on Linux when /sys/dev/block directory is not readable (:issue:`SERVER-9248`) -- Windows: No longer zero-fill newly allocated files on systems other than Windows 7 or Windows Server 2008 R2 (:issue:`SERVER-8480`) -- GridFS: Chunk size is decreased to 255 kB (from 256 kB) to avoid overhead with usePowerOf2Sizes option (:issue:`SERVER-13331`) -- SNMP: Fixed MIB file validation under smilint (:issue:`SERVER-12487`) -- Shell: Fixed issue in V8 memory allocation that could cause long-running shell commands to crash (:issue:`SERVER-11871`) -- Shell: Fixed memory leak in the md5sumFile shell utility method (:issue:`SERVER-11560`) - -Previous Releases ------------------ - -- `All 2.4.9 improvements `_. -- `All 2.4.8 improvements `_. -- `All 2.4.7 improvements `_. -- `All 2.4.6 improvements `_. -- `All 2.4.5 improvements `_. -- `All 2.4.4 improvements `_. -- `All 2.4.3 improvements `_. -- `All 2.4.2 improvements `_ -- `All 2.4.1 improvements `_. diff --git a/source/release-notes/2.4-index-types.txt b/source/release-notes/2.4-index-types.txt deleted file mode 100644 index 3e8cd23dbc7..00000000000 --- a/source/release-notes/2.4-index-types.txt +++ /dev/null @@ -1,85 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -.. _release-notes-2.4: - -=================================================== -Compatibility and Index Type Changes in MongoDB 2.4 -=================================================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -In 2.4 MongoDB includes two new features related to indexes that users -upgrading to version 2.4 must consider, particularly with regard to -possible downgrade paths. For more information on downgrades, see -:ref:`2.4-downgrade`. - -New Index Types ---------------- - -In 2.4 MongoDB adds two new index types: ``2dsphere`` and -``text``. These index types do not exist in 2.2, and for each -database, creating a ``2dsphere`` or ``text`` index, will upgrade the -data-file version and make that database incompatible with 2.2. - -If you intend to downgrade, you should always drop all ``2dsphere`` -and ``text`` indexes before moving to 2.2. - -You can use the :ref:`downgrade procedure <2.4-downgrade>` to downgrade these -databases and run 2.2 if needed, however this will run a full database -repair (as with ``repairDatabase``) for all affected -databases. - -.. _2.4-index-type-validation: - -Index Type Validation ---------------------- - -In MongoDB 2.2 and earlier you could specify invalid index types that -did not exist. In these situations, MongoDB would create an ascending -(e.g. ``1``) index. Invalid indexes include index types specified by -strings that do not refer to an existing index type, and all numbers -other than ``1`` and ``-1``. [#grandfathered-indexes]_ - -In 2.4, creating any invalid index will result in an error. -Furthermore, you cannot create a ``2dsphere`` or ``text`` index on a -collection if its containing database has any invalid index types. -[#grandfathered-indexes]_ - -.. example:: - - If you attempt to add an invalid index in MongoDB 2.4, as in the - following: - - .. code-block:: javascript - - db.coll.ensureIndex( { field: "1" } ) - - MongoDB will return the following error document: - - .. code-block:: javascript - - { - "err" : "Unknown index plugin '1' in index { field: \"1\" }" - "code": 16734, - "n": , - "connectionId": , - "ok": 1 - } - -.. [#grandfathered-indexes] In 2.4, indexes that specify a type of - ``"1"`` or ``"-1"`` (the strings ``"1"`` and ``"-1"``) will continue - to exist, despite a warning on start-up. **However**, a - :term:`secondary` in a replica set cannot complete an initial sync - from a primary that has a ``"1"`` or ``"-1"`` index. Avoid all - indexes with invalid types. diff --git a/source/release-notes/2.4-javascript.txt b/source/release-notes/2.4-javascript.txt deleted file mode 100644 index fa1be6eff8d..00000000000 --- a/source/release-notes/2.4-javascript.txt +++ /dev/null @@ -1,454 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -================================= -JavaScript Changes in MongoDB 2.4 -================================= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Consider the following impacts of :ref:`2.4-release-javascript-change` in -MongoDB 2.4: - -.. tip:: - - Use the new ``interpreterVersion()`` method in the - ``mongo`` shell and the :data:`~buildInfo.javascriptEngine` - field in the output of :method:`db.serverBuildInfo()` to determine - which JavaScript engine a MongoDB binary uses. - -Improved Concurrency --------------------- - -Previously, MongoDB operations that required the JavaScript interpreter -had to acquire a lock, and a single :binary:`~bin.mongod` could only run a -single JavaScript operation at a time. The switch to V8 improves -concurrency by permitting multiple JavaScript operations to run at the -same time. - -Modernized JavaScript Implementation (ES5) ------------------------------------------- - -The 5th edition of `ECMAscript -`_, -abbreviated as ES5, adds many new language features, including: - -- standardized `JSON - `_, - -- `strict mode - `_, - -- `function.bind() - `_, - -- `array extensions - `_, and - -- getters and setters. - -With V8, MongoDB supports the ES5 implementation of Javascript with the -following exceptions. - -.. note:: - - The following features do not work as expected on documents - **returned from MongoDB queries**: - - - ``Object.seal()`` throws an exception on documents returned from - MongoDB queries. - - - ``Object.freeze()`` throws an exception on documents returned from - MongoDB queries. - - - ``Object.preventExtensions()`` incorrectly allows the addition of - new properties on documents returned from MongoDB queries. - - - ``enumerable`` properties, when added to documents returned from - MongoDB queries, are not saved during write operations. - - See :issue:`SERVER-8216`, :issue:`SERVER-8223`, - :issue:`SERVER-8215`, and :issue:`SERVER-8214` for more information. - - For objects that have not been returned from MongoDB queries, the - features work as expected. - -Removed Non-Standard SpiderMonkey Features ------------------------------------------- - -V8 does **not** support the following *non-standard* `SpiderMonkey -`_ JavaScript -extensions, previously supported by MongoDB's use of SpiderMonkey as -its JavaScript engine. - -E4X Extensions -~~~~~~~~~~~~~~ - -V8 does not support the *non-standard* E4X extensions. E4X -provides a native XML object to the JavaScript language and adds the syntax for embedding -literal XML documents in JavaScript code. - -You need to use alternative XML processing if you used any of the -following constructors/methods: - -- ``XML()`` - -- ``Namespace()`` - -- ``QName()`` - -- ``XMLList()`` - -- ``isXMLName()`` - -Destructuring Assignment -~~~~~~~~~~~~~~~~~~~~~~~~ - -V8 does not support the non-standard destructuring assignments. -Destructuring assignment "extract[s] data from arrays or objects using -a syntax that mirrors the construction of array and object literals." - -`Mozilla docs -`_ - -.. example:: - - The following destructuring assignment is **invalid** with V8 and - throws a ``SyntaxError``: - - .. code-block:: javascript - - original = [4, 8, 15]; - var [b, ,c] = a; // <== destructuring assignment - print(b) // 4 - print(c) // 15 - -``Iterator()``, ``StopIteration()``, and Generators -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -V8 does not support `Iterator(), StopIteration(), and generators -`_. - -``InternalError()`` -~~~~~~~~~~~~~~~~~~~ - -V8 does not support ``InternalError()``. Use ``Error()`` instead. - -``for each...in`` Construct -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -V8 does not support the use of ``for each...in`` -construct. Use ``for (var x in y)`` construct -instead. - -.. example:: - - The following ``for each (var x in y)`` construct is **invalid** - with V8: - - .. code-block:: javascript - - var o = { name: 'MongoDB', version: 2.4 }; - - for each (var value in o) { - print(value); - } - - Instead, in version 2.4, you can use the ``for (var x in y)`` - construct: - - .. code-block:: javascript - - var o = { name: 'MongoDB', version: 2.4 }; - - for (var prop in o) { - var value = o[prop]; - print(value); - } - - You can also use the array *instance* method ``forEach()`` with the - ES5 method ``Object.keys()``: - - .. code-block:: javascript - - Object.keys(o).forEach(function (key) { - var value = o[key]; - print(value); - }); - -Array Comprehension -~~~~~~~~~~~~~~~~~~~ - -V8 does not support `Array comprehensions -`_. - -Use other methods such as the ``Array`` instance methods ``map()``, -``filter()``, or ``forEach()``. - -.. example:: - - With V8, the following array comprehension is **invalid**: - - .. code-block:: javascript - - var a = { w: 1, x: 2, y: 3, z: 4 } - - var arr = [i * i for each (i in a) if (i > 2)] - printjson(arr) - - Instead, you can implement using the ``Array`` *instance* method - ``forEach()`` and the ES5 method ``Object.keys()`` : - - .. code-block:: javascript - - var a = { w: 1, x: 2, y: 3, z: 4 } - - var arr = []; - Object.keys(a).forEach(function (key) { - var val = a[key]; - if (val > 2) arr.push(val * val); - }) - printjson(arr) - - .. note:: - - The new logic uses the ``Array`` *instance* method ``forEach()`` and - not the *generic* method ``Array.forEach()``; V8 does **not** - support ``Array`` *generic* methods. See :ref:`array-generics` for - more information. - -Multiple Catch Blocks -~~~~~~~~~~~~~~~~~~~~~ - -V8 does not support multiple ``catch`` blocks and will throw a -``SyntaxError``. - -.. example:: - - The following multiple catch blocks is **invalid** with V8 and will - throw ``"SyntaxError: Unexpected token if"``: - - .. code-block:: javascript - - try { - something() - } catch (err if err instanceof SomeError) { - print('some error') - } catch (err) { - print('standard error') - } - -Conditional Function Definition -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -V8 will produce different outcomes than SpiderMonkey with `conditional -function definitions -`_. - -.. example:: - - The following conditional function definition produces different - outcomes in SpiderMonkey versus V8: - - .. code-block:: javascript - - function test () { - if (false) { - function go () {}; - } - print(typeof go) - } - - With SpiderMonkey, the conditional function outputs ``undefined``, - whereas with V8, the conditional function outputs ``function``. - - If your code defines functions this way, it is highly recommended - that you refactor the code. The following example refactors the - conditional function definition to work in both SpiderMonkey and V8. - - .. code-block:: javascript - - function test () { - var go; - if (false) { - go = function () {} - } - print(typeof go) - } - - The refactored code outputs ``undefined`` in both SpiderMonkey and V8. - -.. note:: - - ECMAscript prohibits conditional function definitions. To force V8 - to throw an ``Error``, `enable strict mode - `_. - - .. code-block:: javascript - - function test () { - 'use strict'; - - if (false) { - function go () {} - } - } - - The JavaScript code throws the following syntax error: - - .. code-block:: none - - SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function. - -String Generic Methods -~~~~~~~~~~~~~~~~~~~~~~ - -V8 does not support `String generics -`_. -String generics are a set of methods on the ``String`` class that -mirror instance methods. - -.. example:: - - The following use of the generic method - ``String.toLowerCase()`` is **invalid** with V8: - - .. code-block:: javascript - - var name = 'MongoDB'; - - var lower = String.toLowerCase(name); - - With V8, use the ``String`` instance method ``toLowerCase()`` available - through an *instance* of the ``String`` class instead: - - .. code-block:: javascript - - var name = 'MongoDB'; - - var lower = name.toLowerCase(); - print(name + ' becomes ' + lower); - -With V8, use the ``String`` *instance* methods instead of following -*generic* methods: - -.. list-table:: - - * - ``String.charAt()`` - - ``String.quote()`` - - ``String.toLocaleLowerCase()`` - - * - ``String.charCodeAt()`` - - ``String.replace()`` - - ``String.toLocaleUpperCase()`` - - * - ``String.concat()`` - - ``String.search()`` - - ``String.toLowerCase()`` - - * - ``String.endsWith()`` - - ``String.slice()`` - - ``String.toUpperCase()`` - - * - ``String.indexOf()`` - - ``String.split()`` - - ``String.trim()`` - - * - ``String.lastIndexOf()`` - - ``String.startsWith()`` - - ``String.trimLeft()`` - - * - ``String.localeCompare()`` - - ``String.substr()`` - - ``String.trimRight()`` - - * - ``String.match()`` - - ``String.substring()`` - - - -.. _array-generics: - -Array Generic Methods -~~~~~~~~~~~~~~~~~~~~~ - -V8 does not support `Array generic methods -`_. -Array generics are a set of methods on the ``Array`` class that mirror -instance methods. - -.. example:: - - The following use of the generic method ``Array.every()`` is - **invalid** with V8: - - .. code-block:: javascript - - var arr = [4, 8, 15, 16, 23, 42]; - - function isEven (val) { - return 0 === val % 2; - } - - var allEven = Array.every(arr, isEven); - print(allEven); - - With V8, use the ``Array`` instance method ``every()`` available through - an *instance* of the ``Array`` class instead: - - .. code-block:: javascript - - var allEven = arr.every(isEven); - print(allEven); - -With V8, use the ``Array`` *instance* methods instead of the following -*generic* methods: - -.. list-table:: - - * - ``Array.concat()`` - - ``Array.lastIndexOf()`` - - ``Array.slice()`` - - * - ``Array.every()`` - - ``Array.map()`` - - ``Array.some()`` - - * - ``Array.filter()`` - - ``Array.pop()`` - - ``Array.sort()`` - - * - ``Array.forEach()`` - - ``Array.push()`` - - ``Array.splice()`` - - * - ``Array.indexOf()`` - - ``Array.reverse()`` - - ``Array.unshift()`` - - * - ``Array.join()`` - - ``Array.shift()`` - - - -Array Instance Method ``toSource()`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -V8 does not support the ``Array`` instance method `toSource() -`_. -Use the ``Array`` instance method ``toString()`` instead. - -``uneval()`` -~~~~~~~~~~~~ - -V8 does not support the non-standard method ``uneval()``. Use the -standardized `JSON.stringify() -`_ -method instead. diff --git a/source/release-notes/2.4-upgrade.txt b/source/release-notes/2.4-upgrade.txt deleted file mode 100644 index 715e811861a..00000000000 --- a/source/release-notes/2.4-upgrade.txt +++ /dev/null @@ -1,623 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -====================== -Upgrade MongoDB to 2.4 -====================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -In the general case, the upgrade from MongoDB 2.2 to 2.4 is a -binary-compatible "drop-in" upgrade: shut down the :binary:`~bin.mongod` -instances and replace them with :binary:`~bin.mongod` instances running -2.4. **However**, before you attempt any upgrade please familiarize -yourself with the content of this document, particularly the procedure -for :ref:`upgrading sharded clusters <2.4-upgrade-cluster>` and the -considerations for :ref:`reverting to 2.2 after running 2.4 -<2.4-downgrade>`. - -Upgrade Recommendations and Checklist -------------------------------------- - -When upgrading, consider the following: - -- For all deployments using authentication, upgrade the - drivers (i.e. client libraries), before upgrading the - :binary:`~bin.mongod` instance or instances. - -- To upgrade to 2.4 sharded clusters *must* upgrade following the - :ref:`meta-data upgrade procedure <2.4-upgrade-cluster>`. - -- If you're using 2.2.0 and running with :setting:`~security.authorization` enabled, you - will need to upgrade first to 2.2.1 and then upgrade to 2.4. See - :ref:`2.4-upgrade-auth-limitation`. - -- If you have ``system.users`` documents - (i.e. for :setting:`~security.authorization`) that you created before 2.4 you *must* - ensure that there are no duplicate values for the ``user`` field in - the ``system.users`` collection in - *any* database. If you *do* have documents with duplicate user - fields, you must remove them before upgrading. - - See :ref:`2.4-unique-users` for more information. - -.. _2.4-upgrade-standalone: - -Upgrade Standalone ``mongod`` Instance to MongoDB 2.4 ------------------------------------------------------ - -#. Download binaries of the latest release in the 2.4 series from the - `MongoDB Download Page`_. See :doc:`/installation` for more - information. - -#. Shutdown your :binary:`~bin.mongod` instance. Replace the existing - binary with the 2.4 :binary:`~bin.mongod` binary and restart :binary:`~bin.mongod`. - - -.. _`MongoDB Download Page`: http://www.mongodb.org/downloads - -.. _2.4-upgrade-replica-set: - -Upgrade a Replica Set from MongoDB 2.2 to MongoDB 2.4 ------------------------------------------------------ - -You can upgrade to 2.4 by performing a "rolling" -upgrade of the set by upgrading the members individually while the -other members are available to minimize downtime. Use the following -procedure: - -#. Upgrade the :term:`secondary` members of the set one at a time by - shutting down the :binary:`~bin.mongod` and replacing the 2.2 binary - with the 2.4 binary. After upgrading a :binary:`~bin.mongod` instance, - wait for the member to recover to ``SECONDARY`` state - before upgrading the next instance. - To check the member's state, issue :method:`rs.status()` in the - ``mongo`` shell. - -#. Use the ``mongo`` shell method :method:`rs.stepDown()` to - step down the :term:`primary` to allow the normal :ref:`failover - ` procedure. :method:`rs.stepDown()` - expedites the failover procedure and is preferable to shutting down - the primary directly. - - Once the primary has stepped down and another member has assumed - ``PRIMARY`` state, as observed in the output of - :method:`rs.status()`, shut down the previous primary and replace - :binary:`~bin.mongod` binary with the 2.4 binary and start the new - process. - - .. note:: Replica set failover is not instant but will - render the set unavailable to read or accept writes - until the failover process completes. Typically this takes - 10 seconds or more. You may wish to plan the upgrade during - a predefined maintenance window. - -.. _2.4-upgrade-cluster: - -Upgrade a Sharded Cluster from MongoDB 2.2 to MongoDB 2.4 ---------------------------------------------------------- - -.. important:: Only upgrade sharded clusters to 2.4 if **all** members - of the cluster are currently running instances of 2.2. The only - supported upgrade path for sharded clusters running 2.0 is via 2.2. - -Overview -~~~~~~~~ - -Upgrading a :term:`sharded cluster` from MongoDB version 2.2 to 2.4 -(or 2.3) requires that you run a 2.4 :binary:`~bin.mongos` -with the ``--upgrade`` option, described in -this procedure. The upgrade process does not require downtime. - -The upgrade to MongoDB 2.4 adds epochs to the meta-data for all -collections and chunks in the existing cluster. MongoDB 2.2 processes -are capable of handling epochs, even though 2.2 did not require -them. This procedure applies only to upgrades from version 2.2. Earlier -versions of MongoDB do not correctly handle epochs. See -:ref:`2.4-sharded-cluster-meta-data-upgrade` for more information. - -After completing the meta-data upgrade you can fully upgrade the -components of the cluster. With the balancer disabled: - -- Upgrade all :binary:`~bin.mongos` instances in the cluster. - -- Upgrade all 3 :binary:`~bin.mongod` config server instances. - -- Upgrade the :binary:`~bin.mongod` instances for each shard, one at a - time. - -See :ref:`2.4-finalize-shard-cluster-upgrade` for more information. - -.. _2.4-sharded-cluster-meta-data-upgrade: - -Cluster Meta-data Upgrade -~~~~~~~~~~~~~~~~~~~~~~~~~ - -Considerations -`````````````` - -Beware of the following properties of the cluster upgrade process: - -- .. include:: /includes/fact-upgrade-sharded-cluster-prereq.rst - -- While the upgrade is in progress, you cannot make changes to the - collection meta-data. For example, during the upgrade, do **not** - perform: - - - :method:`sh.enableSharding()`, - - - :method:`sh.shardCollection()`, - - - :method:`sh.addShard()`, - - - :method:`db.createCollection()`, - - - :method:`db.collection.drop()`, - - - :method:`db.dropDatabase()`, - - - any operation that creates a database, or - - - any other operation that modifies the cluster meta-data in any - way. See :doc:`/reference/sharding` for a complete list - of sharding commands. Note, however, that not all commands on - the :doc:`/reference/sharding` page modifies the - cluster meta-data. - -- Once you upgrade to 2.4 and complete the upgrade procedure **do - not** use 2.0 :binary:`~bin.mongod` and :binary:`~bin.mongos` processes in - your cluster. 2.0 process may re-introduce old meta-data formats - into cluster meta-data. - -The upgraded config database will require more storage space than -before, to make backup and working copies of the -:data:`config.chunks` and :data:`config.collections` collections. -As always, if storage requirements increase, the :binary:`~bin.mongod` -might need to pre-allocate additional data files. See -:ref:`faq-tools-for-measuring-storage-use` for more information. - -.. _2.4-upgrade-meta-data: - -Meta-data Upgrade Procedure -``````````````````````````` - -Changes to the meta-data format for sharded clusters, stored in the -:doc:`config database `, require a special -meta-data upgrade procedure when moving to 2.4. - -Do not perform operations that modify meta-data while performing this -procedure. See :ref:`2.4-upgrade-cluster` for examples of prohibited -operations. - -#. .. include:: /includes/fact-upgrade-sharded-cluster-prereq.rst - - To check the version of your indexes, use :method:`db.collection.getIndexes()`. - - If any index **on the config database** is ``{v:0}``, you should - rebuild those indexes by connecting to the :binary:`~bin.mongos` and - either: rebuild all indexes using the - :method:`db.collection.reIndex()` method, or drop and rebuild - specific indexes using :method:`db.collection.dropIndex()` and then - :method:`db.collection.ensureIndex()`. If you need to upgrade the - ``_id`` index to ``{v:1}`` use :method:`db.collection.reIndex()`. - - You may have ``{v:0}`` indexes on other databases in the cluster. - -#. Turn off the :ref:`balancer ` in the - :term:`sharded cluster`, as described in - :ref:`sharding-balancing-disable-temporarily`. - - .. note:: Optional - - For additional security during the upgrade, you can make a - backup of the config database using :binary:`~bin.mongodump` or - other backup tools. - -#. Ensure there are no version 2.0 :binary:`~bin.mongod` or - :binary:`~bin.mongos` processes still active in the sharded - cluster. The automated upgrade process checks for 2.0 processes, - but network availability can prevent a definitive check. Wait 5 - minutes after stopping or upgrading version 2.0 :binary:`~bin.mongos` - processes to confirm that none are still active. - -#. Start a single 2.4 :binary:`~bin.mongos` process with - :setting:`~sharding.configDB` pointing to the sharded cluster's :ref:`config - servers ` and with the ``--upgrade`` - option. The upgrade process happens before the - process becomes a daemon (i.e. before - :option:`--fork `.) - - You can upgrade an existing - :binary:`~bin.mongos` instance to 2.4 or you can start a new ``mongos`` - instance that can reach all config servers if you need to avoid - reconfiguring a production :binary:`~bin.mongos`. - - Start the :binary:`~bin.mongos` with a command that resembles the - following: - - .. code-block:: bash - - mongos --configdb --upgrade - - Without the ``--upgrade`` option 2.4 - :binary:`~bin.mongos` processes will fail to start until the upgrade - process is complete. - - The upgrade will prevent any chunk moves or splits from occurring - during the upgrade process. If there are very many sharded - collections or there are stale locks held by other failed processes, - acquiring the locks for all collections can take - seconds or minutes. See the log for progress updates. - -#. When the :binary:`~bin.mongos` process starts successfully, the upgrade is - complete. If the :binary:`~bin.mongos` process fails to start, check the - log for more information. - - If the :binary:`~bin.mongos` terminates or loses its connection to the - config servers during the upgrade, you may always safely retry the - upgrade. - - However, if the upgrade failed during the short critical section, - the :binary:`~bin.mongos` will exit and report that the upgrade will - require manual intervention. To continue the upgrade process, you - must follow the :ref:`upgrade-cluster-resync` procedure. - - .. note:: Optional - - If the :binary:`~bin.mongos` logs show the upgrade waiting for the - upgrade lock, a previous upgrade process may still be active or - may have ended abnormally. After 15 minutes of no remote - activity :binary:`~bin.mongos` will force the upgrade lock. If you - can verify that there are no running upgrade processes, you may - connect to a 2.2 :binary:`~bin.mongos` process and force the lock - manually: - - .. code-block:: bash - - mongo - - .. code-block:: javascript - - db.getMongo().getCollection("config.locks").findOne({ _id : "configUpgrade" }) - - If the process specified in the ``process`` field of this document - is *verifiably* offline, run the following operation to force the - lock. - - .. code-block:: javascript - - db.getMongo().getCollection("config.locks").update({ _id : "configUpgrade" }, { $set : { state : 0 } }) - - It is always more safe to wait for the :binary:`~bin.mongos` to - verify that the lock is inactive, if you have any doubts about - the activity of another upgrade operation. In addition to the - ``configUpgrade``, the :binary:`~bin.mongos` may need to wait for - specific collection locks. Do not force the specific collection - locks. - -#. Upgrade and restart other :binary:`~bin.mongos` processes in the - sharded cluster, *without* the ``--upgrade`` - option. - - See :ref:`2.4-finalize-shard-cluster-upgrade` for more information. - -#. :ref:`Re-enable the balancer - `. You can now perform - operations that modify cluster meta-data. - -Once you have upgraded, *do not* introduce version 2.0 MongoDB -processes into the sharded cluster. This can reintroduce old meta-data -formats into the config servers. The meta-data change made by this -upgrade process will help prevent errors caused by cross-version -incompatibilities in future versions of MongoDB. - -.. _upgrade-cluster-resync: - -Resync after an Interruption of the Critical Section -```````````````````````````````````````````````````` - -During the short critical section of the upgrade that applies changes -to the meta-data, it is unlikely but possible that a network -interruption can prevent all three config servers from verifying or -modifying data. If this occurs, the :ref:`config servers -` must be re-synced, and there may be problems -starting new :binary:`~bin.mongos` processes. The :term:`sharded cluster` -will remain accessible, but avoid all cluster meta-data changes until -you resync the config servers. Operations that change meta-data include: -adding shards, dropping databases, and dropping collections. - -.. note:: - - Only perform the following procedure *if* something (e.g. network, - power, etc.) interrupts the upgrade process during the short - critical section of the upgrade. Remember, you may always safely - attempt the :ref:`meta data upgrade procedure - <2.4-upgrade-meta-data>`. - -To resync the config servers: - -1. Turn off the :ref:`balancer ` in the - sharded cluster and stop all meta-data operations. If you are in the - middle of an upgrade process (:ref:`2.4-upgrade-cluster`), you - have already disabled the balancer. - -#. Shut down two of the three config servers, preferably the last two listed - in the :setting:`~sharding.configDB` string. For example, if your :setting:`~sharding.configDB` - string is ``configA:27019,configB:27019,configC:27019``, shut down - ``configB`` and ``configC``. Shutting down the last two config servers - ensures that most :binary:`~bin.mongos` instances will have - uninterrupted access to cluster meta-data. - -#. :binary:`~bin.mongodump` the data files of the active config server - (``configA``). - -#. Move the data files of the deactivated config servers (``configB`` - and ``configC``) to a backup location. - -#. Create new, empty :term:`data directories `. - -#. Restart the disabled config servers with :option:`--dbpath ` - pointing to the now-empty data directory and :option:`--port ` - pointing to an alternate port (e.g. ``27020``). - -#. Use :binary:`~bin.mongorestore` to repopulate the data files on the - disabled documents from the active - config server (``configA``) to the restarted config servers on the new - port (``configB:27020,configC:27020``). These config servers are now - re-synced. - -#. Restart the restored config servers on the old port, resetting the - port back to the old settings (``configB:27019`` and ``configC:27019``). - -#. In some cases connection pooling may cause spurious failures, as - the :binary:`~bin.mongos` disables old connections only after attempted - use. 2.4 fixes this problem, but to avoid this issue in version - 2.2, you can restart all :binary:`~bin.mongos` instances (one-by-one, - to avoid downtime) and use the :method:`rs.stepDown()` method - before restarting each of the shard :term:`replica set` - :term:`primaries `. - -#. The sharded cluster is now fully resynced; however before you - attempt the upgrade process again, you must manually reset the - upgrade state using a version 2.2 :binary:`~bin.mongos`. Begin by - connecting to the 2.2 :binary:`~bin.mongos` with the ``mongo`` - shell: - - .. code-block:: bash - - mongo - - Then, use the following operation to reset the upgrade process: - - .. code-block:: javascript - - db.getMongo().getCollection("config.version").update({ _id : 1 }, { $unset : { upgradeState : 1 } }) - -#. Finally retry the upgrade process, as in - :ref:`2.4-upgrade-cluster`. - -.. _2.4-finalize-shard-cluster-upgrade: - -Upgrade Sharded Cluster Components -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -After you have successfully completed the meta-data upgrade process -described in :ref:`2.4-upgrade-meta-data`, and the 2.4 -:binary:`~bin.mongos` instance starts, you can upgrade the other processes -in your MongoDB deployment. - -While the balancer is still disabled, upgrade the components of your -sharded cluster in the following order: - -- Upgrade all :binary:`~bin.mongos` instances in the cluster, in any - order. - -- Upgrade all 3 :binary:`~bin.mongod` config server instances, upgrading - the *first* system in the :option:`mongos --configdb` argument - *last*. - -- Upgrade each shard, one at a time, upgrading the :binary:`~bin.mongod` - secondaries before running :dbcommand:`replSetStepDown` and - upgrading the primary of each shard. - -When this process is complete, you can now :ref:`re-enable the -balancer `. - -.. _2.4-upgrade-auth-limitation: - -Rolling Upgrade Limitation for 2.2.0 Deployments Running with ``auth`` Enabled ------------------------------------------------------------------------------- - -MongoDB *cannot* support deployments that mix 2.2.0 and 2.4.0, or -greater, components. MongoDB version 2.2.1 and later processes *can* -exist in mixed deployments with 2.4-series processes. Therefore you -cannot perform a rolling upgrade from MongoDB 2.2.0 to MongoDB -2.4.0. To upgrade a cluster with 2.2.0 components, use one of the -following procedures. - -1. Perform a rolling upgrade of all 2.2.0 processes to the latest - 2.2-series release (e.g. 2.2.3) so that there are no processes in - the deployment that predate 2.2.1. When there are no 2.2.0 - processes in the deployment, perform a rolling upgrade to 2.4.0. - -2. Stop all processes in the cluster. Upgrade all processes to a - 2.4-series release of MongoDB, and start all processes at the same - time. - -Upgrade from 2.3 to 2.4 ------------------------ - -If you used a :binary:`~bin.mongod` from the 2.3 or 2.4-rc (release -candidate) series, you can safely transition these databases to 2.4.0 -or later; *however*, if you created ``2dsphere`` or ``text`` indexes -using a :binary:`~bin.mongod` before v2.4-rc2, you will need to rebuild -these indexes. For example: - -.. code-block:: javascript - - db.records.dropIndex( { loc: "2dsphere" } ) - db.records.dropIndex( "records_text" ) - - db.records.ensureIndex( { loc: "2dsphere" } ) - db.records.ensureIndex( { records: "text" } ) - -.. _2.4-downgrade: - -Downgrade MongoDB from 2.4 to Previous Versions ------------------------------------------------ - -For some cases the on-disk format of data files used by 2.4 and 2.2 -:binary:`~bin.mongod` is compatible, and you can upgrade and downgrade if -needed. However, several new features in 2.4 are incompatible with -previous versions: - -- ``2dsphere`` indexes are incompatible with 2.2 and earlier - :binary:`~bin.mongod` instances. - -- ``text`` indexes are incompatible with 2.2 and earlier - :binary:`~bin.mongod` instances. - -- using a ``hashed`` index as a shard key are incompatible with 2.2 and - earlier :binary:`~bin.mongos` instances. - -- ``hashed`` indexes are incompatible with 2.0 and earlier - :binary:`~bin.mongod` instances. - -.. important:: Collections sharded using hashed shard keys, should - **not** use 2.2 :binary:`~bin.mongod` instances, which cannot correctly - support cluster operations for these collections. - - .. :issue:`SERVER_9776` - -If you completed the :ref:`meta-data upgrade for a sharded cluster -<2.4-upgrade-cluster>`, you can safely downgrade to 2.2 MongoDB -processes. **Do not** use 2.0 processes after completing the upgrade -procedure. - -.. note:: - - In sharded clusters, once you have completed the :ref:`meta-data upgrade - procedure <2.4-upgrade-cluster>`, you cannot use 2.0 - :binary:`~bin.mongod` or :binary:`~bin.mongos` instances in the same - cluster. - - If you complete the meta-data upgrade, you can safely downgrade - components in any order. When upgrade again, always - upgrade :binary:`~bin.mongos` instances before :binary:`~bin.mongod` instances. - - **Do not** create ``2dsphere`` or ``text`` indexes in a cluster - that has 2.2 components. - -Considerations and Compatibility -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you upgrade to MongoDB 2.4, and then need to run MongoDB 2.2 with -the same data files, consider the following limitations. - -- If you use a ``hashed`` index as the shard key index, which is only - possible under 2.4 you will not be able to query data in this - sharded collection. Furthermore, a 2.2 :binary:`~bin.mongos` cannot - properly route an insert operation for a collections sharded using a - ``hashed`` index for the shard key index: any data that you insert - using a 2.2 :binary:`~bin.mongos`, will not arrive on the correct shard - and will not be reachable by future queries. - -- If you *never* create an ``2dsphere`` or ``text`` index, you can - move between a 2.4 and 2.2 :binary:`~bin.mongod` for a given data set; - however, after you create the first ``2dsphere`` or ``text`` index - with a 2.4 :binary:`~bin.mongod` you will need to run a 2.2 - :binary:`~bin.mongod` with the :option:`--upgrade ` - option and drop any ``2dsphere`` or ``text`` index. - -Upgrade and Downgrade Procedures -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Basic Downgrade and Upgrade -``````````````````````````` - -**Except** as described below, moving between 2.2 and 2.4 is a drop-in -replacement: - -- stop the existing :binary:`~bin.mongod`, using the :option:`--shutdown - ` option as follows: - - .. code-block:: bash - - mongod --dbpath /var/mongod/data --shutdown - - Replace ``/var/mongod/data`` with your MongoDB :setting:`~storage.dbPath`. - -- start the new :binary:`~bin.mongod` processes with the same - :setting:`~storage.dbPath` setting, for example: - - .. code-block:: bash - - mongod --dbpath /var/mongod/data - - Replace ``/var/mongod/data`` with your MongoDB :setting:`~storage.dbPath`. - -.. _2.4-downgrade-pdfile: - -Downgrade to 2.2 After Creating a ``2dsphere`` or ``text`` Index -```````````````````````````````````````````````````````````````` - -If you have created ``2dsphere`` or ``text`` indexes while running a -2.4 :binary:`~bin.mongod` instance, you can downgrade at any time, by -starting the ``2.2`` :binary:`~bin.mongod` with the :option:`--upgrade -` option as follows: - -.. code-block:: bash - - mongod --dbpath /var/mongod/data/ --upgrade - -Then, you will need to drop any existing ``2dsphere`` or ``text`` -indexes using :method:`db.collection.dropIndex()`, for example: - -.. code-block:: javascript - - db.records.dropIndex( { loc: "2dsphere" } ) - db.records.dropIndex( "records_text" ) - -.. warning:: - - :option:`--upgrade ` will run - ``repairDatabase`` on any database where you have created - a ``2dsphere`` or ``text`` index, which will rebuild *all* - indexes. - -Troubleshooting Upgrade/Downgrade Operations -```````````````````````````````````````````` - -If you do not use :option:`--upgrade `, when you -attempt to start a 2.2 :binary:`~bin.mongod` and you have created a -``2dsphere`` or ``text`` index, :binary:`~bin.mongod` will return the -following message: - -.. code-block:: none - - 'need to upgrade database index_plugin_upgrade with pdfile version 4.6, new version: 4.5 Not upgrading, exiting' - -While running 2.4, to check the data file version of a MongoDB -database, use the following operation in the shell: - -.. code-block:: javascript - - db.getSiblingDB('').stats().dataFileVersion - -The major data file [#pdfile-version]_ version for both 2.2 and 2.4 is -``4``, the minor data file version for 2.2 is ``5`` and the minor data -file version for 2.4 is ``6`` **after** you create a ``2dsphere`` or -``text`` index. - -.. [#pdfile-version] The data file version (i.e. ``pdfile version``) - is independent and unrelated to the release version of MongoDB. diff --git a/source/release-notes/2.4.txt b/source/release-notes/2.4.txt deleted file mode 100644 index 18f540764ad..00000000000 --- a/source/release-notes/2.4.txt +++ /dev/null @@ -1,450 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -============================= -Release Notes for MongoDB 2.4 -============================= - -*March 19, 2013* - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -MongoDB 2.4 includes enhanced geospatial support, switch to V8 JavaScript -engine, security enhancements, and text search (beta) and hashed index. - -Patch Releases --------------- - -.. toctree:: - - /release-notes/2.4-changelog - -2.4.14 -- April 28, 2015 -~~~~~~~~~~~~~~~~~~~~~~~~ - -- Init script sets process ulimit to different value compared to - documentation :issue:`SERVER-17780` - -- Compute BinData length in v8 :issue:`SERVER-17647` - -- Upgrade PCRE Version from 8.30 to Latest :issue:`SERVER-17252` - -- :ref:`2.4.14 Changelog <2.4.14-changelog>`. - -- `All 2.4.14 improvements `_. - -2.4.13 -- February 25, 2015 -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Enforce BSON BinData length validation :issue:`SERVER-17278` - -- Disable SSLv3 ciphers :issue:`SERVER-15673` - -- Improve BSON validation :issue:`SERVER-17264` - -- :ref:`2.4.13 Changelog <2.4.13-changelog>`. - -- `All 2.4.13 improvements `_. - -2.4.12 -- October 16, 2014 -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Partially written journal last section causes recovery to fail :issue:`SERVER-15111`. - -- Explicitly zero ``.ns`` files on creation :issue:`SERVER-15369`. - -- :ref:`2.4.12 Changelog <2.4.12-changelog>`. - -- `All 2.4.12 improvements `_. - -2.4.11 -- August 18, 2014 -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Fixed potential information leak: :issue:`SERVER-14268`. - -- Resolved issue were an ``_id`` with a ``$prefix`` field caused - replication failure due to unvalidated insert :issue:`SERVER-12209`. - -- Addressed issue where updates to documents with text-indexed fields - could lead to incorrect entries :issue:`SERVER-14738`. - -- Resolved issue where creating descending index on ``_id`` could - corrupt namespace :issue:`SERVER-14833`. - -- :ref:`2.4.11 Changelog <2.4.11-changelog>`. - -- `All 2.4.11 improvements `_. - -2.4.10 -- April 4, 2014 -~~~~~~~~~~~~~~~~~~~~~~~ - -- Performs fast file allocation on Windows when available :issue:`SERVER-8480`. - -- Start elections if more than one primary is detected :issue:`SERVER-10793`. - -- Changes to allow safe downgrading from v2.6 to v2.4 :issue:`SERVER-12914`, :issue:`SERVER-12175`. - -- Fixes for edge cases in index creation :issue:`SERVER-12481`, :issue:`SERVER-12956`. - -- :ref:`2.4.10 Changelog <2.4.10-changelog>`. - -- `All 2.4.10 improvements `_. - -2.4.9 -- January 10, 2014 -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Fix for instances where :binary:`~bin.mongos` incorrectly reports a - successful write :issue:`SERVER-12146`. - -- Make non-primary read preferences consistent with ``slaveOK`` - versioning logic :issue:`SERVER-11971`. - -- Allow new sharded cluster connections to read from secondaries when - primary is down :issue:`SERVER-7246`. - -- `All 2.4.9 improvements `_. - -2.4.8 -- November 1, 2013 -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Increase future compatibility for 2.6 authorization features - :issue:`SERVER-11478`. - -- Fix :dbcommand:`dbHash` cache issue for config servers - :issue:`SERVER-11421`. - -- `All 2.4.8 improvements `_. - -2.4.7 -- October 21, 2013 -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Fixed over-aggressive caching of V8 Isolates :issue:`SERVER-10596`. - -- Removed extraneous initial count during mapReduce - :issue:`SERVER-9907`. - -- Cache results of dbhash command :issue:`SERVER-11021`. - -- Fixed memory leak in aggregation :issue:`SERVER-10554`. - -- `All 2.4.7 improvements `_. - -2.4.6 -- August 20, 2013 -~~~~~~~~~~~~~~~~~~~~~~~~ - -- Fix for possible loss of documents during the chunk migration process - if a document in the chunk is very large :issue:`SERVER-10478`. - -- Fix for C++ client shutdown issues :issue:`SERVER-8891`. - -- Improved replication robustness in presence of high network latency - :issue:`SERVER-10085`. - -- Improved Solaris support :issue:`SERVER-9832`, :issue:`SERVER-9786`, - and :issue:`SERVER-7080`. - -- `All 2.4.6 improvements `_. - -2.4.5 -- July 3, 2013 -~~~~~~~~~~~~~~~~~~~~~ - -- Fix for CVE-2013-4650 Improperly grant user system privileges on - databases other than local :issue:`SERVER-9983`. - -- Fix for CVE-2013-3969 Remotely triggered segmentation fault in Javascript engine - :issue:`SERVER-9878`. - -- Fix to prevent identical background indexes from being built - :issue:`SERVER-9856`. - -- Config server performance improvements :issue:`SERVER-9864` and - :issue:`SERVER-5442`. - -- Improved initial sync resilience to network failure :issue:`SERVER-9853`. - -- `All 2.4.5 improvements `_. - -2.4.4 -- June 4, 2013 -~~~~~~~~~~~~~~~~~~~~~ - -- Performance fix for Windows version :issue:`SERVER-9721` - -- Fix for config upgrade failure :issue:`SERVER-9661`. - -- Migration to Cyrus SASL library for MongoDB Enterprise :issue:`SERVER-8813`. - -- `All 2.4.4 improvements `_. - -2.4.3 -- April 23, 2013 -~~~~~~~~~~~~~~~~~~~~~~~ - -- Fix for ``mongo`` shell ignoring modified object's ``_id`` field - :issue:`SERVER-9385`. - -- Fix for race condition in log rotation :issue:`SERVER-4739`. - -- Fix for ``copydb`` command with authorization in a sharded cluster - :issue:`SERVER-9093`. - -- `All 2.4.3 improvements `_. - -2.4.2 -- April 17, 2013 -~~~~~~~~~~~~~~~~~~~~~~~ - -- Several V8 memory leak and performance fixes :issue:`SERVER-9267` and - :issue:`SERVER-9230`. - -- Fix for upgrading sharded clusters :issue:`SERVER-9125`. - -- Fix for high volume connection crash :issue:`SERVER-9014`. - -- `All 2.4.2 improvements `_ - -2.4.1 -- April 17, 2013 -~~~~~~~~~~~~~~~~~~~~~~~ - -- Fix for losing index changes during initial sync :issue:`SERVER-9087` - -- `All 2.4.1 improvements `_. - -Major New Features ------------------- - -The following changes in MongoDB affect both standard and Enterprise -editions: - -.. _2.4-release-text-indexes: - -Text Search -~~~~~~~~~~~ - -Add support for text search of content in MongoDB databases as a -*beta* feature. See :ref:`` for more information. - -.. _2.4-release-geospatial: - -Geospatial Support Enhancements -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Add new :ref:`2dsphere index <2dsphere-index>`. The new index - supports `GeoJSON `_ objects - ``Point``, ``LineString``, and ``Polygon``. See - :ref:`2dsphere-index` and :doc:`/geospatial-queries`. - -- Introduce operators :query:`$geometry`, :query:`$geoWithin` and - :query:`$geoIntersects` to work with the GeoJSON data. - -.. _2.4-release-hashed-indexes: - -Hashed Index -~~~~~~~~~~~~ - -Add new :ref:`hashed index ` to index documents -using hashes of field values. When used to index a shard key, the -hashed index ensures an evenly distributed shard key. See also -:ref:`sharding-hashed-sharding`. - -.. DOCS-752 - -Improvements to the Aggregation Framework -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Improve support for geospatial queries. See the - :query:`$geoWithin` operator and the :pipeline:`$geoNear` pipeline - stage. - -- Improve sort efficiency when the :pipeline:`$sort` stage immediately - precedes a :pipeline:`$limit` in the pipeline. - -- Add new operators :expression:`$millisecond` and - :expression:`$concat` and modify how :group:`$min` operator processes - ``null`` values. - -.. _2.4-fixed-size-arrays: - -Changes to Update Operators -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Add new :update:`$setOnInsert` operator for use with - :method:`upsert ` . - -- Enhance functionality of the :update:`$push` operator, supporting - its use with the :update:`$each`, the :update:`$sort`, and the - :update:`$slice` modifiers. - -Additional Limitations for Map-Reduce and ``$where`` Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The :dbcommand:`mapReduce` command, :v2.4:`group ` command, and -the :query:`$where` operator expressions cannot access certain -global functions or properties, such as ``db``, that are available -in the ``mongo`` shell. See the individual command or -operator for details. - -.. _2.4-release-server-status: - -Improvements to ``serverStatus`` Command -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Provide additional metrics and customization for the -:dbcommand:`serverStatus` command. See :method:`db.serverStatus()` -and :dbcommand:`serverStatus` for more information. - -.. _2.4-privilege-documents: -.. _2.4-unique-users: - -Security Enhancements ---------------------- - -- Introduce a role-based access control system - :v2.4:`User Privileges ` now use a new - format for ``Privilege Documents``. - -- Enforce uniqueness of the user in user privilege documents per - database. Previous versions of MongoDB did not enforce this - requirement, and existing databases may have duplicates. - -- Support encrypted connections using SSL certificates signed by a - Certificate Authority. See :doc:`/tutorial/configure-ssl`. - -For more information on security and risk management strategies, see -:ref:`MongoDB Security Practices and Procedures `. - -Performance Improvements ------------------------- - -.. _2.4-release-javascript-change: - -V8 JavaScript Engine -~~~~~~~~~~~~~~~~~~~~ - -.. toctree:: - - /release-notes/2.4-javascript - -Change default JavaScript engine from SpiderMonkey to V8. The change -provides improved concurrency for JavaScript operations, modernized -JavaScript implementation, and the removal of non-standard -SpiderMonkey features, and affects all JavaScript behavior including -the commands :dbcommand:`mapReduce`, :v2.4:`group `, and -``eval`` and the query operator :query:`$where`. - -See :doc:`/release-notes/2.4-javascript` for more information about -all changes . - -BSON Document Validation Enabled by Default for ``mongod`` and ``mongorestore`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Enable basic :term:`BSON` object validation for :binary:`~bin.mongod` -and :binary:`~bin.mongorestore` when writing to MongoDB data files. See -:setting:`~net.wireObjectCheck` for details. - -Index Build Enhancements -~~~~~~~~~~~~~~~~~~~~~~~~ - -- Add support for multiple concurrent index builds in the background by - a single :binary:`~bin.mongod` instance. See :ref:`building indexes in - the background ` for more information on - background index builds. - -- Allow the :method:`db.killOp()` method to terminate a foreground - index build. - -- Improve index validation during index creation. See - :doc:`/release-notes/2.4-index-types` for more information. - -Set Parameters as Command Line Options -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Provide ``--setParameter`` as a command line option for -:binary:`~bin.mongos` and :binary:`~bin.mongod`. See :binary:`~bin.mongod` and -:binary:`~bin.mongos` for list of available options for -:setting:`setParameter`. - -Changed Replication Behavior for Chunk Migration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default, each document move during :ref:`chunk migration -` in a :term:`sharded cluster` propagates to -at least one secondary before the balancer proceeds with its next -operation. See :ref:`chunk-migration-replication`. - -Improved Chunk Migration Queue Behavior -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Increase performance for moving multiple chunks off an overloaded -shard. The balancer no longer waits for the current migration's -delete phase to complete before starting the next chunk migration. -See :ref:`chunk-migration-queuing` for details. - -.. _mongodb-enterprise: - -Enterprise ----------- - -The following changes are specific to MongoDB Enterprise Editions: - -.. _2.4.4-sasl-change: - -SASL Library Change -~~~~~~~~~~~~~~~~~~~ - -In 2.4.4, MongoDB Enterprise uses Cyrus SASL. Earlier 2.4 Enterprise -versions use GNU SASL (``libgsasl``). To upgrade to 2.4.4 MongoDB -Enterprise or greater, you **must** install all package dependencies -related to this change, including the appropriate Cyrus SASL ``GSSAPI`` -library. See :doc:`/administration/install-enterprise` for details of -the dependencies. - -.. _kerberos-authentication: - -New Modular Authentication System with Support for Kerberos -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In 2.4, the MongoDB Enterprise now supports authentication via a -Kerberos mechanism. See -:doc:`/tutorial/control-access-to-mongodb-with-kerberos-authentication` -for more information. For drivers that provide support for -Kerberos authentication to MongoDB, refer to :ref:`kerberos-and-drivers`. - -For more information on security and risk management strategies, see -:ref:`MongoDB Security Practices and Procedures `. - -Additional Information ----------------------- - -Platform Notes -~~~~~~~~~~~~~~ - -For macOS, MongoDB 2.4 only supports macOS versions 10.6 (Snow Leopard) -and later. There are no other platform support changes in MongoDB -2.4. See the `downloads page `_ for -more information on platform support. - -Upgrade Process -~~~~~~~~~~~~~~~ - -.. toctree:: - - /release-notes/2.4-upgrade - /release-notes/2.4-index-types - -See :doc:`/release-notes/2.4-upgrade` for full upgrade instructions. - -Other Resources -~~~~~~~~~~~~~~~ - -- `MongoDB Downloads `_. -- `All JIRA issues resolved in 2.4 `_. -- `All Backwards incompatible changes `_. -- `All Third Party License Notices `_. diff --git a/source/release-notes/2.6-changelog.txt b/source/release-notes/2.6-changelog.txt deleted file mode 100644 index ed5c112ee71..00000000000 --- a/source/release-notes/2.6-changelog.txt +++ /dev/null @@ -1,911 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -============= -2.6 Changelog -============= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: twocols - -.. include:: /includes/changelogs/releases/2.6.12.rst - -.. _2.6.11-changelog: - -2.6.11 -- Changes ------------------ - -Querying -~~~~~~~~ - -- :issue:`SERVER-19553` \ :binary:`~bin.mongod` shouldn't use ``sayPiggyBack`` to send ``killCursor`` messages -- :issue:`SERVER-18620` Reduce frequency of "``staticYield can't unlock``" log message -- :issue:`SERVER-18461` Range predicates comparing against a BinData value should be covered, but are not in 2.6 -- :issue:`SERVER-17815` Plan ranking tie breaker is computed incorrectly -- :issue:`SERVER-16265` Add query details to getmore entry in profiler and :method:`db.currentOp()` -- :issue:`SERVER-15217` v2.6 query plan ranking test "``NonCoveredIxisectFetchesLess``" relies on order of deleted record list -- :issue:`SERVER-14070` Compound index not providing sort if equality predicate given on sort field - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-18280` ``ReplicaSetMonitor`` should use ``electionId`` to avoid talking to old primaries -- :issue:`SERVER-18795` \ :method:`db.printSlaveReplicationInfo()`/\ :method:`rs.printSlaveReplicationInfo()` can not work with ``ARBITER`` role - -Sharding -~~~~~~~~ - -- :issue:`SERVER-19464` \ :pipeline:`$sort` stage in aggregation doesn't call scoped connections done () -- :issue:`SERVER-18955` \ :binary:`~bin.mongos` doesn't set batch size (and keeps the old one, 0) on getMore if performed on first ``_cursor->more()`` - -Indexing -~~~~~~~~ - -- :issue:`SERVER-19559` Document growth of "key too large" document makes it disappear from the index -- :issue:`SERVER-16348` ``Assertion failure n >= 0 && n < static_cast(_files.size()) src/mongo/db/storage/extent_manager.cpp 109`` -- :issue:`SERVER-13875` \ :method:`~db.collection.ensureIndex()` of ``2dsphere`` index breaks after upgrading to 2.6 (with the new ``createIndex`` command) - -Networking -~~~~~~~~~~ - -:issue:`SERVER-19389` Remove wire level endianness check - -Build and Testing -~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-18097` Remove ``mongosTest_auth`` and ``mongosTest_WT`` tasks from ``evergreen.yml`` -- :issue:`SERVER-18068` Coverity analysis defect 72413: Resource leak -- :issue:`SERVER-18371` Add SSL library config detection - -.. _2.6.10-changelog: - -2.6.10 -- Changes ------------------ - -Security -~~~~~~~~ - -- :issue:`SERVER-18312` Upgrade PCRE to latest -- :issue:`SERVER-17812` LockPinger has audit-related GLE failure -- :issue:`SERVER-17647` Compute BinData length in v8 -- :issue:`SERVER-17591` Add SSL flag to select supported protocols -- :issue:`SERVER-16849` On mongos we always invalidate the user cache once, even if no user definitions are changing -- :issue:`SERVER-11980` Improve user cache invalidation enforcement on mongos - -Querying -~~~~~~~~ - -- :issue:`SERVER-18364` Ensure non-negation predicates get chosen over negation predicates for multikey index bounds construction -- :issue:`SERVER-17815` Plan ranking tie breaker is computed incorrectly -- :issue:`SERVER-16256` $all clause with elemMatch uses wider bounds than needed - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-18211` MongoDB fails to correctly roll back collection creation -- :issue:`SERVER-17771` Reconfiguring a replica set to remove a node causes a segmentation fault on 2.6.8 -- :issue:`SERVER-13542` Expose electionId on primary in isMaster - -Sharding -~~~~~~~~ - -- :issue:`SERVER-17812` LockPinger has audit-related GLE failure -- :issue:`SERVER-17805` logOp / OperationObserver should always check shardversion -- :issue:`SERVER-17749` :dbcommand:`collMod` \ ``usePowerOf2Sizes`` fails on :binary:`~bin.mongos` -- :issue:`SERVER-11980` Improve user cache invalidation enforcement on :binary:`~bin.mongos` - -Storage -~~~~~~~ - -- :issue:`SERVER-18211` MongoDB fails to correctly roll back collection creation -- :issue:`SERVER-17653` ERROR: socket XXX is higher than 1023; not supported on 2.6.* - -Indexing -~~~~~~~~ - -:issue:`SERVER-17018` Assertion failure false -``src/mongo/db/structure/btree/key.cpp`` Line 433 on remove operation - -Write Ops -~~~~~~~~~ - -- :issue:`SERVER-18111` :binary:`~bin.mongod` allows user inserts into ``system.profile`` collection -- :issue:`SERVER-13542` Expose ``electionId`` on primary in ``isMaster`` - -Networking -~~~~~~~~~~ - -- :issue:`SERVER-18096` Shard primary incorrectly reuses closed sockets after relinquish and re-election -- :issue:`SERVER-17591` Add SSL flag to select supported protocols - -Build and Packaging -~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-18344` logs should be sent to updated logkeeper server -- :issue:`SERVER-18082` Change smoke.py buildlogger command line options to environment variables -- :issue:`SERVER-18312` Upgrade PCRE to latest -- :issue:`SERVER-17780` Init script sets process ulimit to different value compared to documentation -- :issue:`SERVER-16563` Debian repo component mismatch - mongodb/10gen - -Shell -~~~~~ - -:issue:`SERVER-17951` db.currentOp() fails with read preference set - -Testing -~~~~~~~ - -- :issue:`SERVER-18262` setup_multiversion_mongodb should retry links download on timeouts -- :issue:`SERVER-18229` ``smoke.py`` with PyMongo 3.0.1 fails to run certain tests -- :issue:`SERVER-18073` Fix ``smoke.py`` to work with PyMongo 3.0 - -.. _2.6.9-changelog: - -2.6.9 -- Changes ----------------- - -Security -~~~~~~~~ - -:issue:`SERVER-16073` Create hidden ``net.ssl.sslCipherConfig`` flag - -Querying -~~~~~~~~ - -- :issue:`SERVER-14723` Crash during query planning for ``geoNear`` command with multiple ``2dsphere`` indexes -- :issue:`SERVER-14071` For queries with :method:`~cursor.sort()`, bad non-blocking plan can be cached if there are zero results -- :issue:`SERVER-8188` Configurable idle cursor timeout - -Replication and Sharding -~~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-17429` the message logged when changing sync target due to stale data should format OpTimes in a consistent way -- :issue:`SERVER-17441` \ :binary:`~bin.mongos` crash right after "not master" error - -Storage -~~~~~~~ - -:issue:`SERVER-15907` Use ``ftruncate`` rather than ``fallocate`` when running on ``tmpfs`` - -Aggregation Framework -~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-17426` Aggregation framework query by ``_id`` returns duplicates in sharded cluster (orphan documents) -- :issue:`SERVER-17224` Aggregation pipeline with 64MB document can terminate server - -Build and Platform -~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-17484` Migrate server MCI config into server repo -- :issue:`SERVER-17252` Upgrade PCRE Version from 8.30 to Latest - -Diagnostics and Internal Code -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-17226` \ :dbcommand:`top` command with 64MB result document can terminate server -- :issue:`SERVER-17338` NULL pointer crash when running ``copydb`` against stepped-down 2.6 primary -- :issue:`SERVER-14992` Query for Windows 7 File Allocation Fix, and other hotfixes - -.. _2.6.8-changelog: - -2.6.8 -- Changes ----------------- - -Security and Networking -~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-17278` BSON BinData validation enforcement -- :issue:`SERVER-17022` No SSL Session Caching may not be respected -- :issue:`SERVER-17264` improve bson validation - -Query and Aggregation -~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-16655` Geo predicate is unable to use compound 2dsphere index if it is root of :query:`$or` clause -- :issue:`SERVER-16527` ``2dsphere`` explain reports "works" for ``nscanned`` & ``nscannedObjects`` -- :issue:`SERVER-15802` Query optimizer should always use equality predicate over unique index when possible -- :issue:`SERVER-14044` Incorrect ``{$meta: 'text'}`` reference in aggregation :pipeline:`$sort` error message - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-16599` ``copydb`` and ``clone`` commands can crash the server if a primary steps down -- :issue:`SERVER-16315` Replica set nodes should not threaten to veto nodes whose config version is higher than their own -- :issue:`SERVER-16274` secondary ``fasserts`` trying to replicate an index -- :issue:`SERVER-15471` Better error message when replica is not found in ``GhostSync::associateSlave`` - -Sharding -~~~~~~~~ - -- :issue:`SERVER-17191` Spurious warning during upgrade of sharded cluster -- :issue:`SERVER-17163` Fatal error "logOp but not primary" in ``MigrateStatus::go`` -- :issue:`SERVER-16984` ``UpdateLifecycleImpl`` can return empty ``collectionMetadata`` even if ``ns`` is sharded -- :issue:`SERVER-10904` Possible for ``_master`` and ``_slaveConn`` to be pointing to different connections even with primary read pref - -Storage -~~~~~~~ - -- :issue:`SERVER-17087` Add listCollections command functionality to 2.6 shell & client -- :issue:`SERVER-14572` Increase C runtime stdio file limit - -Tools -~~~~~ - -- :issue:`SERVER-17216` 2.6 :binary:`~bin.mongostat` cannot be used with 3.0 :binary:`~bin.mongod` -- :issue:`SERVER-14190` :binary:`~bin.mongorestore` ``parseMetadataFile`` passes non-null terminated string to '``fromjson``' - -Build and Packaging -~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-14803` Support static libstdc++ builds for non-Linux builds -- :issue:`SERVER-15400` Create Windows Enterprise Zip File with vcredist and dependent dlls - -Usability -~~~~~~~~~ - -:issue:`SERVER-14756` The YAML ``storage.quota.enforced`` option is not found - -Testing -~~~~~~~ - -:issue:`SERVER-16421` ``sharding_rs2.js`` should clean up data on all replicas - -.. _2.6.7-changelog: - -2.6.7 -- Changes ----------------- - -Stability -~~~~~~~~~ - -- :issue:`SERVER-16237` Don't check the shard version if the primary server is down - -Querying -~~~~~~~~ - -- :issue:`SERVER-16408` ``max_time_ms.js`` should not run in parallel suite. - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-16732` ``SyncSourceFeedback::replHandshake()`` may - perform an illegal erase from a ``std::map`` in some circumstances - -Sharding -~~~~~~~~ - -- :issue:`SERVER-16683` Decrease mongos memory footprint when shards - have several tags - -- :issue:`SERVER-15766` prefix_shard_key.js depends on primary - allocation to particular shards - -- :issue:`SERVER-14306` :binary:`~bin.mongos` can cause shards to hit the - in-memory sort limit by requesting more results than needed. - -Packaging -~~~~~~~~~ - -- :issue:`SERVER-16081` ``/etc/init.d/mongod`` startup script fails, with dirname message - -.. _2.6.6-changelog: - -2.6.6 -- Changes ----------------- - -Security -~~~~~~~~ - -- :issue:`SERVER-15673` Disable SSLv3 ciphers -- :issue:`SERVER-15515` New test for mixed version replSet, 2.4 primary, user updates -- :issue:`SERVER-15500` New test for system.user operations - -Stability -~~~~~~~~~ - -- :issue:`SERVER-12061` Do not silently ignore read errors when syncing a replica set node -- :issue:`SERVER-12058` Primary should abort if encountered problems writing to the oplog - -Querying -~~~~~~~~ - -- :issue:`SERVER-16291` Cannot set/list/clear index filters on the secondary -- :issue:`SERVER-15958` The "isMultiKey" value is not correct in the output of aggregation explain plan -- :issue:`SERVER-15899` Querying against path in document containing long array of subdocuments with nested arrays causes stack overflow -- :issue:`SERVER-15696` :query:`$regex`, :query:`$in` and :update:`$sort` with index returns too many results -- :issue:`SERVER-15639` Text queries can return incorrect results and leak memory when multiple predicates given on same text index prefix field -- :issue:`SERVER-15580` Evaluating candidate query plans with concurrent writes on same collection may crash :binary:`~bin.mongod` -- :issue:`SERVER-15528` Distinct queries can scan many index keys without yielding read lock -- :issue:`SERVER-15485` CanonicalQuery::canonicalize can leak a LiteParsedQuery -- :issue:`SERVER-15403` ``$min`` and ``$max`` equal errors in 2.6 but not in 2.4 -- :issue:`SERVER-15233` Cannot run ``planCacheListQueryShapes`` on a Secondary -- :issue:`SERVER-14799` :dbcommand:`count` with hint doesn't work when hint is a document - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-16107` 2.6 :binary:`~bin.mongod` crashes with segfault when added to a 2.8 replica set with >= 12 nodes. -- :issue:`SERVER-15994` ``listIndexes`` and ``listCollections`` can be run on secondaries without slaveOk bit -- :issue:`SERVER-15849` do not forward replication progress for nodes that are no longer part of a replica set -- :issue:`SERVER-15491` ``SyncSourceFeedback`` can crash due to a ``SocketException`` in ``authenticateInternalUser`` - -Sharding -~~~~~~~~ - -- :issue:`SERVER-15318` ``copydb`` should not use exhaust flag when used against :binary:`~bin.mongos` -- :issue:`SERVER-14728` Shard depends on string comparison of replica set connection string -- :issue:`SERVER-14506` special top chunk logic can move max chunk to a shard with incompatible tag -- :issue:`SERVER-14299` For sharded limit=N queries with sort, mongos can request >N results from shard -- :issue:`SERVER-14080` Have migration result reported in the changelog correctly -- :issue:`SERVER-12472` Fail MoveChunk if an index is needed on TO shard and data exists - -Storage -~~~~~~~ - -- :issue:`SERVER-16283` Can't start new wiredtiger node with log file or config file in data directory - false detection of old ``mmapv1`` files -- :issue:`SERVER-15986` Starting with different storage engines in the same dbpath should error/warn -- :issue:`SERVER-14057` Changing TTL expiration time with collMod does not correctly update index definition - -Indexing and write Operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-14287` ensureIndex can abort reIndex and lose indexes -- :issue:`SERVER-14886` Updates against paths composed with array index notation and positional operator fail with error - -Data Aggregation -~~~~~~~~~~~~~~~~ - -:issue:`SERVER-15552` Errors writing to temporary collections during :dbcommand:`mapReduce` command execution should be operation-fatal - -Build and Packaging -~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-14184` Unused preprocessor macros from s2 conflict on OS X Yosemite -- :issue:`SERVER-14015` S2 Compilation on GCC 4.9/Solaris fails -- :issue:`SERVER-16017` Suse11 enterprise packages fail due to unmet dependencies -- :issue:`SERVER-15598` Ubuntu 14.04 Enterprise packages depend on unavailable libsnmp15 package -- :issue:`SERVER-13595` Red Hat init.d script error: YAML config file parsing - -Logging and Diagnostics -~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-13471` Increase log level of "did reduceInMemory" message in map/reduce -- :issue:`SERVER-16324` Command execution log line displays "``query not recording (too large)``" instead of abbreviated command object -- :issue:`SERVER-10069` Improve errorcodes.py so it captures multiline messages - -Testing and Internals -~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-15632` ``MultiHostQueryOp::PendingQueryContext::doBlockingQuery`` can leak a cursor object -- :issue:`SERVER-15629` ``GeoParser::parseMulti{Line|Polygon}`` does not clear objects owned by out parameter -- :issue:`SERVER-16316` Remove unsupported behavior in shard3.js -- :issue:`SERVER-14763` Update jstests/sharding/split_large_key.js -- :issue:`SERVER-14249` Add tests for querying oplog via mongodump using --dbpath -- :issue:`SERVER-13726` indexbg_drop.js - -.. _2.6.5-changelog: - -2.6.5 -- Changes ----------------- - -Security -~~~~~~~~ - -- :issue:`SERVER-15465` OpenSSL crashes on stepdown -- :issue:`SERVER-15360` User document changes made on a 2.4 primary and replicated to a 2.6 secondary don't make the 2.6 secondary invalidate its user cache -- :issue:`SERVER-14887` Allow user document changes made on a 2.4 primary to replicate to a 2.6 secondary -- :issue:`SERVER-14727` Details of SASL failures aren't logged -- :issue:`SERVER-12551` Audit DML/CRUD operations - -Stability -~~~~~~~~~ - -:issue:`SERVER-9032` mongod fails when launched with misconfigured locale - -Querying -~~~~~~~~ - -- :issue:`SERVER-15287` Query planner sort analysis incorrectly allows index key pattern plugin fields to provide sort -- :issue:`SERVER-15286` Assertion in date indexes when opposite-direction-sorted and double "or" filtered -- :issue:`SERVER-15279` Disable hash-based index intersection (AND_HASH) by default -- :issue:`SERVER-15152` When evaluating plans, some index candidates cause complete index scan -- :issue:`SERVER-15015` Assertion failure when combining ``$max`` and ``$min`` and reverse index scan -- :issue:`SERVER-15012` Server crashes on indexed rooted $or queries using a 2d index -- :issue:`SERVER-14969` Dropping index during active aggregation operation can crash server -- :issue:`SERVER-14961` Plan ranker favors intersection plans if predicate generates empty range index scan -- :issue:`SERVER-14892` Invalid ``{$elemMatch: {$where}}`` query causes memory leak -- :issue:`SERVER-14706` Queries that use negated $type predicate over a field may return incomplete results when an index is present on that field -- :issue:`SERVER-13104` Plan enumerator doesn't enumerate all possibilities for a nested :query:`$or` -- :issue:`SERVER-14984` Server aborts when running :query:`$centerSphere` query with ``NaN`` radius -- :issue:`SERVER-14981` Server aborts when querying against ``2dsphere`` index with ``coarsestIndexedLevel:0`` -- :issue:`SERVER-14831` Text search trips assertion when default language only supported in ``textIndexVersion=1`` used - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-15038` Multiple background index builds may not interrupt cleanly for commands, on secondaries -- :issue:`SERVER-14887` Allow user document changes made on a 2.4 primary to replicate to a 2.6 secondary -- :issue:`SERVER-14805` Use multithreaded oplog replay during initial sync - -Sharding -~~~~~~~~ - -- :issue:`SERVER-15056` Sharded connection cleanup on setup error can crash mongos -- :issue:`SERVER-13702` Commands without optional query may target to wrong shards on mongos -- :issue:`SERVER-15156` MongoDB upgrade 2.4 to 2.6 check returns error in ``config.changelog collection`` - -Storage -~~~~~~~ - -- :issue:`SERVER-15369` explicitly zero .ns files on creation -- :issue:`SERVER-15319` Verify 2.8 freelist is upgrade-downgrade safe with 2.6 -- :issue:`SERVER-15111` partially written journal last section causes recovery to fail - -Indexing -~~~~~~~~ - -- :issue:`SERVER-14848` Port ``index_id_desc.js`` to v2.6 and master branches -- :issue:`SERVER-14205` ensureIndex failure reports ``ok: 1`` on some failures - -Write Operations -~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-15106` Incorrect nscanned and nscannedObjects for idhack updates in 2.6.4 profiler or slow query log -- :issue:`SERVER-15029` The :update:`$rename` modifier uses incorrect dotted source path -- :issue:`SERVER-14829` ``UpdateIndexData::clear()`` should reset all member variables - -Data Aggregation -~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-15087` Server crashes when running concurrent mapReduce and dropDatabase commands -- :issue:`SERVER-14969` Dropping index during active aggregation operation can crash server -- :issue:`SERVER-14168` Warning logged when incremental MR collections are unsuccessfully dropped on secondaries - -Packaging -~~~~~~~~~ - -- :issue:`SERVER-14679` (CentOS 7/RHEL 7) ``init.d`` script should create directory for ``pid`` file if it is missing -- :issue:`SERVER-14023` Support for RHEL 7 Enterprise ``.rpm`` packages -- :issue:`SERVER-13243` Support for Ubuntu 14 "Trusty" Enterprise ``.deb`` packages -- :issue:`SERVER-11077` Support for Debian 7 Enterprise ``.deb`` packages -- :issue:`SERVER-10642` Generate Community and Enterprise packages for SUSE 11 - -Logging and Diagnostics -~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-14964` nscanned not written to the logs at ``logLevel`` 1 unless ``slowms`` exceeded or profiling enabled -- :issue:`SERVER-12551` Audit DML/CRUD operations -- :issue:`SERVER-14904` Adjust dates in ``tool/exportimport_date.js`` to account for different timezones - -Internal Code and Testing -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-13770` ``Helpers::removeRange`` should check all runner states -- :issue:`SERVER-14284` jstests should not leave profiler enabled at test run end -- :issue:`SERVER-14076` remove test ``replset_remove_node.js`` -- :issue:`SERVER-14778` Hide function and data pointers for natively-injected v8 functions - -.. _2.6.4-changelog: - -2.6.4 -- Changes ----------------- - -Security -~~~~~~~~ - -- :issue:`SERVER-14701` The "backup" auth role should allow running the "collstats" command for all resources -- :issue:`SERVER-14518` Allow disabling hostname validation for SSL -- :issue:`SERVER-14268` Potential information leak -- :issue:`SERVER-14170` Cannot read from secondary if both audit and auth are enabled in a sharded cluster -- :issue:`SERVER-13833` userAdminAnyDatabase role should be able to create indexes on admin.system.users and admin.system.roles -- :issue:`SERVER-12512` Add role-based, selective audit logging. -- :issue:`SERVER-9482` Add build flag for sslFIPSMode - -Querying -~~~~~~~~ - -- :issue:`SERVER-14625` Query planner can construct incorrect bounds for negations inside $elemMatch -- :issue:`SERVER-14607` hash intersection of fetched and non-fetched data can discard data from a result -- :issue:`SERVER-14532` Improve logging in the case of plan ranker ties -- :issue:`SERVER-14350` Server crash when $centerSphere has non-positive radius -- :issue:`SERVER-14317` Dead code in IDHackRunner::applyProjection -- :issue:`SERVER-14311` skipping of index keys is not accounted for in plan ranking by the index scan stage -- :issue:`SERVER-14123` some operations can create BSON object larger than the 16MB limit -- :issue:`SERVER-14034` Sorted $in query with large number of elements can't use merge sort -- :issue:`SERVER-13994` do not aggressively pre-fetch data for parallelCollectionScan - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-14665` Build failure for v2.6 in closeall.js caused by access violation reading _me -- :issue:`SERVER-14505` cannot dropAllIndexes when index builds in progress assertion failure -- :issue:`SERVER-14494` Dropping collection during active background index build on secondary triggers segfault -- :issue:`SERVER-13822` Running resync before replset config is loaded can crash :binary:`~bin.mongod` -- :issue:`SERVER-11776` Replication 'isself' check should allow mapped ports - -Sharding -~~~~~~~~ - -- :issue:`SERVER-14551` Runner yield during migration cleanup (removeRange) results in fassert -- :issue:`SERVER-14431` Invalid chunk data after splitting on a key that's too large -- :issue:`SERVER-14261` stepdown during migration range delete can abort :binary:`~bin.mongod` -- :issue:`SERVER-14032` v2.6 :binary:`~bin.mongos` doesn't verify _id is present for config server upserts -- :issue:`SERVER-13648` better stats from migration cleanup -- :issue:`SERVER-12750` :binary:`~bin.mongos` shouldn't accept initial query with "exhaust" flag set -- :issue:`SERVER-9788` :binary:`~bin.mongos` does not re-evaluate read preference once a valid replica set member is chosen -- :issue:`SERVER-9526` Log messages regarding chunks not very informative when the shard key is of type BinData - -Storage -~~~~~~~ - -- :issue:`SERVER-14198` Std::set and Windows Heap Allocation Reuse produces non-deterministic results -- :issue:`SERVER-13975` Creating index on collection named "system" can cause server to abort -- :issue:`SERVER-13729` Reads & Writes are blocked during data file allocation on Windows -- :issue:`SERVER-13681` :binary:`~bin.mongod` B stalls during background flush on Windows - -Indexing -~~~~~~~~ - -:issue:`SERVER-14494` Dropping collection during active background index build on secondary triggers segfault - -Write Ops -~~~~~~~~~ - -- :issue:`SERVER-14257` "remove" command can cause process termination by throwing unhandled exception if profiling is enabled -- :issue:`SERVER-14024` Update fails when query contains part of a DBRef and results in an insert (upsert:true) -- :issue:`SERVER-13764` debug mechanisms report incorrect nscanned / nscannedObjects for updates - -Networking -~~~~~~~~~~ - -:issue:`SERVER-13734` Remove catch (...) from handleIncomingMsg - -Geo -~~~ - -- :issue:`SERVER-14039` $nearSphere query with 2d index, skip, and limit returns incomplete results -- :issue:`SERVER-13701` Query using 2d index throws exception when using explain() - -Text Search -~~~~~~~~~~~ - -- :issue:`SERVER-14738` Updates to documents with text-indexed fields may lead to incorrect entries -- :issue:`SERVER-14027` Renaming collection within same database fails if wildcard text index present - -Tools -~~~~~ - -- :issue:`SERVER-14212` :binary:`~bin.mongorestore` may drop system users and roles -- :issue:`SERVER-14048` :binary:`~bin.mongodump` against :binary:`~bin.mongos` can't send dump to standard output - -Admin -~~~~~ - -- :issue:`SERVER-14556` Default dbpath for :binary:`~bin.mongod` :option:`--configsvr ` changes in 2.6 -- :issue:`SERVER-14355` Allow dbAdmin role to manually create system.profile collections - -Packaging -~~~~~~~~~ - -:issue:`SERVER-14283` Parameters in installed config file are out of date - -JavaScript -~~~~~~~~~~ - -- :issue:`SERVER-14254` Do not store native function pointer as a property in function prototype -- :issue:`SERVER-13798` v8 garbage collection can cause crash due to independent lifetime of DBClient and Cursor objects -- :issue:`SERVER-13707` mongo shell may crash when converting invalid regular expression - -Shell -~~~~~ - -- :issue:`SERVER-14341` negative opcounter values in serverStatus -- :issue:`SERVER-14107` Querying for a document containing a value of either type Javascript or JavascriptWithScope crashes the shell - -Usability -~~~~~~~~~ - -:issue:`SERVER-13833` userAdminAnyDatabase role should be able to create indexes on admin.system.users and admin.system.roles - -Logging and Diagnostics -~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-12512` Add role-based, selective audit logging. -- :issue:`SERVER-14341` negative opcounter values in serverStatus - -Testing -~~~~~~~ - -- :issue:`SERVER-14731` plan_cache_ties.js sometimes fails -- :issue:`SERVER-14147` make index_multi.js retry on connection failure -- :issue:`SERVER-13615` sharding_rs2.js intermittent failure due to reliance on opcounters - -.. _2.6.3-changelog: - -2.6.3 -- Changes ----------------- - -- :issue:`SERVER-14302` Fixed: "Equality queries on ``_id`` with - projection may return no results on sharded collections" - -- :issue:`SERVER-14304` Fixed: "Equality queries on ``_id`` with - projection on ``_id`` may return orphan documents on sharded - collections" - -.. _2.6.2-changelog: - -2.6.2 -- Changes ----------------- - -Security -~~~~~~~~ - -- :issue:`SERVER-13727` The :authrole:`backup` authorization role now - includes privileges to run the :dbcommand:`collStats` command. - -- :issue:`SERVER-13804` The built-in role :authrole:`restore` - now has privileges on :data:`admin.system.roles` collection. - -- :issue:`SERVER-13612` Fixed: "SSL-enabled server appears not to be - sending the list of supported certificate issuers to the client" - -- :issue:`SERVER-13753` Fixed: ":binary:`~bin.mongod` may terminate if x.509 - authentication certificate is invalid" - -- :issue:`SERVER-13945` For :ref:`replica set/sharded cluster member - authentication `, now matches x.509 - cluster certificates by attributes instead of by substring comparison. - -- :issue:`SERVER-13868` Now marks V1 users as probed on - databases that do not have surrogate user documents. - -- :issue:`SERVER-13850` Now ensures that the user cache entry is up to - date before using it to determine a user's roles in user management - commands on :binary:`~bin.mongos`. - -- :issue:`SERVER-13588` Fixed: "Shell prints startup warning when auth - enabled" - -Querying -~~~~~~~~ - -- :issue:`SERVER-13731` Fixed: "Stack overflow when parsing deeply nested - :query:`$not` query" -- :issue:`SERVER-13890` Fixed: "Index bounds builder constructs invalid - bounds for multiple negations joined by an :query:`$or`" -- :issue:`SERVER-13752` Verified assertion on empty :query:`$in` clause - and sort on second field in a compound index. -- :issue:`SERVER-13337` Re-enabled ``idhack`` for queries with - projection. -- :issue:`SERVER-13715` Fixed: "Aggregation pipeline execution can fail - with $or and blocking sorts" -- :issue:`SERVER-13714` Fixed: "non-top-level indexable :query:`$not` - triggers query planning bug" -- :issue:`SERVER-13769` Fixed: ":dbcommand:`distinct` command on - indexed field with geo predicate fails to execute" -- :issue:`SERVER-13675` Fixed "Plans with differing performance can tie - during plan ranking" -- :issue:`SERVER-13899` Fixed: "'Whole index scan' query solutions - can use incompatible indexes, return incorrect results" -- :issue:`SERVER-13852` Fixed "IndexBounds::endKeyInclusive not - initialized by constructor" -- :issue:`SERVER-14073` planSummary no longer truncated at 255 characters -- :issue:`SERVER-14174` Fixed: "If ntoreturn is a limit (rather than batch - size) extra data gets buffered during plan ranking" -- :issue:`SERVER-13789` Some nested queries no longer trigger an assertion - error -- :issue:`SERVER-14064` Added planSummary information for :dbcommand:`count` - command log message. -- :issue:`SERVER-13960` Queries containing :query:`$or` no longer miss results if - multiple clauses use the same index. -- :issue:`SERVER-14180` Fixed: "Crash with 'and' clause, - :query:`$elemMatch`, and nested :query:`$mod` or regex" -- :issue:`SERVER-14176` Natural order sort specification no longer ignored if - query is specified. -- :issue:`SERVER-13754` Bounds no longer combined for :query:`$or` - queries that can use merge sort. - -Geospatial -~~~~~~~~~~ - -:issue:`SERVER-13687` Results of :query:`$near` query on compound -multi-key 2dsphere index are now sorted by distance. - -Write Operations -~~~~~~~~~~~~~~~~ - -:issue:`SERVER-13802` Insert field validation no longer stops at first -``Timestamp()`` field. - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-13993` Fixed: "log a message when - ``shouldChangeSyncTarget()`` believes a node should change sync - targets" - -- :issue:`SERVER-13976` Fixed: "Cloner needs to detect failure to - create collection" - -Sharding -~~~~~~~~ - -- :issue:`SERVER-13616` Resolved: "'type 7' (OID) error when acquiring - distributed lock for first time" -- :issue:`SERVER-13812` Now catches exception thrown by - ``getShardsForQuery`` for geo query. -- :issue:`SERVER-14138` :binary:`~bin.mongos` will now correctly target - multiple shards for nested field shard key predicates. -- :issue:`SERVER-11332` Fixed: "Authentication requests delayed if first - config server is unresponsive" - -Map/Reduce -~~~~~~~~~~ - -- :issue:`SERVER-14186` Resolved: ":method:`rs.stepDown` during - mapReduce causes fassert in logOp" -- :issue:`SERVER-13981` Temporary map/reduce collections are now - correctly replicated to secondaries. - -Storage -~~~~~~~ - -- :issue:`SERVER-13750` :dbcommand:`convertToCapped` on empty - collection no longer aborts after ``invariant()`` failure. -- :issue:`SERVER-14056` Moving large collection across databases - with renameCollection no longer triggers fatal assertion. -- :issue:`SERVER-14082` Fixed: "Excessive freelist scanning for MaxBucket" -- :issue:`SERVER-13737` CollectionOptions parser now skips - non-numeric for "size"/"max" elements if values non-numeric. - -Build and Packaging -~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-13950` MongoDB Enterprise now includes required - dependency list. -- :issue:`SERVER-13862` Support for mongodb-org-server installation - 2.6.1-1 on RHEL5 via RPM. -- :issue:`SERVER-13724` Added SCons flag to override treating all - warnings as errors. - -Diagnostics -~~~~~~~~~~~ - -- :issue:`SERVER-13587` Resolved: ":data:`~system.profile.ndeleted` in - ``system.profile`` documents reports 1 too few documents - removed" -- :issue:`SERVER-13368` Improved exposure of timing information in - :dbcommand:`currentOp`. - -Administration -~~~~~~~~~~~~~~ - -:issue:`SERVER-13954` :setting:`security.javascriptEnabled` option is -now available in the YAML configuration file. - -Tools -~~~~~ - -- :issue:`SERVER-10464` :binary:`~bin.mongodump` can now query - ``oplog.$main`` and ``oplog.rs`` when using - ``--dbpath``. -- :issue:`SERVER-13760` :binary:`~bin.mongoexport` can now handle large - timestamps on Windows. - -Shell -~~~~~ - -- :issue:`SERVER-13865` Shell now returns correct ``WriteResult`` for - compatibility-mode upsert with non-OID equality predicate on ``_id`` - field. -- :issue:`SERVER-13037` Fixed typo in error message for "compatibility - mode". - -Internal Code -~~~~~~~~~~~~~ - -- :issue:`SERVER-13794` Fixed: "Unused snapshot history consuming - significant heap space" -- :issue:`SERVER-13446` Removed Solaris builds dependency on ILLUMOS libc. -- :issue:`SERVER-14092` MongoDB upgrade 2.4 to 2.6 check no longer returns - an error in internal collections. -- :issue:`SERVER-14000` Added new lsb file location for Debian 7.1 - -Testing -~~~~~~~ - -- :issue:`SERVER-13723` Stabilized ``tags.js`` after a change in its - timeout when it was ported to use write commands. -- :issue:`SERVER-13494` Fixed: "``setup_multiversion_mongodb.py`` doesn't - download 2.4.10 because of non-numeric version sorting" -- :issue:`SERVER-13603` Fixed: "Test suites with options tests fail when run - with ``--nopreallocj``" -- :issue:`SERVER-13948` Fixed: "``awaitReplication()`` failures - related to getting a config version from master causing test - failures" -- :issue:`SERVER-13839` Fixed ``sync2.js`` failure. -- :issue:`SERVER-13972` Fixed ``connections_opened.js`` failure. -- :issue:`SERVER-13712` Reduced peak disk usage of test suites. -- :issue:`SERVER-14249` Added tests for querying oplog via - :binary:`~bin.mongodump` using ``--dbpath`` -- :issue:`SERVER-10462` Fixed: "Windows file locking related buildbot failures" - -.. _2.6.1-changelog: - -2.6.1 -- Changes ----------------- - -Stability -~~~~~~~~~ - -:issue:`SERVER-13739` Repair database failure can delete database files - -Build and Packaging -~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-13287` Addition of debug symbols has doubled compile time -- :issue:`SERVER-13563` Upgrading from 2.4.x to 2.6.0 via ``yum`` clobbers configuration file -- :issue:`SERVER-13691` yum and apt "stable" repositories contain release candidate 2.6.1-rc0 packages -- :issue:`SERVER-13515` Cannot install MongoDB as a service on Windows - -Querying -~~~~~~~~ - -- :issue:`SERVER-13066` Negations over multikey fields do not use index -- :issue:`SERVER-13495` Concurrent ``GETMORE`` and ``KILLCURSORS`` operations can cause race condition and server crash -- :issue:`SERVER-13503` The :query:`$where` operator should not be allowed under :query:`$elemMatch` -- :issue:`SERVER-13537` Large skip and and limit values can cause crash in blocking sort stage -- :issue:`SERVER-13557` Incorrect negation of $elemMatch value in 2.6 -- :issue:`SERVER-13562` Queries that use tailable cursors do not stream results if skip() is applied -- :issue:`SERVER-13566` Using the OplogReplay flag with extra predicates can yield incorrect results -- :issue:`SERVER-13611` Missing sort order for compound index leads to unnecessary in-memory sort -- :issue:`SERVER-13618` Optimization for sorted $in queries not applied to reverse sort order -- :issue:`SERVER-13661` Increase the maximum allowed depth of query objects -- :issue:`SERVER-13664` Query with :query:`$elemMatch` using a compound multikey index can generate incorrect results -- :issue:`SERVER-13677` Query planner should traverse through $all while handling $elemMatch object predicates -- :issue:`SERVER-13766` Dropping index or collection while $or query is yielding triggers fatal assertion - -Geospatial -~~~~~~~~~~ - -- :issue:`SERVER-13666` :query:`$near` queries with out-of-bounds points in legacy format can lead to crashes -- :issue:`SERVER-13540` The ``geoNear`` command no longer returns distance in radians for legacy point -- :issue:`SERVER-13486`: The ``geoNear`` command can create too large BSON objects for aggregation. - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-13500` Changing replica set configuration can crash running members -- :issue:`SERVER-13589` Background index builds from a 2.6.0 primary fail to complete on 2.4.x secondaries -- :issue:`SERVER-13620` Replicated data definition commands will fail on secondaries during background index build -- :issue:`SERVER-13496` Creating index with same name but different spec in mixed version replicaset can abort replication - -Sharding -~~~~~~~~ - -- :issue:`SERVER-12638` Initial sharding with hashed shard key can result in duplicate split points -- :issue:`SERVER-13518` The ``_id`` field is no longer automatically generated by :binary:`~bin.mongos` when missing -- :issue:`SERVER-13777` Migrated ranges waiting for deletion do not report cursors still open - -Security -~~~~~~~~ - -- :issue:`SERVER-9358` Log rotation can overwrite previous log files -- :issue:`SERVER-13644` Sensitive credentials in startup options are not redacted and may be exposed -- :issue:`SERVER-13441` Inconsistent error handling in user management shell helpers - -Write Operations -~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-13466` Error message in collection creation failure contains incorrect namespace -- :issue:`SERVER-13499` Yield policy for batch-inserts should be the same as for batch-updates/deletes -- :issue:`SERVER-13516` Array updates on documents with more than 128 BSON elements may crash :binary:`~bin.mongod` diff --git a/source/release-notes/2.6-compatibility.txt b/source/release-notes/2.6-compatibility.txt deleted file mode 100644 index e458e6a2a1d..00000000000 --- a/source/release-notes/2.6-compatibility.txt +++ /dev/null @@ -1,955 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -==================================== -Compatibility Changes in MongoDB 2.6 -==================================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: twocols - -The following 2.6 changes can affect the compatibility with older -versions of MongoDB. See :doc:`/release-notes/2.6` for the full list of -the 2.6 changes. - -Index Changes -------------- - -.. _2.6-index-key-length-incompatibility: - -Enforce Index Key Length Limit -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - MongoDB 2.6 implements a stronger enforcement of the limit on - :limit:`index key `. - - Creating indexes will error if an index key in an existing document - exceeds the limit: - - - :method:`db.collection.ensureIndex()`, - :method:`db.collection.reIndex()`, :dbcommand:`compact`, and - ``repairDatabase`` will error and not create the index. - Previous versions of MongoDB would create the index but not index - such documents. - - - Because :method:`db.collection.reIndex()`, :dbcommand:`compact`, - and ``repairDatabase`` drop *all* the indexes from a - collection and then recreate them sequentially, the error from the - index key limit prevents these operations from rebuilding any - remaining indexes for the collection and, in the case of the - ``repairDatabase`` command, from continuing with the - remainder of the process. - - Inserts will error: - - - :method:`db.collection.insert()` and other operations that perform - inserts (e.g. ``db.collection.save()`` and - :method:`db.collection.update()` with ``upsert`` that result in - inserts) will fail to insert if the new document has an indexed - field whose corresponding index entry exceeds the limit. - Previous versions of MongoDB would insert but not index such - documents. - - - :binary:`~bin.mongorestore` and :binary:`~bin.mongoimport` will - fail to insert if the new document has an indexed field whose - corresponding index entry exceeds the limit. - - Updates will error: - - - :method:`db.collection.update()` and - ``db.collection.save()`` operations on an indexed field will error - if the updated value causes the index entry to exceed the limit. - - - If an existing document contains an indexed field whose index - entry exceeds the limit, updates on other fields that result in - the relocation of a document on disk will error. - - Chunk Migration will fail: - - - Migrations will fail for a chunk that has a document with an - indexed field whose index entry exceeds the limit. - - - If left unfixed, the chunk will repeatedly fail migration, - effectively ceasing chunk balancing for that collection. Or, if - chunk splits occur in response to the migration failures, this - response would lead to unnecessarily large number of chunks and an - overly large config databases. - - Secondary members of replica sets will warn: - - - Secondaries will continue to replicate documents with an indexed - field whose corresponding index entry exceeds the limit on initial - sync but will print warnings in the logs. - - - Secondaries allow index build and rebuild operations on a - collection that contains an indexed field whose corresponding - index entry exceeds the limit but with warnings in the logs. - - - With *mixed version* replica sets where the secondaries are - version 2.6 and the primary is version 2.4, secondaries will - replicate documents inserted or updated on the 2.4 primary, but - will print error messages in the log if the documents contain an - indexed field whose corresponding index entry exceeds the limit. - -Solution - Run :v2.6:`db.upgradeCheckAllDBs() - ` to find current keys that - violate this limit and correct as appropriate. Preferably, run the - test before upgrading; i.e. connect the 2.6 ``mongo`` shell - to your MongoDB 2.4 database and run the method. - -If you have an existing data set and want to disable the default index -key length validation so that you can upgrade before resolving these -indexing issues, use the :parameter:`failIndexKeyTooLong` parameter. - -Index Specifications Validate Field Names -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - In MongoDB 2.6, create and re-index operations fail when the index - key refers to an empty field, e.g. ``"a..b" : 1`` or the field name - starts with a dollar sign (``$``). - - - :method:`db.collection.ensureIndex()` will not create a new index - with an invalid or empty key name. - - - :method:`db.collection.reIndex()`, :dbcommand:`compact`, and - ``repairDatabase`` will error if an index exists with an - invalid or empty key name. - - - Chunk migration will fail if an index exists with an - invalid or empty key name. - - Previous versions of MongoDB allow the index. - -Solution - Run :v2.6:`db.upgradeCheckAllDBs() - ` to find current keys that - violate this limit and correct as appropriate. Preferably, run the - test before upgrading; i.e. connect the 2.6 ``mongo`` shell - to your MongoDB 2.4 database and run the method. - -``ensureIndex`` and Existing Indexes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - :method:`db.collection.ensureIndex()` now errors: - - - if you try to create an existing index but with different - options; e.g. in the following example, the second - :method:`db.collection.ensureIndex()` will error. - - .. code-block:: javascript - - db.mycollection.ensureIndex( { x: 1 } ) - db.mycollection.ensureIndex( { x: 1 }, { unique: 1 } ) - - - if you specify an index name that already exists but the key - specifications differ; e.g. in the following example, the second - :method:`db.collection.ensureIndex()` will error. - - .. code-block:: javascript - - db.mycollection.ensureIndex( { a: 1 }, { name: "myIdx" } ) - db.mycollection.ensureIndex( { z: 1 }, { name: "myIdx" } ) - - Previous versions did not create the index but did not error. - -.. _write-methods-incompatibility: - -Write Method Acknowledgements ------------------------------ - -Description - The ``mongo`` shell write methods - :method:`db.collection.insert()`, :method:`db.collection.update()`, - ``db.collection.save()`` and :method:`db.collection.remove()` - now integrate the :ref:`write concern ` - directly into the method rather than with a separate ``getLastError`` - command to provide :ref:`acknowledgement of writes ` whether - run interactively in the ``mongo`` shell or - non-interactively in a script. In previous versions, these methods - exhibited a "fire-and-forget" behavior. - [#mongo-shell-gle-interactive]_ - -- Existing scripts for the ``mongo`` shell that used these - methods will now wait for acknowledgement, which take **longer** than - the previous "fire-and-forget" behavior. - -- The write methods now return a :method:`WriteResult` object that - contains the results of the operation, including any write errors - and write concern errors, and obviates the need to call - ``getLastError`` command to get the status of the results. - See :method:`db.collection.insert()`, - :method:`db.collection.update()`, ``db.collection.save()`` - and :method:`db.collection.remove()` for details. - -- In sharded environments, :binary:`~bin.mongos` no longer supports - "fire-and-forget" behavior. This limits throughput when writing data - to sharded clusters. - -.. [#mongo-shell-gle-interactive] - In previous versions, when using the ``mongo`` shell - interactively, the ``mongo`` shell automatically called the - ``getLastError`` command after a write method to provide - acknowledgement of the write. Scripts, however, would observe "fire-and-forget" - behavior in previous versions unless the scripts included an - **explicit** call to the ``getLastError`` command after a - write method. - -Solution - Scripts that used these ``mongo`` shell methods for bulk write - operations with "fire-and-forget" behavior should use the - :method:`Bulk()` methods. - - In sharded environments, applications using any driver or - ``mongo`` shell should use :method:`Bulk()` methods for optimal - performance when inserting or modifying groups of documents. - - For example, instead of: - - .. code-block:: javascript - - for (var i = 1; i <= 1000000; i++) { - db.test.insert( { x : i } ); - } - - In MongoDB 2.6, replace with :method:`Bulk()` operation: - - .. code-block:: javascript - - var bulk = db.test.initializeUnorderedBulkOp(); - - for (var i = 1; i <= 1000000; i++) { - bulk.insert( { x : i} ); - } - - bulk.execute( { w: 1 } ); - - Bulk method returns a :method:`BulkWriteResult` object that contains - the result of the operation. - - .. seealso:: - - - :ref:`rel-notes-write-operations` - - :method:`Bulk()` - - :method:`Bulk.execute()` - - :method:`db.collection.initializeUnorderedBulkOp()` - - :method:`db.collection.initializeOrderedBulkOp()` - -``db.collection.aggregate()`` Change ------------------------------------- - -Description - The :method:`db.collection.aggregate()` method in the - ``mongo`` shell defaults to returning a cursor to the results - set. This change enables the aggregation pipeline to return result - sets of any size and requires cursor iteration to access the result - set. For example: - - .. code-block:: javascript - - var myCursor = db.orders.aggregate( [ - { - $group: { - _id: "$cust_id", - total: { $sum: "$price" } - } - } - ] ); - - myCursor.forEach( function(x) { printjson (x); } ); - - Previous versions returned a single document with a field ``results`` - that contained an array of the result set, subject to the :ref:`BSON - Document size ` limit. Accessing the result - set in the previous versions of MongoDB required accessing the - ``results`` field and iterating the array. For example: - - .. code-block:: javascript - - var returnedDoc = db.orders.aggregate( [ - { - $group: { - _id: "$cust_id", - total: { $sum: "$price" } - } - } - ] ); - - var myArray = returnedDoc.result; // access the result field - - myArray.forEach( function(x) { printjson (x); } ); - -Solution - Update scripts that currently expect - :method:`db.collection.aggregate()` to return a document with a - ``results`` array to handle cursors instead. - -.. seealso:: - - - :ref:`rn-2.6-aggregation-cursor` - - :method:`db.collection.aggregate()` - -Write Concern Validation ------------------------- - -Description - Specifying a write concern that includes ``j: true`` to a - :binary:`~bin.mongod` or :binary:`~bin.mongos` instance running with - ``--nojournal`` option now errors. Previous versions would - ignore the ``j: true``. - -Solution - Either remove the ``j: true`` specification from the write concern when - issued against a :binary:`~bin.mongod` or :binary:`~bin.mongos` instance - with ``--nojournal`` or run :binary:`~bin.mongod` or - :binary:`~bin.mongos` with journaling. - -Security Changes ----------------- - -.. _authentication-incompatibility: - -New Authorization Model -~~~~~~~~~~~~~~~~~~~~~~~ - -Description - MongoDB 2.6 :ref:`authorization model ` changes how - MongoDB stores and manages user privilege information: - - - Before the upgrade, MongoDB 2.6 requires at least one user in the - admin database. - - - MongoDB versions using older models cannot create/modify users or - create user-defined roles. - -Solution - Ensure that at least one user exists in the admin database. If no - user exists in the admin database, add a user. Then upgrade to - MongoDB 2.6. Finally, upgrade the user privilege model. See - :doc:`/release-notes/2.6-upgrade`. - - .. important:: - - .. include:: /includes/important-upgrade-auth-model-prerequisites.rst - -.. seealso:: - - :ref:`2.6-relnotes-security` - - -.. _ssl-hostname-validation: - -SSL Certificate Hostname Validation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - The SSL certificate validation now checks the Common Name (``CN``) - and the Subject Alternative Name (``SAN``) fields to ensure that - either the ``CN`` or one of the ``SAN`` entries matches the hostname - of the server. As a result, if you currently use SSL and *neither* - the ``CN`` nor any of the ``SAN`` entries of your current SSL - certificates match the hostnames, upgrading to version 2.6 will - cause the SSL connections to fail. - -Solution - To allow for the continued use of these certificates, MongoDB - provides the :setting:`~net.ssl.allowInvalidCertificates` setting. The - setting is available for: - - - :binary:`~bin.mongod` and :binary:`~bin.mongos` to bypass the validation - of SSL certificates on other servers in the cluster. - - - ``mongo`` shell, :ref:`MongoDB tools that support SSL - `, and the C++ driver to bypass the - validation of server certificates. - - When using the :setting:`~net.ssl.allowInvalidCertificates` setting, MongoDB - logs as a warning the use of the invalid certificates. - - .. warning:: The :setting:`~net.ssl.allowInvalidCertificates` setting - bypasses the other certificate validation, such as checks for - expiration and valid signatures. - -.. _2.6-2dsphere-version-incompatibility: - -``2dsphere`` Index Version 2 ----------------------------- - -Description - MongoDB 2.6 introduces a version 2 of the :ref:`2dsphere index - <2dsphere-index>`. If a document lacks a ``2dsphere`` - index field (or the field is ``null`` or an empty array), MongoDB - does not add an entry for the document to the ``2dsphere`` index. - For inserts, MongoDB inserts the document but does not add to the - ``2dsphere`` index. - - Previous version would not insert documents where the ``2dsphere`` - index field is a ``null`` or an empty array. For documents that lack - the ``2dsphere`` index field, previous versions would insert and - index the document. - -Solution - To revert to old behavior, create the ``2dsphere`` index with ``{ - "2dsphereIndexVersion" : 1 }`` to create a version 1 index. However, - version 1 index cannot use the new GeoJSON geometries. - -.. seealso:: - - :ref:`2dsphere-v2` - -Log Messages ------------- - -Timestamp Format Change -~~~~~~~~~~~~~~~~~~~~~~~ - -Description - Each message now starts with the timestamp format given in :ref:`2.6-time-format-changes`. - Previous versions used the ``ctime`` format. - -Solution - MongoDB adds a new option ``--timeStampFormat`` which supports - timestamp format in ``ctime``, - ``iso8601-utc``, and ``iso8601-local`` (new default). - -.. Commenting out the others for now -- they're just placeholders and notes for self -.. Other - ~~~~~ - - ``query`` log messages add new field ``planSummary`. - - ``getmore`` log messages now omit the ``query`` field. - - ``mongo`` shell now calls :dbcommand:`isMaster` command - instead of the ``admin`` command :dbcommand:`replSetGetStatus` - during the construction of the shell prompt. Log messages change - accordingly, as in the following - .. code-block:: none - command: { isMaster: 1.0, forShell: 1.0 } keyUpdates:0 numYields:0 reslen:178 0ms - - In 2.6, log messages for write methods consist of a message for - the method followed by a message for the associated write command. - Previously, the messages consisted of a message for the method - followed by a message for the ``getlasterror`` command. For example: - .. code-block:: none - 2014-03-04T21:16:21.992-0500 [conn1] remove test.server12774 query: { a: { $lt: 3.0 } } ndeleted:2 keyUpdates:0 numYields:0 locks(micros) w:344 0ms - 2014-03-04T21:16:21.993-0500 [conn1] command test.$cmd command: { delete: "myCollection", deletes: [ { q: { a: { $lt: 3.0 } }, limit: 0.0 } ], ordered: true } keyUpdates:0 numYields:0 reslen:40 0ms - - MongoDB removes the two blank lines preceding and following the: - ``***** SERVER RESTARTED *****`` message. - - ``writeback`` error message and ``FlushViewOfFile`` error message - removes the space between the duration time and ``ms``. - -Package Configuration Changes ------------------------------ - -.. _2.6-default-bindip-incompatibility: - -Default ``bindIp`` for RPM/DEB Packages -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - In the official MongoDB packages in RPM (Red Hat, CentOS, Fedora - Linux, and derivatives) and DEB (Debian, Ubuntu, and derivatives), - the default :setting:`~net.bindIp` value attaches MongoDB components to - the localhost interface *only*. These packages set this default in - the default configuration file (i.e. ``/etc/mongod.conf``.) - -Solution - If you use one of these packages and have *not* modified the default - ``/etc/mongod.conf`` file, you will need to set :setting:`~net.bindIp` - before or during the upgrade. - -There is no default :setting:`~net.bindIp` setting in any other official MongoDB -packages. - -.. _2.6-snmp-iana-mib-incompatibility: - -SNMP Changes -~~~~~~~~~~~~ - -Description - - The IANA enterprise identifier for MongoDB changed from - 37601 to 34601. - - - MongoDB changed the MIB field name ``globalopcounts`` to - ``globalOpcounts``. - -Solution - - Users of SNMP monitoring must modify their SNMP configuration - (i.e. MIB) from 37601 to 34601. - - - Update references to ``globalopcounts`` to ``globalOpcounts``. - -Remove Method Signature Change ------------------------------- - -Description - :method:`db.collection.remove()` requires a query document as a - parameter. In previous versions, the method invocation without a - query document deleted all documents in a collection. - -Solution - For existing :method:`db.collection.remove()` invocations without a - query document, modify the invocations to include an empty document - :method:`db.collection.remove({})`. - -.. _update-operations-incompatibility: - -Update Operator Syntax Validation ---------------------------------- - -Description - - :ref:`Update operators (e.g $set) ` - must specify a non-empty operand expression. For example, the - following expression is now invalid: - - .. code-block:: javascript - - { $set: { } } - - - :ref:`Update operators (e.g $set) ` - cannot repeat in the update statement. For example, the following - expression is invalid: - - .. code-block:: javascript - - { $set: { a: 5 }, $set: { b: 5 } } - -.. COMMENT -- could clarify that the MongoDB server cannot accept - update expressions that include duplicate operators so as to - distinguish from drivers/mongo shell that will flatten out the - expression, but will hold off until someone requests. - -Updates Enforce Field Name Restrictions ---------------------------------------- - -Description - - Updates cannot use :doc:`update operators (e.g $set) - ` to target fields with empty field - names (i.e. ``""``). - - - Updates no longer support saving field names that contain a dot - (``.``) or a field name that starts with a dollar sign (``$``). - -Solution - - For existing documents that have fields with empty names ``""``, - replace the whole document. See :method:`db.collection.update()` - and ``db.collection.save()`` for details on replacing an existing - document. - - - For existing documents that have fields with names that contain a - dot (``.``), either replace the whole document or :update:`unset - <$unset>` the field. To find fields whose names contain a dot, run - :v2.6:`db.upgradeCheckAllDBs() `. - - - For existing documents that have fields with names that start with - a dollar sign (``$``), :update:`unset <$unset>` or :update:`rename - <$rename>` those fields. To find fields whose names start with a - dollar sign, run :v2.6:`db.upgradeCheckAllDBs() - `. - -See :ref:`rel-notes-write-operations` for the changes to the write -operation protocol, and :ref:`rel-notes-data-modification` for the -changes to the insert and update operations. Also consider the -documentation of the :limit:`Restrictions on Field Names`. - -Query and Sort Changes ----------------------- - -.. _query-field-name-incompatibility: - -Enforce Field Name Restrictions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - Queries cannot specify conditions on fields with names that start - with a dollar sign (``$``). - -Solution - :update:`Unset <$unset>` or :update:`rename <$rename>` existing - fields whose names start with a dollar sign (``$``). Run - :v2.6:`db.upgradeCheckAllDBs() - ` to find fields whose - names start with a dollar sign. - -.. _2.6-sparse-index-incompatibility: - -Sparse Index and Incomplete Results -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - If a :ref:`sparse index ` results in an - incomplete result set for queries and sort operations, MongoDB will - not use that index unless a :method:`~cursor.hint()` explicitly - specifies the index. - - For example, the query ``{ x: { $exists: false } }`` will no longer - use a sparse index on the ``x`` field, unless explicitly hinted. - -Solution - To override the behavior to use the sparse index and return - incomplete results, explicitly specify the index with a - :method:`~cursor.hint()`. - -See :ref:`sparse-index-incomplete-results` for an example that details -the new behavior. - -.. _2.6-sort-value-incompatibility: - -``sort()`` Specification Values -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - The :method:`~cursor.sort()` method **only** accepts the following - values for the sort keys: - - - ``1`` to specify ascending order for a field, - - - ``-1`` to specify descending order for a field, or - - - :expression:`$meta` expression to specify sort by the text search - score. - - Any other value will result in an error. - - Previous versions also accepted either ``true`` or ``false`` for - ascending. - -Solution - Update sort key values that use ``true`` or ``false`` to ``1``. - -.. _2.6-skip-incompatibility: - -``skip()`` and ``_id`` Queries -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - Equality match on the ``_id`` field obeys :method:`~cursor.skip()`. - - Previous versions ignored :method:`~cursor.skip()` when performing - an equality match on the ``_id`` field. - -.. _2.6-explain-query-plan-incompatibility: - -``explain()`` Retains Query Plan Cache -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - :method:`~cursor.explain()` no longer clears the :doc:`query plans - ` cached for that :term:`query shape`. - - In previous versions, :method:`~cursor.explain()` would have the - side effect of clearing the query plan cache for that query shape. - -.. seealso:: - - The :method:`PlanCache() ` reference. - - -Geospatial Changes -~~~~~~~~~~~~~~~~~~ - -.. _2.6-geo-maxDistance-incompatibility: - -``$maxDistance`` Changes -```````````````````````` - -Description - - For :query:`$near` queries on GeoJSON data, if the queries specify - a :query:`$maxDistance`, :query:`$maxDistance` must be inside of - the :query:`$near` document. - - In previous version, :query:`$maxDistance` could be either inside - or outside the :query:`$near` document. - - - :query:`$maxDistance` must be a positive value. - -Solution - - Update any existing :query:`$near` queries on GeoJSON data that - currently have the :query:`$maxDistance` outside the - :query:`$near` document - - - Update any existing queries where :query:`$maxDistance` is a - negative value. - -.. _2.6-uniqueDocs-incompatibility: - -Deprecated ``$uniqueDocs`` -`````````````````````````` - -Description - MongoDB 2.6 deprecates ``$uniqueDocs``, and geospatial queries - no longer return duplicated results when a document matches the - query multiple times. - -.. _2.6-geospatial-validation-incompatibility: - -Stronger Validation of Geospatial Queries -````````````````````````````````````````` - -Description - MongoDB 2.6 enforces a stronger validation of geospatial queries, - such as validating the options or GeoJSON specifications, and errors - if the geospatial query is invalid. Previous versions - allowed/ignored invalid options. - -Query Operator Changes -~~~~~~~~~~~~~~~~~~~~~~ - -.. _2.6-not-incompatibility: - -``$not`` Query Behavior Changes -``````````````````````````````` - -Description - - Queries with :query:`$not` expressions on an indexed field now match: - - - Documents that are missing the indexed field. Previous versions - would not return these documents using the index. - - - Documents whose indexed field value is a different type than - that of the specified value. Previous versions would not return - these documents using the index. - - For example, if a collection ``orders`` contains the following - documents: - - .. code-block:: javascript - - { _id: 1, status: "A", cust_id: "123", price: 40 } - { _id: 2, status: "A", cust_id: "xyz", price: "N/A" } - { _id: 3, status: "D", cust_id: "xyz" } - - If the collection has an index on the ``price`` field: - - .. code-block:: javascript - - db.orders.ensureIndex( { price: 1 } ) - - The following query uses the index to search for documents where - ``price`` is not greater than or equal to ``50``: - - .. code-block:: javascript - - db.orders.find( { price: { $not: { $gte: 50 } } } ) - - In 2.6, the query returns the following documents: - - .. code-block:: javascript - - { "_id" : 3, "status" : "D", "cust_id" : "xyz" } - { "_id" : 1, "status" : "A", "cust_id" : "123", "price" : 40 } - { "_id" : 2, "status" : "A", "cust_id" : "xyz", "price" : "N/A" } - - In previous versions, indexed plans would only - return matching documents where the type of the field matches the - type of the query predicate: - - .. code-block:: javascript - - { "_id" : 1, "status" : "A", "cust_id" : "123", "price" : 40 } - - If using a collection scan, previous versions would return the - same results as those in 2.6. - - - MongoDB 2.6 allows chaining of :query:`$not` expressions. - -.. _2.6-null-incompatibility: - -``null`` Comparison Queries -```````````````````````````` - -Description - - :query:`$lt` and :query:`$gt` comparisons to ``null`` no - longer match documents that are missing the field. - - - ``null`` equality conditions on array elements (e.g. ``"a.b": - null``) no longer match document missing the nested field ``a.b`` - (e.g. ``a: [ 2, 3 ]``). - - - ``null`` equality queries (i.e. ``field: null`` ) now match fields - with values ``undefined``. - -.. _2.6-all-incompatibility: - -``$all`` Operator Behavior Change -````````````````````````````````` - -Description - - The :query:`$all` operator is now equivalent to an :query:`$and` - operation of the specified values. This change in behavior can - allow for more matches than previous versions when passed an array - of a single nested array (e.g. ``[ [ "A" ] ]``). When passed an - array of a nested array, :query:`$all` can now match documents - where the field contains the nested array as an element (e.g. - ``field: [ [ "A" ], ... ]``), *or* the field equals the nested - array (e.g. ``field: [ "A", "B" ]``). Earlier version could only - match documents where the field contains the nested array. - - - The :query:`$all` operator returns no match if the array field - contains nested arrays (e.g. ``field: [ "a", ["b"] ]``) and - :query:`$all` on the nested field is the element of the nested - array (e.g. ``"field.1": { $all: [ "b" ] }``). Previous versions - would return a match. - -.. _2.6-mod-operator-incompatibility: - -``$mod`` Operator Enforces Strict Syntax -```````````````````````````````````````` - -Description - The :query:`$mod` operator now only accepts an array with exactly - two elements, and errors when passed an array with fewer or more - elements. See :ref:`mod-not-enough-elements` and :ref:`mod-too-many-elements` - for details. - - In previous versions, if passed an array with one element, the - :query:`$mod` operator uses ``0`` as the second element, and if - passed an array with more than two elements, the :query:`$mod` - ignores all but the first two elements. Previous versions do return - an error when passed an empty array. - -Solution - Ensure that the array passed to :query:`$mod` contains exactly two - elements: - - - If the array contains the a single element, add ``0`` as the - second element. - - - If the array contains more than two elements, remove the extra - elements. - -.. _2.6-where-incompatibility: - -``$where`` Must Be Top-Level -```````````````````````````` - -Description - :query:`$where` expressions can now only be at top level and cannot be - nested within another expression, such as :query:`$elemMatch`. - -Solution - Update existing queries that nest :query:`$where`. - -``$exists`` and ``notablescan`` -``````````````````````````````` - -If the MongoDB server has disabled collection scans, i.e. -:parameter:`notablescan`, then :query:`$exists` queries that have no -*indexed solution* will error. - -.. _2.6-min-max-key-equality-match-incompatibility: - -``MinKey`` and ``MaxKey`` Queries -````````````````````````````````` - -Description - Equality match for either ``MinKey`` or - ``MaxKey`` no longer match documents missing the field. - -.. COMMENT will wait to doc the following in case the resolution - matches the 2.4 behavior. :query:`$elemMatch` against nested arrays - - SERVER-12496 - -Nested Array Queries with $elemMatch -```````````````````````````````````` - -Description - The :query:`$elemMatch` query operator no longer traverses - recursively into nested arrays. - - For example, if a collection ``test`` contains the following - document: - - .. code-block:: javascript - - { "_id": 1, "a" : [ [ 1, 2, 5 ] ] } - - In 2.6, the following :query:`$elemMatch` query does *not* match the - document: - - .. code-block:: javascript - - db.test.find( { a: { $elemMatch: { $gt: 1, $lt: 5 } } } ) - -Solution - Update existing queries that rely upon the old behavior. - -Text Search Compatibility -~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB does not support the use of the :query:`$text` query operator -in mixed sharded cluster deployments that contain both version 2.4 -and version 2.6 shards. See :doc:`/release-notes/2.6-upgrade` for -upgrade instructions. - -Replica Set/Sharded Cluster Validation --------------------------------------- - -.. _2.6-metadata-check-incompatibility: - -Shard Name Checks on Metadata Refresh -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - For sharded clusters, MongoDB 2.6 disallows a shard from refreshing - the metadata if the shard name has not been explicitly set. - - For mixed sharded cluster deployments that contain both version 2.4 - and version 2.6 shards, this change can cause errors when migrating - chunks **from** version 2.4 shards **to** version 2.6 shards if the - shard name is unknown to the version 2.6 shards. MongoDB does not - support migrations in mixed sharded cluster deployments. - -Solution - Upgrade all components of the cluster to 2.6. See - :doc:`/release-notes/2.6-upgrade`. - -.. _2.6-repl-set-vote-incompatibility: - -Replica Set Vote Configuration Validation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Description - MongoDB now deprecates giving any :term:`replica set` member more - than a single vote. During configuration, - :rsconf:`members[n].votes` should only have a - value of 1 for voting members and 0 for non-voting members. MongoDB - treats values other than 1 or 0 as a value of 1 and produces a - warning message. - -Solution - Update :rsconf:`members[n].votes` with values - other than 1 or 0 to 1 or 0 as appropriate. - -.. _2.6-time-format-changes: - -Time Format Changes -------------------- - -MongoDB now uses ``iso8601-local`` when formatting time data in many -outputs. This format follows the template -``YYYY-MM-DDTHH:mm:ss.mmm<+/-Offset>``. For example, ``2014-03-04T20:13:38.944-0500``. - -This change impacts all clients using -:ref:`Extended JSON ` in *Strict mode*, such as -:binary:`~bin.mongoexport`. - -.. _2.6-compatibility-other-resources: - -Other Resources ---------------- - -- `All backwards incompatible changes (JIRA) `_. - -- :doc:`/release-notes/2.6`. - -- :doc:`/release-notes/2.6-upgrade` for the upgrade process. diff --git a/source/release-notes/2.6-downgrade.txt b/source/release-notes/2.6-downgrade.txt deleted file mode 100644 index 4cc90d385f9..00000000000 --- a/source/release-notes/2.6-downgrade.txt +++ /dev/null @@ -1,316 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -========================== -Downgrade MongoDB from 2.6 -========================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Before you attempt any downgrade, familiarize yourself with the content -of this document, particularly the :ref:`2.6-downgrade-considerations` -and the procedure for :ref:`downgrading sharded clusters -<2.6-downgrade-cluster>`. - -.. _2.6-downgrade-considerations: - -Downgrade Recommendations and Checklist ---------------------------------------- - -When downgrading, consider the following: - -Downgrade Path -~~~~~~~~~~~~~~ - -Once upgraded to MongoDB 2.6, you **cannot** downgrade to **any** version -earlier than MongoDB 2.4. If you created ``text`` or ``2dsphere`` -indexes while running 2.6, you can only downgrade to MongoDB 2.4.10 or -later. - -Preparedness -~~~~~~~~~~~~ - -- :ref:`Remove or downgrade version 2 text indexes - ` before downgrading MongoDB 2.6 to 2.4. - -- :ref:`Remove or downgrade version 2 2dsphere indexes - ` before downgrading MongoDB 2.6 to 2.4. - -- :ref:`downgrade-user-auth-model`. If you have upgraded to the 2.6 - user authorization model, you must downgrade the user model to 2.4 - before downgrading MongoDB 2.6 to 2.4. - -Procedures -~~~~~~~~~~ - -Follow the downgrade procedures: - -- To downgrade sharded clusters, see :ref:`2.6-downgrade-cluster`. - -- To downgrade replica sets, see :ref:`2.6-downgrade-replica-set`. - -- To downgrade a standalone MongoDB instance, see :ref:`2.6-downgrade-standalone`. - -.. _downgrade-user-auth-model: - -Downgrade 2.6 User Authorization Model --------------------------------------- - -If you have upgraded to the 2.6 user authorization -model, you **must first** downgrade the user authorization model to -2.4 **before** before downgrading MongoDB 2.6 to 2.4. - -Considerations -~~~~~~~~~~~~~~ - -- For a replica set, it is only necessary to run the downgrade process - on the :term:`primary` as the changes will automatically replicate to - the secondaries. - -- For sharded clusters, although the procedure lists the downgrade of - the cluster's authorization data first, you may downgrade the - authorization data of the cluster or shards first. - -- You *must* have the ``admin.system.backup_users`` and - ``admin.system.new_users`` collections created during the upgrade - process. - -- **Important**. The downgrade process returns the user data to its - state prior to upgrading to 2.6 authorization model. Any changes - made to the user/role data using the 2.6 users model will be lost. - -.. _downgrade-auth-model-prerequisite: - -Access Control Prerequisites -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To downgrade the authorization model, you must connect as a user with -the following :term:`privileges `: - -.. code-block:: none - - { resource: { db: "admin", collection: "system.new_users" }, actions: [ "find", "insert", "update" ] } - { resource: { db: "admin", collection: "system.backup_users" }, actions: [ "find" ] } - { resource: { db: "admin", collection: "system.users" }, actions: [ "find", "remove", "insert"] } - { resource: { db: "admin", collection: "system.version" }, actions: [ "find", "update" ] } - -If no user exists with the appropriate :term:`privileges `, -create an authorization model downgrade user: - -.. include:: /includes/steps/2.6-downgrade-authorization-prereq.rst - -Procedure -~~~~~~~~~ - -The following downgrade procedure requires ``.system.users`` -collections used in version 2.4. to be intact for non-``admin`` -databases. - -.. include:: /includes/steps/2.6-downgrade-authorization.rst - -For a sharded cluster, repeat the downgrade process by connecting to -the :term:`primary` replica set member for each shard. - -.. note:: - - The cluster's :binary:`~bin.mongos` instances will fail to detect the - authorization model downgrade until the user cache is refreshed. You - can run :dbcommand:`invalidateUserCache` on each :binary:`~bin.mongos` - instance to refresh immediately, or you can wait until the cache is - refreshed automatically at the end of the :parameter:`user cache - invalidation interval `. To run - :dbcommand:`invalidateUserCache`, you must have privilege with - :authaction:`invalidateUserCache` action, which is granted by - :authrole:`userAdminAnyDatabase` and :authrole:`hostManager` roles. - -Result -~~~~~~ - -The downgrade process returns the user data to its state prior to -upgrading to 2.6 authorization model. Any changes made to the -user/role data using the 2.6 users model will be lost. - -Downgrade Updated Indexes -------------------------- - -.. _downgrade-text-index: - -Text Index Version Check -~~~~~~~~~~~~~~~~~~~~~~~~ - -If you have *version 2* text indexes (i.e. the default version for text -indexes in MongoDB 2.6), drop the *version 2* text indexes before -downgrading MongoDB. After the downgrade, enable text search and -recreate the dropped text indexes. - -To determine the version of your ``text`` indexes, run -:method:`db.collection.getIndexes()` to view index specifications. For -text indexes, the method returns the version information in the field -``textIndexVersion``. For example, the following shows that the -``text`` index on the ``quotes`` collection is version 2. - -.. code-block:: javascript - :emphasize-lines: 15 - - { - "v" : 1, - "key" : { - "_fts" : "text", - "_ftsx" : 1 - }, - "name" : "quote_text_translation.quote_text", - "ns" : "test.quotes", - "weights" : { - "quote" : 1, - "translation.quote" : 1 - }, - "default_language" : "english", - "language_override" : "language", - "textIndexVersion" : 2 - } - -.. _downgrade-2dsphere-index: - -``2dsphere`` Index Version Check -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you have *version 2* ``2dsphere`` indexes (i.e. the default version -for ``2dsphere`` indexes in MongoDB 2.6), drop the *version 2* -``2dsphere`` indexes before downgrading MongoDB. After the downgrade, -recreate the ``2dsphere`` indexes. - -To determine the version of your ``2dsphere`` indexes, run -:method:`db.collection.getIndexes()` to view index specifications. For -``2dsphere`` indexes, the method returns the version information in the field -``2dsphereIndexVersion``. For example, the following shows that the -``2dsphere`` index on the ``locations`` collection is version 2. - -.. code-block:: javascript - :emphasize-lines: 9 - - { - "v" : 1, - "key" : { - "geo" : "2dsphere" - }, - "name" : "geo_2dsphere", - "ns" : "test.locations", - "sparse" : true, - "2dsphereIndexVersion" : 2 - } - -Downgrade MongoDB Processes ---------------------------- - -.. _2.6-downgrade-standalone: - -Downgrade 2.6 Standalone ``mongod`` Instance -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following steps outline the procedure to downgrade a standalone -:binary:`~bin.mongod` from version 2.6 to 2.4. - -#. Download binaries of the latest release in the 2.4 series from the - `MongoDB Download Page`_. See :doc:`/installation` for more - information. - -#. Shut down your :binary:`~bin.mongod` instance. Replace the existing - binary with the 2.4 :binary:`~bin.mongod` binary and restart - :binary:`~bin.mongod`. - -.. _`MongoDB Download Page`: http://www.mongodb.org/downloads - -.. _2.6-downgrade-replica-set: - -Downgrade a 2.6 Replica Set -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following steps outline a "rolling" downgrade process for the -replica set. The "rolling" downgrade process minimizes downtime by -downgrading the members individually while the other members are -available: - -.. include:: /includes/steps/2.6-downgrade-replica-set.rst - -Replica set failover is not instant but will render the set unavailable to -writes and interrupt reads until the failover process -completes. Typically this takes 10 seconds or more. You may wish to -plan the downgrade during a predetermined maintenance window. - -.. _2.6-downgrade-cluster: - -Downgrade a 2.6 Sharded Cluster -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Requirements -```````````` - -While the downgrade is in progress, you cannot make changes to the -collection meta-data. For example, during the downgrade, do -**not** do any of the following: - -- :method:`sh.enableSharding()` - -- :method:`sh.shardCollection()` - -- :method:`sh.addShard()` - -- :method:`db.createCollection()` - -- :method:`db.collection.drop()` - -- :method:`db.dropDatabase()` - -- any operation that creates a database - -- any other operation that modifies the cluster meta-data in any - way. See :doc:`/reference/sharding` for a complete list of - sharding commands. Note, however, that not all commands on the - :doc:`/reference/sharding` page modifies the cluster meta-data. - -Procedure -````````` - -The downgrade procedure for a sharded cluster reverses the order of -the upgrade procedure. - -#. Turn off the :ref:`balancer ` in the - sharded cluster, as described in - :ref:`sharding-balancing-disable-temporarily`. - -#. Downgrade each shard, one at a time. For each shard, - - a. Downgrade the :binary:`~bin.mongod` secondaries *before* downgrading - the primary. - - #. To downgrade the primary, run :dbcommand:`replSetStepDown` and - downgrade. - -#. Downgrade all 3 :binary:`~bin.mongod` config server instances, leaving - the *first* system in the :option:`mongos --configdb` argument to - downgrade *last*. - -#. Downgrade and restart each :binary:`~bin.mongos`, one at a time. The - downgrade process is a binary drop-in replacement. - -#. Turn on the balancer, as described in - :ref:`sharding-balancing-enable`. - - -.. ############### Downgrade Procedure ############### - -.. |action| replace:: Downgrade -.. |version-new| replace:: 2.4 -.. |version-stop| replace:: 2.6 - -.. include:: /includes/2.4-2.6-upgrade-downgrade-procedure.rst diff --git a/source/release-notes/2.6-upgrade-authorization.txt b/source/release-notes/2.6-upgrade-authorization.txt deleted file mode 100644 index 9546851c670..00000000000 --- a/source/release-notes/2.6-upgrade-authorization.txt +++ /dev/null @@ -1,97 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -.. _2.6-upgrade-authorization-model: - -============================================= -Upgrade User Authorization Data to 2.6 Format -============================================= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -MongoDB 2.6 includes significant changes to the authorization model, -which requires changes to the way that MongoDB stores users' -credentials. As a result, in addition to upgrading MongoDB processes, -if your deployment uses authentication and authorization, after -upgrading all MongoDB process to 2.6 you **must** also upgrade the -authorization model. - -Considerations -~~~~~~~~~~~~~~ - -Complete all other Upgrade Requirements -``````````````````````````````````````` - -.. include:: /includes/important-upgrade-auth-model-prerequisites.rst - -Timing -`````` - -.. include:: /includes/fact-auth-upgrade-recommendation.rst - -If you decide to upgrade the user authorization -model immediately instead of waiting the recommended "burn in" -period, then for sharded clusters, you must wait at least 10 seconds -after upgrading the sharded clusters to run the authorization -upgrade script. - -Replica Sets -```````````` - -For a replica set, it is only necessary to run the upgrade process on -the :term:`primary` as the changes will automatically replicate to -the secondaries. - -Sharded Clusters -```````````````` - -For a sharded cluster, connect to a :binary:`~bin.mongos` and run the -upgrade procedure to upgrade the cluster's authorization data. By -default, the procedure will upgrade the authorization data of the -shards as well. - -To override this behavior, run the upgrade command with the -additional parameter ``upgradeShards: false``. If you choose to -override, you must run the upgrade procedure on the :binary:`~bin.mongos` -first, and then run the procedure on the :term:`primary` members of -each shard. - -For a sharded cluster, do **not** run the upgrade process directly -against the :ref:`config servers -`. Instead, perform the upgrade -process using one :binary:`~bin.mongos` instance to interact with the -config database. - -Requirements -~~~~~~~~~~~~ - -To upgrade the authorization model, you must have a user in the -``admin`` database with the role :authrole:`userAdminAnyDatabase`. - -Procedure -~~~~~~~~~ - -.. include:: /includes/steps/2.6-upgrade-authorization.rst - -Result -~~~~~~ - -All users in a 2.6 system are stored in the :data:`admin.system.users` -collection. To manipulate these users, use the :doc:`user management -methods `. - -The upgrade procedure copies the version 2.4 ``admin.system.users`` -collection to ``admin.system.backup_users``. - -The upgrade procedure leaves the version 2.4 -``.system.users`` collection(s) intact. diff --git a/source/release-notes/2.6-upgrade.txt b/source/release-notes/2.6-upgrade.txt deleted file mode 100644 index 7c92f571838..00000000000 --- a/source/release-notes/2.6-upgrade.txt +++ /dev/null @@ -1,277 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -====================== -Upgrade MongoDB to 2.6 -====================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -In the general case, the upgrade from MongoDB 2.4 to 2.6 is a -binary-compatible "drop-in" upgrade: shut down the :binary:`~bin.mongod` -instances and replace them with :binary:`~bin.mongod` instances running -2.6. **However**, before you attempt any upgrade, familiarize yourself -with the content of this document, particularly the -:ref:`2.6-upgrade-considerations`, the procedure for :ref:`upgrading -sharded clusters <2.6-upgrade-cluster>`, and the considerations for -:ref:`reverting to 2.4 after running 2.6 -<2.6-downgrade-considerations>`. - -.. _2.6-upgrade-considerations: - -Upgrade Recommendations and Checklists --------------------------------------- - -When upgrading, consider the following: - -Upgrade Requirements -~~~~~~~~~~~~~~~~~~~~ - -To upgrade an existing MongoDB deployment to 2.6, you must be running -2.4. If you're running a version of MongoDB before 2.4, you *must* -upgrade to 2.4 before upgrading to 2.6. See -:doc:`/release-notes/2.4-upgrade` for the procedure to upgrade from -2.2 to 2.4. - -If you use |mms-home| Backup, ensure that you're running *at least* version -``v20131216.1`` of the Backup agent before upgrading. Version ``1.4.0`` of -the backup agent followed ``v20131216.1`` - -.. include:: /includes/replacement-mms.rst - -Preparedness -~~~~~~~~~~~~ - -Before upgrading MongoDB always test your application in a staging -environment before deploying the upgrade to your production -environment. - -To begin the upgrade procedure, connect a 2.6 ``mongo`` shell to -your MongoDB 2.4 :binary:`~bin.mongos` or :binary:`~bin.mongod` and run the -:v2.6:`db.upgradeCheckAllDBs() -` to check your data set for -compatibility. This is a preliminary automated check. Assess and -resolve all issues identified by :v2.6:`db.upgradeCheckAllDBs() -`. - -Some changes in MongoDB 2.6 require manual checks and -intervention. See :doc:`/release-notes/2.6-compatibility` for an -explanation of these changes. Resolve all incompatibilities in your -deployment before continuing. - -For a deployment that uses authentication and authorization, be sure -you have at least one user in the ``admin`` database with the role -:authrole:`userAdminAnyDatabase` **before** upgrading the MongoDB -binaries. For deployments currently using -authentication and authorization, see the :ref:`consideration for -deployments that use authentication and authorization -<2.6-upgrade-auth-prereq>`. - -.. _2.6-upgrade-auth-prereq: - -Authentication -~~~~~~~~~~~~~~ - -MongoDB 2.6 includes significant changes to the authorization model, -which requires changes to the way that MongoDB stores users' -credentials. As a result, in addition to upgrading MongoDB processes, -if your deployment uses authentication and authorization, after -upgrading all MongoDB process to 2.6 you **must** also upgrade the -authorization model. - -**Before** beginning the upgrade process for a deployment that uses -authentication and authorization: - -- Ensure that at least one user exists in the ``admin`` database with - the role :authrole:`userAdminAnyDatabase`. - -- If your application performs CRUD operations on the - ``system.users`` collection or uses a - ``db.addUser()``\ -like method, then you **must** - upgrade those drivers (i.e. client libraries) **before** - :binary:`~bin.mongod` or :binary:`~bin.mongos` instances. - -- You must fully complete the upgrade procedure for *all* MongoDB - processes before upgrading the authorization model. - -After you begin to upgrade a MongoDB deployment that uses -authentication to 2.6, you *cannot* modify existing user data until -you complete the :doc:`authorization user schema upgrade -`. - -See :ref:`2.6-upgrade-authorization-model` for a complete discussion -of the upgrade procedure for the authorization model including -additional requirements and procedures. - -Downgrade Limitations -~~~~~~~~~~~~~~~~~~~~~ - -Once upgraded to MongoDB 2.6, you **cannot** downgrade to **any** version -earlier than MongoDB 2.4. If you created ``text`` or ``2dsphere`` -indexes while running 2.6, you can only downgrade to MongoDB 2.4.10 or -later. - -Package Upgrades -~~~~~~~~~~~~~~~~ - -If you installed MongoDB from the MongoDB ``apt`` or ``yum`` repositories, -upgrade to 2.6 using the package manager. - -For Debian, Ubuntu, and related operating systems, type these commands: - -.. code-block:: javascript - - sudo apt-get update - sudo apt-get install mongodb-org - -For Red Hat Enterprise, CentOS, Fedora, or Amazon Linux: - -.. code-block:: javascript - - sudo yum install mongodb-org - -If you did not install the ``mongodb-org`` package, and installed a subset -of MongoDB components replace ``mongodb-org`` in the commands above with -the appropriate package names. - -See installation instructions for :ref:`Ubuntu -`, :ref:`RHEL -`, :ref:`Debian -` for a list of the available packages and -complete MongoDB installation instructions. - - -Upgrade MongoDB Processes -------------------------- - -.. _2.6-upgrade-standalone: - -Upgrade Standalone ``mongod`` Instance to MongoDB 2.6 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following steps outline the procedure to upgrade a standalone -:binary:`~bin.mongod` from version 2.4 to 2.6. To upgrade from version -2.2 to 2.6, :doc:`upgrade to version 2.4 -` *first*, and then follow the procedure to -upgrade from 2.4 to 2.6. - -#. Download binaries of the latest release in the 2.6 series from the - `MongoDB Download Page`_. See :doc:`/installation` for more - information. - -#. Shut down your :binary:`~bin.mongod` instance. Replace the existing - binary with the 2.6 :binary:`~bin.mongod` binary and restart :binary:`~bin.mongod`. - -.. _`MongoDB Download Page`: http://www.mongodb.org/downloads - -.. _2.6-upgrade-replica-set: - -Upgrade a Replica Set to 2.6 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following steps outline the procedure to upgrade a replica set from -MongoDB 2.4 to MongoDB 2.6. To upgrade from MongoDB 2.2 to 2.6, -:doc:`upgrade all members of the replica set to version 2.4 -` *first*, and then follow the procedure to -upgrade from MongoDB 2.4 to 2.6. - -You can upgrade from MongoDB 2.4 to 2.6 using a "rolling" upgrade to -minimize downtime by upgrading the members individually while the other -members are available: - -.. include:: /includes/steps/2.6-upgrade-replica-set.rst - -Replica set failover is not instant but will render the set -unavailable accept writes until the failover process -completes. Typically this takes 30 seconds or more: schedule the -upgrade procedure during a scheduled maintenance window. - -.. _2.6-upgrade-cluster: - -Upgrade a Sharded Cluster to 2.6 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Only upgrade sharded clusters to 2.6 if **all** members of the -cluster are currently running instances of 2.4. The only supported -upgrade path for sharded clusters running 2.2 is via 2.4. The upgrade -process checks all components of the cluster and will produce warnings -if any component is running version 2.2. - -Considerations -`````````````` - -The upgrade process does not require any downtime. However, while you -upgrade the sharded cluster, ensure that clients do not make changes -to the collection meta-data. For example, during the upgrade, do **not** -do any of the following: - -- :method:`sh.enableSharding()` - -- :method:`sh.shardCollection()` - -- :method:`sh.addShard()` - -- :method:`db.createCollection()` - -- :method:`db.collection.drop()` - -- :method:`db.dropDatabase()` - -- any operation that creates a database - -- any other operation that modifies the cluster metadata in any - way. See :doc:`/reference/sharding` for a complete list - of sharding commands. Note, however, that not all commands on - the :doc:`/reference/sharding` page modifies the - cluster meta-data. - -Upgrade Sharded Clusters -```````````````````````` - -*Optional but Recommended.* As a precaution, take a backup of the -``config`` database *before* upgrading the sharded cluster. - -.. include:: /includes/steps/2.6-upgrade-sharded-cluster.rst - -.. _2.6-finalize-shard-cluster-upgrade: - -Complete Sharded Cluster Upgrade -```````````````````````````````` - -After you have successfully upgraded *all* :binary:`~bin.mongos` instances, -you can upgrade the other instances in your MongoDB deployment. - -.. warning:: - - Do not upgrade :binary:`~bin.mongod` instances until after you have - upgraded *all* :binary:`~bin.mongos` instances. - -While the balancer is still disabled, upgrade the components of your -sharded cluster in the following order: - -- Upgrade all 3 :binary:`~bin.mongod` config server instances, leaving - the *first* system in the :option:`mongos --configdb` argument to upgrade - *last*. - -- Upgrade each shard, one at a time, upgrading the :binary:`~bin.mongod` - secondaries before running :dbcommand:`replSetStepDown` and - upgrading the primary of each shard. - -When this process is complete, :ref:`re-enable the -balancer `. - -.. |action| replace:: Upgrade -.. |version-new| replace:: 2.6 -.. |version-stop| replace:: 2.4 - -.. include:: /includes/2.4-2.6-upgrade-downgrade-procedure.rst diff --git a/source/release-notes/2.6.txt b/source/release-notes/2.6.txt deleted file mode 100644 index eacfb103019..00000000000 --- a/source/release-notes/2.6.txt +++ /dev/null @@ -1,702 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -.. _release-notes-2.6: - -============================= -Release Notes for MongoDB 2.6 -============================= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: twocols - -*April 8, 2014* - -MongoDB 2.6 is now available. Key features include aggregation -enhancements, text-search integration, query-engine improvements, a new -write-operation protocol, and security enhancements. - -Patch Releases --------------- - -.. toctree:: - - /release-notes/2.6-changelog - -2.6.12 -- Mar 24, 2016 -~~~~~~~~~~~~~~~~~~~~~~ - -- Fixed issue with MMAPv1 journaling where the "last sequence number" - file (``lsn`` file) may be ahead of what is synced to the data files: - :issue:`SERVER-22261`. - -- Fixed issue that permitted the creation of new role with the same - name as a :doc:`built-in role `: - :issue:`SERVER-19284`. - -- Fixed issue where some index operations running during an active migration - may cause the migration operation to skip some documents: - :issue:`SERVER-22535`. - -- `All issues closed in 2.6.12 - `_ - -2.6.11 -- Aug 12, 2015 -~~~~~~~~~~~~~~~~~~~~~~ - -- Improvements to query plan ranking :issue:`SERVER-17815` - -- Improved ability for :binary:`~bin.mongos` to detect replica set - failover and correctly route read operations to the new - primary :issue:`SERVER-18280` - -- Improved reporting of queries in ``getMore`` operation in - :method:`db.currentOp()` and the database - profiler :issue:`SERVER-16265` - -- `All issues closed in 2.6.11 - `_ - -2.6.10 -- May 19, 2015 -~~~~~~~~~~~~~~~~~~~~~~ - -- Improve user cache invalidation enforcement on :binary:`~bin.mongos` - :issue:`SERVER-11980` - -- Provide correct rollbacks for collection creation - :issue:`SERVER-18211` - -- Allow user inserts into the ``system.profile`` collection - :issue:`SERVER-18211` - -- Fix to query system to ensure non-negation predicates get chosen - over negation predicates for multikey index bounds construction - :issue:`SERVER-18364` - -- `All issues closed in 2.6.10 - `_ - -2.6.9 -- March 24, 2015 -~~~~~~~~~~~~~~~~~~~~~~~ - -- Resolve connection handling related crash with :binary:`~bin.mongos` - instances :issue:`SERVER-17441` - -- Add server parameter to configure idle cursor timeout - :issue:`SERVER-8188` - -- Remove duplicated (orphan) documents from aggregation pipelines with - ``_id`` queries in sharded clusters :issue:`SERVER-17426` - -- Fixed crash in ``geoNear`` command queries with multiple - ``2dsphere`` indexes :issue:`SERVER-14723` - -- `All issues closed in 2.6.9 - `_ - -2.6.8 -- February 25, 2015 -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Add :dbcommand:`listCollections` command functionality to 2.6 shell - and client :issue:`SERVER-17087` - -- ``copydb``/``clone`` commands can crash the - server if a primary steps down :issue:`SERVER-16599` - -- Secondary fasserts trying to replicate an index - :issue:`SERVER-16274` - -- Query optimizer should always use equality predicate over unique - index when possible :issue:`SERVER-15802` - -- `All issues closed in 2.6.8 - `_ - -2.6.7 -- January 13, 2015 -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Decreased :binary:`~bin.mongos` memory footprint when shards have several - tags :issue:`SERVER-16683` - -- Removed check for shard version if the primary server is down - :issue:`SERVER-16237` - -- Fixed: ``/etc/init.d/mongod`` startup script failure with dirname message - :issue:`SERVER-16081` - -- Fixed: :binary:`~bin.mongos` can cause shards to hit the in-memory sort limit - by requesting more results than needed :issue:`SERVER-14306` - -- `All issues closed in 2.6.7 - `_ - -2.6.6 -- December 09, 2014 -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Fixed: Evaluating candidate query plans with concurrent writes on same - collection may crash :binary:`~bin.mongod` :issue:`SERVER-15580` - -- Fixed: 2.6 :binary:`~bin.mongod` crashes with segfault when added to a 2.8 replica set - with 12 or more members :issue:`SERVER-16107` - -- Fixed: :query:`$regex`, :query:`$in` and :update:`$sort` with index - returns too many results :issue:`SERVER-15696` - -- Change: :dbcommand:`moveChunk` will fail if there is data on the target - shard and a required index does not exist. - :issue:`SERVER-12472` - -- Primary should abort if encountered problems writing to the oplog - :issue:`SERVER-12058` - -- `All issues closed in 2.6.6 `_ - - -2.6.5 -- October 07, 2014 -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- :update:`$rename` now uses correct dotted source paths - :issue:`SERVER-15029` - -- Partially written journal last section does not affect recovery - :issue:`SERVER-15111` - -- Explicitly zero ``.ns`` files on creation :issue:`SERVER-15369` - -- Plan ranker will no longer favor intersection plans if predicate generates empty range - index scan :issue:`SERVER-14961` - -- Generate Community and Enterprise packages for SUSE 11 - :issue:`SERVER-10642` - -- `All issues closed in 2.6.5 `_ - -2.6.4 -- August 11, 2014 -~~~~~~~~~~~~~~~~~~~~~~~~ - -- Fix for ``text`` index where under specific circumstances, in-place - updates to a ``text``-indexed field may result in - incorrect/incomplete results :issue:`SERVER-14738` - -- Check the size of the split point before performing a manual split - chunk operation :issue:`SERVER-14431` - -- Ensure read preferences are re-evaluated by drawing secondary - connections from a global pool and releasing back to the pool at the - end of a query/command :issue:`SERVER-9788` - -- Allow read from secondaries when both audit and authorization are - enabled in a sharded cluster :issue:`SERVER-14170` - -- `All issues closed in 2.6.4 `_ - -2.6.3 -- June 19, 2014 -~~~~~~~~~~~~~~~~~~~~~~ - -- Equality queries on ``_id`` with projection may return no results - on sharded collections :issue:`SERVER-14302`. - -- Equality queries on ``_id`` with projection on ``_id`` may return - orphan documents on sharded collections :issue:`SERVER-14304`. - -- `All issues closed in 2.6.3 `_. - - -2.6.2 -- June 16, 2014 -~~~~~~~~~~~~~~~~~~~~~~ - -- Query plans with differing performance can tie during plan ranking - :issue:`SERVER-13675`. - -- :binary:`~bin.mongod` may terminate if x.509 authentication certificate is invalid - :issue:`SERVER-13753`. - -- Temporary map/reduce collections are incorrectly replicated to secondaries - :issue:`SERVER-13981`. - -- :binary:`~bin.mongos` incorrectly targets multiple shards for nested - field shard key predicates :issue:`SERVER-14138`. - -- :method:`rs.stepDown()` during mapReduce causes ``fassert`` when - writing to op log :issue:`SERVER-14186`. - -.. - - :ref:`2.6.2 Changelog <2.6.2-changelog>`. - -- `All issues closed in 2.6.2 `_. - -2.6.1 -- May 5, 2014 -~~~~~~~~~~~~~~~~~~~~ - -- Fix to install MongoDB service on Windows with the ``--install`` - option :issue:`SERVER-13515`. - -- Allow direct upgrade from 2.4.x to 2.6.0 via ``yum`` - :issue:`SERVER-13563`. - -- Fix issues with background index builds on secondaries: - :issue:`SERVER-13589` and :issue:`SERVER-13620`. - -- Redact credential information passed as startup options - :issue:`SERVER-13644`. - -- :ref:`2.6.1 Changelog <2.6.1-changelog>`. - -- `All issues closed in 2.6.1 `_. - -Major Changes -------------- - -The following changes in MongoDB affect both the standard and Enterprise -editions: - -.. _rn-2.6-aggregation-cursor: - -Aggregation Enhancements -~~~~~~~~~~~~~~~~~~~~~~~~ - -The aggregation pipeline adds the ability to return result sets of any -size, either by returning a cursor or writing the output to -a collection. Additionally, the aggregation pipeline supports -variables and adds new operations to handle sets and redact data. - -- The :method:`db.collection.aggregate()` now returns a cursor, which - enables the aggregation pipeline to return result sets of any size. - -- Aggregation pipelines now support an ``explain`` operation to aid - analysis of aggregation operations. - -- Aggregation can now use a more efficient external-disk-based sorting - process. - -- New pipeline stages: - - - :pipeline:`$out` stage to output to a collection. - - - :pipeline:`$redact` stage to allow additional control to accessing - the data. - -- New or modified operators: - - - :ref:`set expression operators - `. - - - :expression:`$let` and :expression:`$map` operators to allow for - the use of variables. - - - :expression:`$literal` operator and :expression:`$size` operator. - - - :expression:`$cond` expression now accepts either an object or - an array. - -.. _rel-notes-text-query-operator: - -Text Search Integration -~~~~~~~~~~~~~~~~~~~~~~~ - -Text search is now enabled by default, and the query system, including -the aggregation pipeline :pipeline:`$match` stage, includes the -:query:`$text` operator, which resolves text-search queries. - -MongoDB 2.6 includes an updated :ref:`text index -` format and deprecates the ``text`` -command. - -.. _rel-notes-data-modification: - -Insert and Update Improvements -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Improvements to the update and insert systems include additional -operations and improvements that increase consistency of modified -data. - -- .. include:: /includes/fact-update-field-order.rst - :start-after: order-of-document-fields - -- New or enhanced update operators: - - - :update:`$bit` operator supports bitwise ``xor`` operation. - - - :update:`$min` and :update:`$max` operators that perform - conditional update depending on the relative size of the specified - value and the current value of a field. - - - :update:`$push` operator has enhanced support for the - :update:`$sort`, :update:`$slice`, and :update:`$each` modifiers - and supports a new :update:`$position` modifier. - - - :update:`$currentDate` operator to set the value of a field to the - current date. - -- The :update:`$mul` operator for multiplicative increments for insert - and update operations. - -.. seealso:: - - :ref:`update-operations-incompatibility` - -.. _rel-notes-write-operations: - -New Write Operation Protocol -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -A new write protocol integrates write operations with -write concerns. The protocol also provides improved -support for bulk operations. - -MongoDB 2.6 adds the write commands :dbcommand:`insert`, -:dbcommand:`update`, and :dbcommand:`delete`, which provide the basis -for the improved bulk insert. All officially supported MongoDB drivers -support the new write commands. - -The ``mongo`` shell now includes -methods to perform bulk-write operations. See :method:`Bulk()` for -more information. - -.. seealso:: - - :ref:`write-methods-incompatibility` - -MSI Package for MongoDB Available for Windows -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB now distributes MSI packages for Microsoft Windows. This is the -recommended method for MongoDB installation under Windows. - -.. _2.6-relnotes-security: - -Security Improvements ---------------------- - -MongoDB 2.6 enhances support for secure deployments through improved SSL -support, x.509-based authentication, an improved authorization system -with more granular controls, as well as centralized credential storage, and -improved user management tools. - -Specifically these changes include: - -- A new :ref:`authorization model ` that provides the - ability to create custom :ref:`user-defined-roles` and the ability to - specify user privileges at a collection-level granularity. - -- Global user management, which stores all user and - user-defined role data in the ``admin`` database and provides a new - set of commands for managing users and roles. - -- x.509 certificate authentication for :doc:`client authentication - ` as well as for - :doc:`internal authentication - ` of sharded cluster and/or - replica set members. x.509 authentication is only available - for deployments using SSL. - -- Enhanced SSL Support: - - - :doc:`Rolling upgrades of clusters - ` to use SSL. - - - :ref:`mongodb-tools-support-ssl` support connections to - :binary:`~bin.mongod` and :binary:`~bin.mongos` instances using SSL - connections. - - - :ref:`Prompt for passphrase ` - by :binary:`~bin.mongod` or :binary:`~bin.mongos` at startup. - - - Require the use of strong SSL ciphers, with a minimum 128-bit key - length for all connections. The strong-cipher requirement prevents - an old or malicious client from forcing use of a weak cipher. - -- MongoDB disables the http interface by default, limiting - :doc:`network exposure `. - -.. seealso:: - - - :ref:`authentication-incompatibility` - - :ref:`ssl-hostname-validation` - - :doc:`/administration/security-checklist` - -Query Engine Improvements -------------------------- - -- MongoDB can now use index intersection to - fulfill queries supported by more than one index. - -- :ref:`index-filters` to limit which indexes can become the winning - plan for a query. - -- :doc:`/reference/method/js-plan-cache` methods to view and clear the - :doc:`query plans ` cached by the query optimizer. - -- MongoDB can now use :method:`~cursor.count()` with - :method:`~cursor.hint()`. See :method:`~cursor.count()` for details. - -Improvements ------------- - -Geospatial Enhancements -~~~~~~~~~~~~~~~~~~~~~~~ - -- :ref:`2dsphere indexes version 2 - <2dsphere-v2>`. - -- Support for :ref:`geojson-multipoint`, - :ref:`geojson-multilinestring`, :ref:`geojson-multipolygon`, and - :ref:`geojson-geometrycollection`. - -- Support for geospatial query clauses in :query:`$or` expressions. - -.. seealso:: - - - :ref:`2.6-2dsphere-version-incompatibility`, - - :ref:`2.6-geo-maxDistance-incompatibility`, - - :ref:`2.6-uniqueDocs-incompatibility`, - - :ref:`2.6-geospatial-validation-incompatibility` - -Index Build Enhancements -~~~~~~~~~~~~~~~~~~~~~~~~ - -- :ref:`Background index build - ` allowed on - secondaries. If you initiate a background index build on a - :term:`primary`, the secondaries will replicate the index build in - the background. - -- Automatic rebuild of interrupted index builds after a restart. - - - If a standalone or a primary instance terminates during an index - build *without a clean shutdown*, :binary:`~bin.mongod` now restarts - the index build when the instance restarts. If the instance shuts - down cleanly or if a user kills the index build, the interrupted - index builds do not automatically restart upon the restart of the - server. - - - If a secondary instance terminates during an index build, the - :binary:`~bin.mongod` instance will now restart the interrupted index - build when the instance restarts. - - To disable this behavior, use the ``--noIndexBuildRetry`` - command-line option. - -- :method:`~db.collection.ensureIndex()` now wraps a new - ``createIndex`` command. - -- The ``dropDups`` option to :method:`~db.collection.ensureIndex()` - and ``createIndex`` is deprecated. - -.. seealso:: - - :ref:`2.6-index-key-length-incompatibility` - - -Enhanced Sharding and Replication Administration -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- New :dbcommand:`cleanupOrphaned` command to remove :term:`orphaned - documents ` from a shard. - -- New :dbcommand:`mergeChunks` command to combine contiguous chunks - located on a single shard. See :dbcommand:`mergeChunks` and - :doc:`/tutorial/merge-chunks-in-sharded-cluster`. - -- New :method:`rs.printReplicationInfo()` and - :method:`rs.printSlaveReplicationInfo()` methods to provide a - formatted report of the status of a replica set from the perspective - of the primary and the secondary, respectively. - -Configuration Options YAML File Format -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 2.6 supports a YAML-based configuration file format in addition -to the previous configuration file format. See the documentation of -the :ref:`Configuration File ` for -more information. - -Operational Changes -------------------- - -Storage -~~~~~~~ - -``usePowerOf2Sizes`` is now the default allocation strategy for -all new collections. The new allocation strategy uses more storage -relative to total document size but results in lower levels of -storage fragmentation and more predictable storage capacity planning -over time. - -To use the previous *exact-fit allocation strategy*: - -- For a specific collection, use :dbcommand:`collMod` with - ``usePowerOf2Sizes`` set to ``false``. - -- For all new collections on an entire :binary:`~bin.mongod` instance, - set ``newCollectionsUsePowerOf2Sizes`` to ``false``. - - New collections include those: created during - :ref:`initial sync `, as well as those - created by the :binary:`~bin.mongorestore` and :binary:`~bin.mongoimport` - tools, by running :binary:`~bin.mongod` with the :option:`--repair - ` option, as well as the - deprecated ``restoreDatabase`` command. - -See :v2.6:`/core/storage` for more information about MongoDB's storage system. - -Networking -~~~~~~~~~~ - -- Removed upward limit for the :setting:`~net.maxIncomingConnections` for :binary:`~bin.mongod` - and :binary:`~bin.mongos`. Previous versions capped the maximum possible - :setting:`~net.maxIncomingConnections` setting at ``20,000`` connections. - -- Connection pools for a :binary:`~bin.mongos` instance may be used by multiple - MongoDB servers. This can reduce the number of connections needed - for high-volume workloads and reduce resource consumption in - sharded clusters. - -- The C++ driver now monitors :term:`replica set` health with the - ``isMaster`` command instead of - :dbcommand:`replSetGetStatus`. This allows the C++ driver to support - systems that require authentication. - -- New :method:`cursor.maxTimeMS()` and corresponding ``maxTimeMS`` - option for commands to specify a time limit. - -Tool Improvements -~~~~~~~~~~~~~~~~~ - -- ``mongo`` shell supports a global ``/etc/mongorc.js`` file. - -- All MongoDB :doc:`executable files ` now support - the ``--quiet`` option to suppress all logging output except for - error messages. - -- :binary:`~bin.mongoimport` uses the input filename, without the file - extension if any, as the collection name if run without the ``-c`` or - ``--collection`` specification. - -- :binary:`~bin.mongoexport` can now constrain export data using - ``--skip`` and ``--limit``, as well as order the documents - in an export using the ``--sort ` is now available. It -includes support for Kerberos, SSL, and SNMP. - -MongoDB Enterprise for Windows does **not** include LDAP support for -authentication. However, MongoDB Enterprise for Linux supports using -LDAP authentication with an ActiveDirectory server. - -MongoDB Enterprise for Windows includes OpenSSL version 1.0.1g. - -Auditing -~~~~~~~~ - -MongoDB Enterprise adds :ref:`auditing ` capability for -:binary:`~bin.mongod` and :binary:`~bin.mongos` instances. See :ref:`auditing` -for details. - -.. _relnotes-ldap-authentication: - -LDAP Support for Authentication -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB Enterprise provides support for proxy authentication of users. -This allows administrators to configure a MongoDB cluster to -authenticate users by proxying authentication requests to a specified -Lightweight Directory Access Protocol (LDAP) service. See -:doc:`/tutorial/configure-ldap-sasl-openldap` and -:doc:`/tutorial/configure-ldap-sasl-activedirectory` for details. - -MongoDB Enterprise for Windows does **not** include LDAP support for -authentication. However, MongoDB Enterprise for Linux supports using -LDAP authentication with an ActiveDirectory server. - -MongoDB does **not** support LDAP authentication in mixed sharded -cluster deployments that contain both version 2.4 and version 2.6 -shards. See :doc:`/release-notes/2.6-upgrade` for upgrade instructions. - -Expanded SNMP Support -~~~~~~~~~~~~~~~~~~~~~ - -MongoDB Enterprise has greatly expanded its SNMP support to provide -SNMP access to nearly the full range of metrics provided by -:method:`db.serverStatus()`. - -.. seealso:: - - :ref:`2.6-snmp-iana-mib-incompatibility` - - -Additional Information ----------------------- - -Changes Affecting Compatibility -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. toctree:: - - /release-notes/2.6-compatibility - -Some changes in 2.6 can affect :doc:`compatibility -` and may require user actions. The -2.6 ``mongo`` shell provides a -:v2.6:`db.upgradeCheckAllDBs() ` method to perform a check for upgrade -preparedness for some of these changes. - -See :doc:`/release-notes/2.6-compatibility` for a detailed list of -compatibility changes. - -.. seealso:: - - `All Backwards incompatible changes (JIRA) `_. - -Upgrade Process -~~~~~~~~~~~~~~~ - -.. toctree:: - - /release-notes/2.6-upgrade - /release-notes/2.6-upgrade-authorization - /release-notes/2.6-downgrade - -See :doc:`/release-notes/2.6-upgrade` for full upgrade instructions. - -Download -~~~~~~~~ - -To download MongoDB 2.6, go to the `downloads page`_. - -.. TODO Should we add link to the installation guides? - -.. _`downloads page`: http://www.mongodb.org/downloads - -Other Resources -~~~~~~~~~~~~~~~ - -- `All JIRA issues resolved in 2.6 `_. - -- `All Third Party License Notices `_. From 982ac0df8efbdd7a06407ddba90296e268cc80c4 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Fri, 2 Feb 2024 09:08:08 -0800 Subject: [PATCH 083/308] DOCS-16619 Clarify allowInvalidCertificates and allowInvalidHostnames (#6129) * DOCS-16619 Clarify allowInvalidCertificates and allowInvalidHostnames parameter scope * edits * CT feedback --- source/reference/configuration-options.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source/reference/configuration-options.txt b/source/reference/configuration-options.txt index 578dafc04e4..b43f3219643 100644 --- a/source/reference/configuration-options.txt +++ b/source/reference/configuration-options.txt @@ -1725,11 +1725,11 @@ Core Options .. include:: /includes/extracts/tls-facts-x509-invalid-certificate.rst - When using - the :setting:`net.tls.allowInvalidCertificates` setting, MongoDB + When using the ``net.tls.allowInvalidCertificates`` setting, MongoDB logs a warning regarding the use of the invalid certificate. - .. include:: /includes/extracts/tls-facts-see-more.rst + For more information about TLS and MongoDB, see + :ref:`configure-mongod-mongos-for-tls-ssl` and :ref:`inter-process-auth`. .. setting:: net.tls.allowInvalidHostnames @@ -1738,12 +1738,14 @@ Core Options *Default*: false - When :setting:`net.tls.allowInvalidHostnames` is ``true``, MongoDB disables the validation of the - hostnames in TLS certificates, allowing :binary:`~bin.mongod` to connect to - MongoDB instances if the hostname their certificates do not match the - specified hostname. + When ``net.tls.allowInvalidHostnames`` is ``true``, MongoDB disables + the validation of the hostnames in TLS certificates. This allows + :binary:`~bin.mongod` or :binary:`~bin.mongos` to connect to other MongoDB + instances in the cluster, even if the hostname of their certificates does not + match the specified hostname. - .. include:: /includes/extracts/tls-facts-see-more.rst + For more information about TLS and MongoDB, see + :ref:`configure-mongod-mongos-for-tls-ssl`. .. setting:: net.tls.disabledProtocols From b6709ae2c80a4beb925250ac25c9071f22aa8067 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Fri, 2 Feb 2024 12:32:12 -0800 Subject: [PATCH 084/308] add note about document keys using simple collation (#6153) * add note about document keys using simple collation * fix link --- source/includes/extracts-collation.yaml | 6 ++++++ source/reference/collation.txt | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/source/includes/extracts-collation.yaml b/source/includes/extracts-collation.yaml index 40dd16bc0f6..866a5c954a1 100644 --- a/source/includes/extracts-collation.yaml +++ b/source/includes/extracts-collation.yaml @@ -168,7 +168,13 @@ content: |- .. code-block:: javascript db.myColl.find( { score: 5, category: "cafe" } ) + + .. important:: + Matches against document keys, including embedded document keys, + use simple binary comparison. This means that a query for a key + like "foo.bár" will not match the key "foo.bar", regardless of the value you + set for the :ref:`strength ` parameter. --- ref: collation-index diff --git a/source/reference/collation.txt b/source/reference/collation.txt index c4705a1030d..347df8857b6 100644 --- a/source/reference/collation.txt +++ b/source/reference/collation.txt @@ -61,13 +61,15 @@ parameters and the locales they are associated with, see To specify simple binary comparison, specify ``locale`` value of ``"simple"``. - + * - ``strength`` - integer - - Optional. The level of comparison to perform. + - .. _collation-parameter-strength: + + Optional. The level of comparison to perform. Corresponds to `ICU Comparison Levels `_. Possible values are: From 8ca7a8512138b13da5d21209c1273c3df49dd7d2 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Fri, 2 Feb 2024 16:13:57 -0500 Subject: [PATCH 085/308] (DOCSP-34544): Add string match example to filter (#6145) * (DOCSP-34544): Add string match option to filter * WIP * test io code block * use io code blocks * add new examples * fix heading levels * adddress review comments * address review comments --- .../reference/operator/aggregation/filter.txt | 414 ++++++++++-------- 1 file changed, 233 insertions(+), 181 deletions(-) diff --git a/source/reference/operator/aggregation/filter.txt b/source/reference/operator/aggregation/filter.txt index 406bdfabb54..58a7b68770f 100644 --- a/source/reference/operator/aggregation/filter.txt +++ b/source/reference/operator/aggregation/filter.txt @@ -11,7 +11,7 @@ $filter (aggregation) .. contents:: On this page :local: :backlinks: none - :depth: 1 + :depth: 2 :class: singlecol Definition @@ -41,8 +41,8 @@ Syntax $filter: { input: , - cond: , as: , + cond: , limit: } } @@ -59,6 +59,13 @@ Syntax - An :ref:`expression ` that resolves to an array. + * - ``as`` + + - Optional. A name for the :doc:`variable + ` that represents each + individual element of the ``input`` array. If no name is + specified, the variable name defaults to ``this``. + * - ``cond`` - An :ref:`expression ` that resolves @@ -67,13 +74,6 @@ Syntax element of the ``input`` array individually with the variable name specified in ``as``. - * - ``as`` - - - Optional. A name for the :doc:`variable - ` that represents each - individual element of the ``input`` array. If no name is - specified, the variable name defaults to ``this``. - * - ``limit`` - Optional. A number expression that restricts the number of matching array elements that :expression:`$filter` returns. You cannot @@ -155,210 +155,262 @@ Examples A collection ``sales`` has the following documents: -.. code-block:: javascript - - db.sales.insertMany( [ - { - _id: 0, - items: [ - { item_id: 43, quantity: 2, price: 10 }, - { item_id: 2, quantity: 1, price: 240 } - ] - }, - { - _id: 1, - items: [ - { item_id: 23, quantity: 3, price: 110 }, - { item_id: 103, quantity: 4, price: 5 }, - { item_id: 38, quantity: 1, price: 300 } - ] - }, - { - _id: 2, - items: [ - { item_id: 4, quantity: 1, price: 23 } - ] - } - ] ) +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.sales.insertMany( [ + { + _id: 0, + items: [ + { item_id: 43, quantity: 2, price: 10, name: "pen" }, + { item_id: 2, quantity: 1, price: 240, name: "briefcase" } + ] + }, + { + _id: 1, + items: [ + { item_id: 23, quantity: 3, price: 110, name: "notebook" }, + { item_id: 103, quantity: 4, price: 5, name: "pen" }, + { item_id: 38, quantity: 1, price: 300, name: "printer" } + ] + }, + { + _id: 2, + items: [ + { item_id: 4, quantity: 1, price: 23, name: "paper" } + ] + } + ] ) The following example filters the ``items`` array to only include documents that have a ``price`` greater than or equal to ``100``: -.. code-block:: javascript - - db.sales.aggregate( [ - { - $project: { - items: { - $filter: { - input: "$items", - as: "item", - cond: { $gte: [ "$$item.price", 100 ] } +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.sales.aggregate( [ + { + $project: { + items: { + $filter: { + input: "$items", + as: "item", + cond: { $gte: [ "$$item.price", 100 ] } + } } } } - } - ] ) - -The operation produces the following results: - -.. code-block:: javascript - - { - "_id" : 0, - "items" : [ - { "item_id" : 2, "quantity" : 1, "price" : 240 } + ] ) + + .. output:: + :language: javascript + + [ + { + _id: 0, + items: [ { item_id: 2, quantity: 1, price: 240, name: 'briefcase' } ] + }, + { + _id: 1, + items: [ + { item_id: 23, quantity: 3, price: 110, name: 'notebook' }, + { item_id: 38, quantity: 1, price: 300, name: 'printer' } + ] + }, + { _id: 2, items: [] } ] - } - { - "_id" : 1, - "items" : [ - { "item_id" : 23, "quantity" : 3, "price" : 110 }, - { "item_id" : 38, "quantity" : 1, "price" : 300 } - ] - } - { "_id" : 2, "items" : [ ] } -Using the ``limit`` field -~~~~~~~~~~~~~~~~~~~~~~~~~ +Use the limit Field +~~~~~~~~~~~~~~~~~~~ This example uses the ``sales`` collection from the previous example. -The example uses the ``limit`` field to specifiy the number of matching elements -returned in each ``items`` array. - -.. code-block:: javascript - :emphasize-lines: 9 - - db.sales.aggregate( [ - { - $project: { - items: { - $filter: { - input: "$items", - cond: { $gte: [ "$$item.price", 100 ] }, - as: "item", - limit: 1 +The example uses the ``limit`` field to specify the number of matching +elements returned in each ``items`` array. + +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + :emphasize-lines: 9 + + db.sales.aggregate( [ + { + $project: { + items: { + $filter: { + input: "$items", + as: "item", + cond: { $gte: [ "$$item.price", 100 ] }, + limit: 1 + } } } } - } - ] ) - -The operation produces the following results: - -.. code-block:: javascript - - { - "_id" : 0, - "items" : [ - { "item_id" : 2, "quantity" : 1, "price" : 240 } + ] ) + + .. output:: + :language: javascript + + [ + { + _id: 0, + items: [ { item_id: 2, quantity: 1, price: 240, name: 'briefcase' } ] + }, + { + _id: 1, + items: [ { item_id: 23, quantity: 3, price: 110, name: 'notebook' } ] + }, + { _id: 2, items: [] } ] - } - { - "_id" : 1, - "items" : [ - { "item_id" : 23, "quantity" : 3, "price" : 110 } - ] - } - { "_id" : 2, "items" : [ ] } -``limit`` as a Numeric Expression -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +limit Greater than Possible Matches +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This example uses the ``sales`` collection from the previous example. -The following example uses a numeric expression for the ``limit`` field to -specifiy the number of matching elements returned in each ``items`` array. - -.. code-block:: javascript - :emphasize-lines: 9 - - db.sales.aggregate( [ - { - $project: { - items: { - $filter: { - input: "$items", - cond: { $lte: [ "$$item.price", 150] }, - as: "item", - limit: 2.000 +The example uses a ``limit`` field value that is larger than the +possible number of matching elements that can be returned. In this case, +``limit`` does not affect the query results and returns all documents +matching the ``$gte`` filter criteria. + +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + :emphasize-lines: 9 + + db.sales.aggregate( [ + { + $project: { + items: { + $filter: { + input: "$items", + as: "item", + cond: { $gte: [ "$$item.price", 100] }, + limit: 5 + } } } } - } - ] ) - -The operation produces the following results: + ] ) + + .. output:: + :language: javascript + + [ + { + _id: 0, + items: [ { item_id: 2, quantity: 1, price: 240, name: 'briefcase' } ] + }, + { + _id: 1, + items: [ + { item_id: 23, quantity: 3, price: 110, name: 'notebook' }, + { item_id: 38, quantity: 1, price: 300, name: 'printer' } + ] + }, + { _id: 2, items: [] } + ] -.. code-block:: javascript +Filter Based on String Equality Match +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - { - "_id": 0, - "items": [ - { "item_id": 43, "quantity": 2, "price": 10 } - ] - }, - { - "_id": 1, - "items": [ - { "item_id": 23, "quantity": 3, "price": 110 }, - { "item_id": 103, "quantity": 4, "price": 5 } - ] - }, - { - "_id": 2, - "items": [ - { "item_id": 4, "quantity": 1, "price": 23 } - ] - } +This example uses the ``sales`` collection from the previous example. -``limit`` Greater than Possible Matches -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The following aggregation filters for ``items`` that have a ``name`` +value of ``pen``. -This example uses the ``sales`` collection from the previous example. +.. io-code-block:: + :copyable: true -The example uses a ``limit`` field value that is larger than the possible -number of matching elements that can be returned. + .. input:: + :language: javascript -.. code-block:: javascript - :emphasize-lines: 9 - - db.sales.aggregate( [ - { - $project: { - items: { - $filter: { - input: "$items", - cond: { $gte: [ "$$item.price", 100] }, - as: "item", - limit: 5 + db.sales.aggregate( [ + { + $project: { + items: { + $filter: { + input: "$items", + as: "item", + cond: { $eq: [ "$$item.name", "pen"] } + } } } } - } - ] ) + ] ) + + .. output:: + :language: javascript + + [ + { + _id: 0, + items: [ { item_id: 43, quantity: 2, price: 10, name: 'pen' } ] + }, + { + _id: 1, + items: [ { item_id: 103, quantity: 4, price: 5, name: 'pen' } ] + }, + { _id: 2, items: [] } + ] -The operation produces the following results: +Filter Based on Regular Expression Match +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. code-block:: javascript +This example uses the ``sales`` collection from the previous example. - [ - { - "_id": 0, - "items": [ - { "item_id": 2, "quantity": 1, "price": 240 } - ] - }, - { - "_id": 1, - "items": [ - { "item_id": 23, "quantity": 3, "price": 110 }, - { "item_id": 38, "quantity": 1, "price": 300 } - ] - }, - { - "_id": 2, - "items": [] - } - ] +The following aggregation uses :expression:`$regexMatch` to filter for +``items`` that have a ``name`` value that starts with ``p``: + +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.sales.aggregate( [ + { + $project: { + items: { + $filter: { + input: "$items", + as: "item", + cond: { + $regexMatch: { input: "$$item.name", regex: /^p/ } + } + } + } + } + } + ] ) + + .. output:: + :language: javascript + + [ + { + _id: 0, + items: [ { item_id: 43, quantity: 2, price: 10, name: 'pen' } ] + }, + { + _id: 1, + items: [ + { item_id: 103, quantity: 4, price: 5, name: 'pen' }, + { item_id: 38, quantity: 1, price: 300, name: 'printer' } + ] + }, + { + _id: 2, + items: [ { item_id: 4, quantity: 1, price: 23, name: 'paper' } ] + } + ] From ce796a9392b0f4c20cec33f8a94e9fe8f3627d90 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Fri, 2 Feb 2024 16:59:54 -0500 Subject: [PATCH 086/308] (DOCSP-28684): Include LDAP SRV details in config docs (#6184) * (DOCSP-28684): Include LDAP SRV details in config docs * use replacements * change mongod replacement * review feedback * typo * edits --- source/core/security-ldap-external.txt | 6 ++++++ source/core/security-ldap.txt | 6 ++++++ source/includes/ldap-srv-details.rst | 8 ++++++++ source/reference/configuration-options.txt | 6 ++++++ source/reference/program/mongoldap.txt | 12 ++++-------- 5 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 source/includes/ldap-srv-details.rst diff --git a/source/core/security-ldap-external.txt b/source/core/security-ldap-external.txt index 889070a0558..5e90b7b4ee2 100644 --- a/source/core/security-ldap-external.txt +++ b/source/core/security-ldap-external.txt @@ -227,6 +227,12 @@ configuration file: - Quote-enclosed comma-separated list of LDAP servers in ``host[:port]`` format. + You can prefix LDAP servers with ``srv:`` and ``srv_raw:``. + + .. |ldap-binary| replace:: :binary:`mongod` + + .. include:: /includes/ldap-srv-details.rst + - **YES** * - :setting:`security.ldap.authz.queryTemplate` diff --git a/source/core/security-ldap.txt b/source/core/security-ldap.txt index 825f030f477..11435769aa7 100644 --- a/source/core/security-ldap.txt +++ b/source/core/security-ldap.txt @@ -216,6 +216,12 @@ configuration file: - Quote-enclosed comma-separated list of LDAP servers in ``host[:port]`` format. + You can prefix LDAP servers with ``srv:`` and ``srv_raw:``. + + .. |ldap-binary| replace:: :binary:`mongod` + + .. include:: /includes/ldap-srv-details.rst + - **YES** * - :setting:`security.ldap.bind.method` diff --git a/source/includes/ldap-srv-details.rst b/source/includes/ldap-srv-details.rst new file mode 100644 index 00000000000..9c35dcff453 --- /dev/null +++ b/source/includes/ldap-srv-details.rst @@ -0,0 +1,8 @@ +If your connection string specifies ``"srv:"``, |ldap-binary| +verifies that ``"_ldap._tcp.gc._msdcs."`` exists for SRV to +support Active Directory. If not found, |ldap-binary| verifies that +``"_ldap._tcp."`` exists for SRV. If an SRV record cannot be +found, |ldap-binary| warns you to use ``"srv_raw:"`` instead. + +If your connection string specifies ``"srv_raw:"``, +|ldap-binary| performs an SRV record lookup for ``""``. diff --git a/source/reference/configuration-options.txt b/source/reference/configuration-options.txt index b43f3219643..8cdae9462b2 100644 --- a/source/reference/configuration-options.txt +++ b/source/reference/configuration-options.txt @@ -3134,6 +3134,12 @@ Key Management Configuration Options :setting:`security.ldap.servers`. MongoDB supports following LDAP referrals as defined in `RFC 4511 4.1.10 `_. Do not use :setting:`security.ldap.servers` for listing every LDAP server in your infrastructure. + + You can prefix LDAP servers with ``srv:`` and ``srv_raw:``. + + .. |ldap-binary| replace:: :binary:`mongod` + + .. include:: /includes/ldap-srv-details.rst This setting can be configured on a running :binary:`~bin.mongod` or :binary:`~bin.mongos` using :dbcommand:`setParameter`. diff --git a/source/reference/program/mongoldap.txt b/source/reference/program/mongoldap.txt index 4c7fc1c8db9..d4df5a0ff2b 100644 --- a/source/reference/program/mongoldap.txt +++ b/source/reference/program/mongoldap.txt @@ -157,16 +157,12 @@ configuration files are valid, the output might be as follows: Behavior -------- -Starting in MonogoDB 5.1, ``mongoldap`` supports prefixing LDAP +Starting in MongoDB 5.1, ``mongoldap`` supports prefixing LDAP server with ``srv:`` and ``srv_raw:``. -If your connection string specifies ``"srv:"``, ``mongoldap`` -verifies that ``"_ldap._tcp.gc._msdcs."`` exists for SRV to -support Active Directory. If not found, it verifies -``"_ldap._tcp."`` exists for SRV. If an SRV record cannot be -found, ``mongoldap`` warns you to use ``"srv_raw:"`` instead. -``mongoldap`` does the reverse check for ``"srv_raw:"`` by -checking for ``"_ldap._tcp."``. +.. |ldap-binary| replace:: ``mongoldap`` + +.. include:: /includes/ldap-srv-details.rst Options ------- From 9cef0410b2a8477cc6348dd7b1ab9d43f0cf32b5 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Fri, 2 Feb 2024 14:08:23 -0800 Subject: [PATCH 087/308] add note about the similarity of $set commands (#6143) * add note about the similarity of $set commands * fix formatting --- source/reference/operator/update/set.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/reference/operator/update/set.txt b/source/reference/operator/update/set.txt index fc122353508..76e6437ed77 100644 --- a/source/reference/operator/update/set.txt +++ b/source/reference/operator/update/set.txt @@ -153,6 +153,23 @@ After updating, the document has the following values: ratings: [ { by: 'Customer007', rating: 4 } ] } +.. important:: + + The above code uses ``dot notation`` to update the ``make`` field of the + embedded ``details`` document. The code format looks similar to the following + code example, which instead *replaces the entire embedded document*, removing + all other fields in the embedded ``details`` document: + + .. code-block:: javascript + :copyable: false + + db.products.updateOne( + { _id: 100 }, + { $set: { details: + {make: "Kustom Kidz"} + } + }) + Set Elements in Arrays ~~~~~~~~~~~~~~~~~~~~~~ From 801c43e99cb573ce94c9038c3e18192d584486f2 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Mon, 5 Feb 2024 11:16:27 -0500 Subject: [PATCH 088/308] fix filter build error (#6214) * fix filter build error * add example heading --- .../reference/operator/aggregation/filter.txt | 55 +++++++++---------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/source/reference/operator/aggregation/filter.txt b/source/reference/operator/aggregation/filter.txt index 58a7b68770f..af049356bd4 100644 --- a/source/reference/operator/aggregation/filter.txt +++ b/source/reference/operator/aggregation/filter.txt @@ -155,35 +155,34 @@ Examples A collection ``sales`` has the following documents: -.. io-code-block:: - :copyable: true - - .. input:: - :language: javascript +.. code-block:: javascript - db.sales.insertMany( [ - { - _id: 0, - items: [ - { item_id: 43, quantity: 2, price: 10, name: "pen" }, - { item_id: 2, quantity: 1, price: 240, name: "briefcase" } - ] - }, - { - _id: 1, - items: [ - { item_id: 23, quantity: 3, price: 110, name: "notebook" }, - { item_id: 103, quantity: 4, price: 5, name: "pen" }, - { item_id: 38, quantity: 1, price: 300, name: "printer" } - ] - }, - { - _id: 2, - items: [ - { item_id: 4, quantity: 1, price: 23, name: "paper" } - ] - } - ] ) + db.sales.insertMany( [ + { + _id: 0, + items: [ + { item_id: 43, quantity: 2, price: 10, name: "pen" }, + { item_id: 2, quantity: 1, price: 240, name: "briefcase" } + ] + }, + { + _id: 1, + items: [ + { item_id: 23, quantity: 3, price: 110, name: "notebook" }, + { item_id: 103, quantity: 4, price: 5, name: "pen" }, + { item_id: 38, quantity: 1, price: 300, name: "printer" } + ] + }, + { + _id: 2, + items: [ + { item_id: 4, quantity: 1, price: 23, name: "paper" } + ] + } + ] ) + +Filter Based on Number Comparison +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following example filters the ``items`` array to only include documents that have a ``price`` greater than or equal to ``100``: From b491675f256eefa30c37926dec7a90e406af364b Mon Sep 17 00:00:00 2001 From: Nora Reidy Date: Mon, 5 Feb 2024 12:29:31 -0500 Subject: [PATCH 089/308] DOCSP-35337: Update rollback information (#5929) * empty commit * DOCSP-35337: Update rollback size limits * link to term * small style guide fix * wording * KD feedback * indent * small edit --- source/core/replica-set-rollbacks.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/source/core/replica-set-rollbacks.txt b/source/core/replica-set-rollbacks.txt index be052dbe58d..0af65884676 100644 --- a/source/core/replica-set-rollbacks.txt +++ b/source/core/replica-set-rollbacks.txt @@ -207,7 +207,26 @@ Index Operations When :readconcern:`"majority"` Read Concern is Disabled Size Limitations ~~~~~~~~~~~~~~~~ -MongoDB does not limit the amount of data you can roll back. +MongoDB supports the following rollback algorithms, which have different size limitations: + +- **Recover to a Timestamp**, where a former primary reverts to a consistent point in time and + applies operations until it catches up to the sync source's branch of history. This is the + default rollback algorithm. + + When using this algorithm, MongoDB does not limit the amount of data you can roll back. + +- **Rollback via Refetch**, where a former primary finds the common point between its :term:`oplog` + and the sync source's oplog. Then, the member examines and reverts all operations in its oplog until + it reaches this common point. Rollback via Refetch occurs only when the + :setting:`~replication.enableMajorityReadConcern` setting in your configuration file is set to + ``false``. + + When using this algorithm, MongoDB can only roll back up to 300 MB of data. + + .. note:: + + Starting in MongoDB 5.0, :setting:`~replication.enableMajorityReadConcern` is set to + ``true`` and cannot be changed. .. _rollback-time-limit: From 6a62bb00ba506bfed4c68fd25264fc3093dfcd1a Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Mon, 5 Feb 2024 13:50:45 -0500 Subject: [PATCH 090/308] DOCS-16286-explain-executionStats-nReturned-incorrect-desc (#6132) * DOCS-16286-explain-executionStats-nReturned-incorrect-desc * Adding taxonomy tagging, updated duplicate section with new description. * Further clarifying after feedback, removing inaccurate explain.nReturned entry after external review. * Updating Compass procedure. * Removing nReturned from query example due to incorrect location. * Removing redundant taxonomy tags. --- source/reference/explain-results.txt | 7 +------ source/tutorial/analyze-query-plan.txt | 14 +++++++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/source/reference/explain-results.txt b/source/reference/explain-results.txt index d3c0db76a00..ed75ef04721 100644 --- a/source/reference/explain-results.txt +++ b/source/reference/explain-results.txt @@ -558,7 +558,7 @@ representative. Your output may differ significantly. .. data:: explain.executionStats.nReturned - Number of documents that match the query condition. + Number of documents returned by the winning query plan. :data:`~explain.executionStats.nReturned` corresponds to the ``n`` field returned by ``cursor.explain()`` in earlier versions of MongoDB. @@ -842,7 +842,6 @@ The following fields are included in the explain results for a totalKeysExamined: , collectionScans: , indexesUsed: [ , , ..., ], - nReturned: , executionTimeMillisEstimate: To see the descriptions for the fields in the ``$lookup`` section, see @@ -870,10 +869,6 @@ The other fields are: Array of strings with the names of the indexes used by the query. -.. data:: explain.nReturned - - Number of documents that match the query condition. - .. data:: explain.executionTimeMillisEstimate Estimated time in milliseconds for the query execution. diff --git a/source/tutorial/analyze-query-plan.txt b/source/tutorial/analyze-query-plan.txt index ab4d9b0cfef..d5826a6325f 100644 --- a/source/tutorial/analyze-query-plan.txt +++ b/source/tutorial/analyze-query-plan.txt @@ -4,6 +4,10 @@ Analyze Query Performance .. default-domain:: mongodb +.. facet:: + :name: programming_language + :values: shell + .. contents:: On this page :local: :backlinks: none @@ -141,7 +145,7 @@ Query with No Index - :data:`executionStats.nReturned ` displays ``3`` to - indicate that the query matches and returns three documents. + indicate that the winning query plan returns three documents. - :data:`executionStats.totalKeysExamined ` displays ``0`` @@ -202,7 +206,7 @@ Query with No Index execution stats of the query: - :guilabel:`Documents Returned` displays ``3`` to indicate - that the query matches and returns three documents. + that the winning query plan returns three documents. - :guilabel:`Index Keys Examined` displays ``0`` to indicate that this query is not using an index. @@ -301,8 +305,8 @@ To support the query on the ``quantity`` field, add an index on the ``IXSCAN`` to indicate index use. - :data:`executionStats.nReturned ` - displays ``3`` to indicate that the query matches and - returns three documents. + displays ``3`` to indicate that the winning query plan returns + three documents. - :data:`executionStats.totalKeysExamined ` displays ``3`` @@ -368,7 +372,7 @@ To support the query on the ``quantity`` field, add an index on the execution stats of the query: - :guilabel:`Documents Returned` displays ``3`` to indicate - that the query matches and returns three documents. + that the winning query plan returns three documents. - :guilabel:`Index Keys Examined` displays ``3`` to indicate that MongoDB scanned three index entries. The From a4f79939e692721c8697437ef896e60af0e4d6b2 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:51:07 -0800 Subject: [PATCH 091/308] remove connPoolMaxShardedConnsPerHost from 5.0+ (#6053) * remove connPoolMaxShardedConnsPerHost from 5.0+ * three other parameters were also removed * add other removed params to deprecated list * remove file and folder that have not been used by the platform for 10 years --- .tx/config | 5244 ----------------- .../5.0-changes/removed-parameters.rst | 16 + source/reference/parameters.txt | 72 - 3 files changed, 16 insertions(+), 5316 deletions(-) delete mode 100644 .tx/config diff --git a/.tx/config b/.tx/config deleted file mode 100644 index dace251cd17..00000000000 --- a/.tx/config +++ /dev/null @@ -1,5244 +0,0 @@ -[main] -host = https://www.transifex.com -type = PO - -[mongodb-manual.installation] -file_filter = locale//LC_MESSAGES/installation.po -source_file = locale/pot/installation.pot -source_lang = en - -[mongodb-manual.about] -file_filter = locale//LC_MESSAGES/about.po -source_file = locale/pot/about.pot -source_lang = en - -[mongodb-manual.data-center-awareness] -file_filter = locale//LC_MESSAGES/data-center-awareness.po -source_file = locale/pot/data-center-awareness.pot -source_lang = en - -[mongodb-manual.administration] -file_filter = locale//LC_MESSAGES/administration.po -source_file = locale/pot/administration.pot -source_lang = en - -[mongodb-manual.indexes] -file_filter = locale//LC_MESSAGES/indexes.po -source_file = locale/pot/indexes.pot -source_lang = en - -[mongodb-manual.faq] -file_filter = locale//LC_MESSAGES/faq.po -source_file = locale/pot/faq.pot -source_lang = en - -[mongodb-manual.contents] -file_filter = locale//LC_MESSAGES/contents.po -source_file = locale/pot/contents.pot -source_lang = en - -[mongodb-manual.release-notes] -file_filter = locale//LC_MESSAGES/release-notes.po -source_file = locale/pot/release-notes.pot -source_lang = en - -[mongodb-manual.tutorial] -file_filter = locale//LC_MESSAGES/tutorial.po -source_file = locale/pot/tutorial.pot -source_lang = en - -[mongodb-manual.security] -file_filter = locale//LC_MESSAGES/security.po -source_file = locale/pot/security.pot -source_lang = en - -[mongodb-manual.reference] -file_filter = locale//LC_MESSAGES/reference.po -source_file = locale/pot/reference.pot -source_lang = en - -[mongodb-manual.sharding] -file_filter = locale//LC_MESSAGES/sharding.po -source_file = locale/pot/sharding.pot -source_lang = en - -[mongodb-manual.crud] -file_filter = locale//LC_MESSAGES/crud.po -source_file = locale/pot/crud.pot -source_lang = en - -[mongodb-manual.data-modeling] -file_filter = locale//LC_MESSAGES/data-modeling.po -source_file = locale/pot/data-modeling.pot -source_lang = en - -[mongodb-manual.replication] -file_filter = locale//LC_MESSAGES/replication.po -source_file = locale/pot/replication.pot -source_lang = en - -[mongodb-manual.index] -file_filter = locale//LC_MESSAGES/index.po -source_file = locale/pot/index.pot -source_lang = en - -[mongodb-manual.aggregation] -file_filter = locale//LC_MESSAGES/aggregation.po -source_file = locale/pot/aggregation.pot -source_lang = en - -[mongodb-manual.faq--replica-sets] -file_filter = locale//LC_MESSAGES/faq/replica-sets.po -source_file = locale/pot/faq/replica-sets.pot -source_lang = en - -[mongodb-manual.faq--fundamentals] -file_filter = locale//LC_MESSAGES/faq/fundamentals.po -source_file = locale/pot/faq/fundamentals.pot -source_lang = en - -[mongodb-manual.faq--indexes] -file_filter = locale//LC_MESSAGES/faq/indexes.po -source_file = locale/pot/faq/indexes.pot -source_lang = en - -[mongodb-manual.faq--storage] -file_filter = locale//LC_MESSAGES/faq/storage.po -source_file = locale/pot/faq/storage.pot -source_lang = en - -[mongodb-manual.faq--diagnostics] -file_filter = locale//LC_MESSAGES/faq/diagnostics.po -source_file = locale/pot/faq/diagnostics.pot -source_lang = en - -[mongodb-manual.faq--mongo] -file_filter = locale//LC_MESSAGES/faq/mongo.po -source_file = locale/pot/faq/mongo.pot -source_lang = en - -[mongodb-manual.faq--concurrency] -file_filter = locale//LC_MESSAGES/faq/concurrency.po -source_file = locale/pot/faq/concurrency.pot -source_lang = en - -[mongodb-manual.faq--sharding] -file_filter = locale//LC_MESSAGES/faq/sharding.po -source_file = locale/pot/faq/sharding.pot -source_lang = en - -[mongodb-manual.faq--developers] -file_filter = locale//LC_MESSAGES/faq/developers.po -source_file = locale/pot/faq/developers.pot -source_lang = en - -[mongodb-manual.applications--data-models-applications] -file_filter = locale//LC_MESSAGES/applications/data-models-applications.po -source_file = locale/pot/applications/data-models-applications.pot -source_lang = en - -[mongodb-manual.applications--indexes] -file_filter = locale//LC_MESSAGES/applications/indexes.po -source_file = locale/pot/applications/indexes.pot -source_lang = en - -[mongodb-manual.applications--data-models-tree-structures] -file_filter = locale//LC_MESSAGES/applications/data-models-tree-structures.po -source_file = locale/pot/applications/data-models-tree-structures.pot -source_lang = en - -[mongodb-manual.applications--drivers] -file_filter = locale//LC_MESSAGES/applications/drivers.po -source_file = locale/pot/applications/drivers.pot -source_lang = en - -[mongodb-manual.applications--crud] -file_filter = locale//LC_MESSAGES/applications/crud.po -source_file = locale/pot/applications/crud.pot -source_lang = en - -[mongodb-manual.applications--design-notes] -file_filter = locale//LC_MESSAGES/applications/design-notes.po -source_file = locale/pot/applications/design-notes.pot -source_lang = en - -[mongodb-manual.applications--data-models] -file_filter = locale//LC_MESSAGES/applications/data-models.po -source_file = locale/pot/applications/data-models.pot -source_lang = en - -[mongodb-manual.applications--geospatial-indexes] -file_filter = locale//LC_MESSAGES/applications/geospatial-indexes.po -source_file = locale/pot/applications/geospatial-indexes.pot -source_lang = en - -[mongodb-manual.applications--replication] -file_filter = locale//LC_MESSAGES/applications/replication.po -source_file = locale/pot/applications/replication.pot -source_lang = en - -[mongodb-manual.applications--aggregation] -file_filter = locale//LC_MESSAGES/applications/aggregation.po -source_file = locale/pot/applications/aggregation.pot -source_lang = en - -[mongodb-manual.applications--data-models-relationships] -file_filter = locale//LC_MESSAGES/applications/data-models-relationships.po -source_file = locale/pot/applications/data-models-relationships.pot -source_lang = en - -[mongodb-manual.release-notes--2_6-changes] -file_filter = locale//LC_MESSAGES/release-notes/2.6-changes.po -source_file = locale/pot/release-notes/2.6-changes.pot -source_lang = en - -[mongodb-manual.release-notes--1_4-changes] -file_filter = locale//LC_MESSAGES/release-notes/1.4-changes.po -source_file = locale/pot/release-notes/1.4-changes.pot -source_lang = en - -[mongodb-manual.release-notes--1_8] -file_filter = locale//LC_MESSAGES/release-notes/1.8.po -source_file = locale/pot/release-notes/1.8.pot -source_lang = en - -[mongodb-manual.release-notes--2_6-upgrade] -file_filter = locale//LC_MESSAGES/release-notes/2.6-upgrade.po -source_file = locale/pot/release-notes/2.6-upgrade.pot -source_lang = en - -[mongodb-manual.release-notes--replica-set-features] -file_filter = locale//LC_MESSAGES/release-notes/replica-set-features.po -source_file = locale/pot/release-notes/replica-set-features.pot -source_lang = en - -[mongodb-manual.release-notes--1_2-changes] -file_filter = locale//LC_MESSAGES/release-notes/1.2-changes.po -source_file = locale/pot/release-notes/1.2-changes.pot -source_lang = en - -[mongodb-manual.release-notes--2_2] -file_filter = locale//LC_MESSAGES/release-notes/2.2.po -source_file = locale/pot/release-notes/2.2.pot -source_lang = en - -[mongodb-manual.release-notes--drivers-write-concern] -file_filter = locale//LC_MESSAGES/release-notes/drivers-write-concern.po -source_file = locale/pot/release-notes/drivers-write-concern.pot -source_lang = en - -[mongodb-manual.release-notes--2_0] -file_filter = locale//LC_MESSAGES/release-notes/2.0.po -source_file = locale/pot/release-notes/2.0.pot -source_lang = en - -[mongodb-manual.release-notes--1_2] -file_filter = locale//LC_MESSAGES/release-notes/1.2.po -source_file = locale/pot/release-notes/1.2.pot -source_lang = en - -[mongodb-manual.release-notes--security] -file_filter = locale//LC_MESSAGES/release-notes/security.po -source_file = locale/pot/release-notes/security.pot -source_lang = en - -[mongodb-manual.release-notes--2_6] -file_filter = locale//LC_MESSAGES/release-notes/2.6.po -source_file = locale/pot/release-notes/2.6.pot -source_lang = en - -[mongodb-manual.release-notes--1_6-changes] -file_filter = locale//LC_MESSAGES/release-notes/1.6-changes.po -source_file = locale/pot/release-notes/1.6-changes.pot -source_lang = en - -[mongodb-manual.release-notes--2_4] -file_filter = locale//LC_MESSAGES/release-notes/2.4.po -source_file = locale/pot/release-notes/2.4.pot -source_lang = en - -[mongodb-manual.release-notes--1_8-changes] -file_filter = locale//LC_MESSAGES/release-notes/1.8-changes.po -source_file = locale/pot/release-notes/1.8-changes.pot -source_lang = en - -[mongodb-manual.release-notes--1_4] -file_filter = locale//LC_MESSAGES/release-notes/1.4.po -source_file = locale/pot/release-notes/1.4.pot -source_lang = en - -[mongodb-manual.release-notes--2_2-changes] -file_filter = locale//LC_MESSAGES/release-notes/2.2-changes.po -source_file = locale/pot/release-notes/2.2-changes.pot -source_lang = en - -[mongodb-manual.release-notes--2_0-changes] -file_filter = locale//LC_MESSAGES/release-notes/2.0-changes.po -source_file = locale/pot/release-notes/2.0-changes.pot -source_lang = en - -[mongodb-manual.release-notes--1_6] -file_filter = locale//LC_MESSAGES/release-notes/1.6.po -source_file = locale/pot/release-notes/1.6.pot -source_lang = en - -[mongodb-manual.release-notes--2_4-javascript] -file_filter = locale//LC_MESSAGES/release-notes/2.4-javascript.po -source_file = locale/pot/release-notes/2.4-javascript.pot -source_lang = en - -[mongodb-manual.release-notes--2_4-upgrade] -file_filter = locale//LC_MESSAGES/release-notes/2.4-upgrade.po -source_file = locale/pot/release-notes/2.4-upgrade.pot -source_lang = en - -[mongodb-manual.release-notes--2_4-index-types] -file_filter = locale//LC_MESSAGES/release-notes/2.4-index-types.po -source_file = locale/pot/release-notes/2.4-index-types.pot -source_lang = en - -[mongodb-manual.release-notes--2_4-changes] -file_filter = locale//LC_MESSAGES/release-notes/2.4-changes.po -source_file = locale/pot/release-notes/2.4-changes.pot -source_lang = en - -[mongodb-manual.administration--indexes-geo] -file_filter = locale//LC_MESSAGES/administration/indexes-geo.po -source_file = locale/pot/administration/indexes-geo.pot -source_lang = en - -[mongodb-manual.administration--replica-sets] -file_filter = locale//LC_MESSAGES/administration/replica-sets.po -source_file = locale/pot/administration/replica-sets.pot -source_lang = en - -[mongodb-manual.administration--sharded-cluster-maintenance] -file_filter = locale//LC_MESSAGES/administration/sharded-cluster-maintenance.po -source_file = locale/pot/administration/sharded-cluster-maintenance.pot -source_lang = en - -[mongodb-manual.administration--indexes] -file_filter = locale//LC_MESSAGES/administration/indexes.po -source_file = locale/pot/administration/indexes.pot -source_lang = en - -[mongodb-manual.administration--monitoring] -file_filter = locale//LC_MESSAGES/administration/monitoring.po -source_file = locale/pot/administration/monitoring.pot -source_lang = en - -[mongodb-manual.administration--tutorials] -file_filter = locale//LC_MESSAGES/administration/tutorials.po -source_file = locale/pot/administration/tutorials.pot -source_lang = en - -[mongodb-manual.administration--scripting] -file_filter = locale//LC_MESSAGES/administration/scripting.po -source_file = locale/pot/administration/scripting.pot -source_lang = en - -[mongodb-manual.administration--indexes-creation] -file_filter = locale//LC_MESSAGES/administration/indexes-creation.po -source_file = locale/pot/administration/indexes-creation.pot -source_lang = en - -[mongodb-manual.administration--production-notes] -file_filter = locale//LC_MESSAGES/administration/production-notes.po -source_file = locale/pot/administration/production-notes.pot -source_lang = en - -[mongodb-manual.administration--strategy] -file_filter = locale//LC_MESSAGES/administration/strategy.po -source_file = locale/pot/administration/strategy.pot -source_lang = en - -[mongodb-manual.administration--security] -file_filter = locale//LC_MESSAGES/administration/security.po -source_file = locale/pot/administration/security.pot -source_lang = en - -[mongodb-manual.administration--backup-sharded-clusters] -file_filter = locale//LC_MESSAGES/administration/backup-sharded-clusters.po -source_file = locale/pot/administration/backup-sharded-clusters.pot -source_lang = en - -[mongodb-manual.administration--sharded-cluster-data] -file_filter = locale//LC_MESSAGES/administration/sharded-cluster-data.po -source_file = locale/pot/administration/sharded-cluster-data.pot -source_lang = en - -[mongodb-manual.administration--data-management] -file_filter = locale//LC_MESSAGES/administration/data-management.po -source_file = locale/pot/administration/data-management.pot -source_lang = en - -[mongodb-manual.administration--indexes-text] -file_filter = locale//LC_MESSAGES/administration/indexes-text.po -source_file = locale/pot/administration/indexes-text.pot -source_lang = en - -[mongodb-manual.administration--install-on-linux] -file_filter = locale//LC_MESSAGES/administration/install-on-linux.po -source_file = locale/pot/administration/install-on-linux.pot -source_lang = en - -[mongodb-manual.administration--indexes-management] -file_filter = locale//LC_MESSAGES/administration/indexes-management.po -source_file = locale/pot/administration/indexes-management.pot -source_lang = en - -[mongodb-manual.administration--configuration] -file_filter = locale//LC_MESSAGES/administration/configuration.po -source_file = locale/pot/administration/configuration.pot -source_lang = en - -[mongodb-manual.administration--sharded-clusters] -file_filter = locale//LC_MESSAGES/administration/sharded-clusters.po -source_file = locale/pot/administration/sharded-clusters.pot -source_lang = en - -[mongodb-manual.administration--sharded-cluster-deployment] -file_filter = locale//LC_MESSAGES/administration/sharded-cluster-deployment.po -source_file = locale/pot/administration/sharded-cluster-deployment.pot -source_lang = en - -[mongodb-manual.administration--security-access-control] -file_filter = locale//LC_MESSAGES/administration/security-access-control.po -source_file = locale/pot/administration/security-access-control.pot -source_lang = en - -[mongodb-manual.administration--optimization] -file_filter = locale//LC_MESSAGES/administration/optimization.po -source_file = locale/pot/administration/optimization.pot -source_lang = en - -[mongodb-manual.administration--security-network] -file_filter = locale//LC_MESSAGES/administration/security-network.po -source_file = locale/pot/administration/security-network.pot -source_lang = en - -[mongodb-manual.administration--backup] -file_filter = locale//LC_MESSAGES/administration/backup.po -source_file = locale/pot/administration/backup.pot -source_lang = en - -[mongodb-manual.administration--replica-set-maintenance] -file_filter = locale//LC_MESSAGES/administration/replica-set-maintenance.po -source_file = locale/pot/administration/replica-set-maintenance.pot -source_lang = en - -[mongodb-manual.administration--maintenance] -file_filter = locale//LC_MESSAGES/administration/maintenance.po -source_file = locale/pot/administration/maintenance.pot -source_lang = en - -[mongodb-manual.administration--replica-set-deployment] -file_filter = locale//LC_MESSAGES/administration/replica-set-deployment.po -source_file = locale/pot/administration/replica-set-deployment.pot -source_lang = en - -[mongodb-manual.administration--replica-set-member-configuration] -file_filter = locale//LC_MESSAGES/administration/replica-set-member-configuration.po -source_file = locale/pot/administration/replica-set-member-configuration.pot -source_lang = en - -[mongodb-manual.tutorial--create-an-index] -file_filter = locale//LC_MESSAGES/tutorial/create-an-index.po -source_file = locale/pot/tutorial/create-an-index.pot -source_lang = en - -[mongodb-manual.tutorial--remove-documents] -file_filter = locale//LC_MESSAGES/tutorial/remove-documents.po -source_file = locale/pot/tutorial/remove-documents.pot -source_lang = en - -[mongodb-manual.tutorial--configure-sharded-cluster-balancer] -file_filter = locale//LC_MESSAGES/tutorial/configure-sharded-cluster-balancer.po -source_file = locale/pot/tutorial/configure-sharded-cluster-balancer.pot -source_lang = en - -[mongodb-manual.tutorial--create-indexes-to-support-queries] -file_filter = locale//LC_MESSAGES/tutorial/create-indexes-to-support-queries.po -source_file = locale/pot/tutorial/create-indexes-to-support-queries.pot -source_lang = en - -[mongodb-manual.tutorial--generate-test-data] -file_filter = locale//LC_MESSAGES/tutorial/generate-test-data.po -source_file = locale/pot/tutorial/generate-test-data.pot -source_lang = en - -[mongodb-manual.tutorial--roll-back-to-v1_8-index] -file_filter = locale//LC_MESSAGES/tutorial/roll-back-to-v1.8-index.po -source_file = locale/pot/tutorial/roll-back-to-v1.8-index.pot -source_lang = en - -[mongodb-manual.tutorial--manage-mongodb-processes] -file_filter = locale//LC_MESSAGES/tutorial/manage-mongodb-processes.po -source_file = locale/pot/tutorial/manage-mongodb-processes.pot -source_lang = en - -[mongodb-manual.tutorial--limit-number-of-items-scanned-for-text-search] -file_filter = locale//LC_MESSAGES/tutorial/limit-number-of-items-scanned-for-text-search.po -source_file = locale/pot/tutorial/limit-number-of-items-scanned-for-text-search.pot -source_lang = en - -[mongodb-manual.tutorial--query-a-geohaystack-index] -file_filter = locale//LC_MESSAGES/tutorial/query-a-geohaystack-index.po -source_file = locale/pot/tutorial/query-a-geohaystack-index.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-on-linux] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-on-linux.po -source_file = locale/pot/tutorial/install-mongodb-on-linux.pot -source_lang = en - -[mongodb-manual.tutorial--create-text-index-on-multiple-fields] -file_filter = locale//LC_MESSAGES/tutorial/create-text-index-on-multiple-fields.po -source_file = locale/pot/tutorial/create-text-index-on-multiple-fields.pot -source_lang = en - -[mongodb-manual.tutorial--replace-config-server] -file_filter = locale//LC_MESSAGES/tutorial/replace-config-server.po -source_file = locale/pot/tutorial/replace-config-server.pot -source_lang = en - -[mongodb-manual.tutorial--define-roles] -file_filter = locale//LC_MESSAGES/tutorial/define-roles.po -source_file = locale/pot/tutorial/define-roles.pot -source_lang = en - -[mongodb-manual.tutorial--create-an-auto-incrementing-field] -file_filter = locale//LC_MESSAGES/tutorial/create-an-auto-incrementing-field.po -source_file = locale/pot/tutorial/create-an-auto-incrementing-field.pot -source_lang = en - -[mongodb-manual.tutorial--ensure-indexes-fit-ram] -file_filter = locale//LC_MESSAGES/tutorial/ensure-indexes-fit-ram.po -source_file = locale/pot/tutorial/ensure-indexes-fit-ram.pot -source_lang = en - -[mongodb-manual.tutorial--split-chunks-in-sharded-cluster] -file_filter = locale//LC_MESSAGES/tutorial/split-chunks-in-sharded-cluster.po -source_file = locale/pot/tutorial/split-chunks-in-sharded-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--migrate-config-servers-with-same-hostname] -file_filter = locale//LC_MESSAGES/tutorial/migrate-config-servers-with-same-hostname.po -source_file = locale/pot/tutorial/migrate-config-servers-with-same-hostname.pot -source_lang = en - -[mongodb-manual.tutorial--configure-linux-iptables-firewall] -file_filter = locale//LC_MESSAGES/tutorial/configure-linux-iptables-firewall.po -source_file = locale/pot/tutorial/configure-linux-iptables-firewall.pot -source_lang = en - -[mongodb-manual.tutorial--upgrade-revision] -file_filter = locale//LC_MESSAGES/tutorial/upgrade-revision.po -source_file = locale/pot/tutorial/upgrade-revision.pot -source_lang = en - -[mongodb-manual.tutorial--view-sharded-cluster-configuration] -file_filter = locale//LC_MESSAGES/tutorial/view-sharded-cluster-configuration.po -source_file = locale/pot/tutorial/view-sharded-cluster-configuration.pot -source_lang = en - -[mongodb-manual.tutorial--convert-replica-set-to-replicated-shard-cluster] -file_filter = locale//LC_MESSAGES/tutorial/convert-replica-set-to-replicated-shard-cluster.po -source_file = locale/pot/tutorial/convert-replica-set-to-replicated-shard-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--shard-gridfs-data] -file_filter = locale//LC_MESSAGES/tutorial/shard-gridfs-data.po -source_file = locale/pot/tutorial/shard-gridfs-data.pot -source_lang = en - -[mongodb-manual.tutorial--create-a-hashed-index] -file_filter = locale//LC_MESSAGES/tutorial/create-a-hashed-index.po -source_file = locale/pot/tutorial/create-a-hashed-index.pot -source_lang = en - -[mongodb-manual.tutorial--model-data-for-atomic-operations] -file_filter = locale//LC_MESSAGES/tutorial/model-data-for-atomic-operations.po -source_file = locale/pot/tutorial/model-data-for-atomic-operations.pot -source_lang = en - -[mongodb-manual.tutorial--configure-a-delayed-replica-set-member] -file_filter = locale//LC_MESSAGES/tutorial/configure-a-delayed-replica-set-member.po -source_file = locale/pot/tutorial/configure-a-delayed-replica-set-member.pot -source_lang = en - -[mongodb-manual.tutorial--build-a-2dsphere-index] -file_filter = locale//LC_MESSAGES/tutorial/build-a-2dsphere-index.po -source_file = locale/pot/tutorial/build-a-2dsphere-index.pot -source_lang = en - -[mongodb-manual.tutorial--perform-two-phase-commits] -file_filter = locale//LC_MESSAGES/tutorial/perform-two-phase-commits.po -source_file = locale/pot/tutorial/perform-two-phase-commits.pot -source_lang = en - -[mongodb-manual.tutorial--query-documents] -file_filter = locale//LC_MESSAGES/tutorial/query-documents.po -source_file = locale/pot/tutorial/query-documents.pot -source_lang = en - -[mongodb-manual.tutorial--add-shards-to-shard-cluster] -file_filter = locale//LC_MESSAGES/tutorial/add-shards-to-shard-cluster.po -source_file = locale/pot/tutorial/add-shards-to-shard-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--query-a-2dsphere-index] -file_filter = locale//LC_MESSAGES/tutorial/query-a-2dsphere-index.po -source_file = locale/pot/tutorial/query-a-2dsphere-index.pot -source_lang = en - -[mongodb-manual.tutorial--configure-auditing] -file_filter = locale//LC_MESSAGES/tutorial/configure-auditing.po -source_file = locale/pot/tutorial/configure-auditing.pot -source_lang = en - -[mongodb-manual.tutorial--analyze-query-plan] -file_filter = locale//LC_MESSAGES/tutorial/analyze-query-plan.po -source_file = locale/pot/tutorial/analyze-query-plan.pot -source_lang = en - -[mongodb-manual.tutorial--use-database-commands] -file_filter = locale//LC_MESSAGES/tutorial/use-database-commands.po -source_file = locale/pot/tutorial/use-database-commands.pot -source_lang = en - -[mongodb-manual.tutorial--manage-chained-replication] -file_filter = locale//LC_MESSAGES/tutorial/manage-chained-replication.po -source_file = locale/pot/tutorial/manage-chained-replication.pot -source_lang = en - -[mongodb-manual.tutorial--backup-sharded-cluster-with-filesystem-snapshots] -file_filter = locale//LC_MESSAGES/tutorial/backup-sharded-cluster-with-filesystem-snapshots.po -source_file = locale/pot/tutorial/backup-sharded-cluster-with-filesystem-snapshots.pot -source_lang = en - -[mongodb-manual.tutorial--create-a-vulnerability-report] -file_filter = locale//LC_MESSAGES/tutorial/create-a-vulnerability-report.po -source_file = locale/pot/tutorial/create-a-vulnerability-report.pot -source_lang = en - -[mongodb-manual.tutorial--model-tree-structures-with-ancestors-array] -file_filter = locale//LC_MESSAGES/tutorial/model-tree-structures-with-ancestors-array.po -source_file = locale/pot/tutorial/model-tree-structures-with-ancestors-array.pot -source_lang = en - -[mongodb-manual.tutorial--modify-documents] -file_filter = locale//LC_MESSAGES/tutorial/modify-documents.po -source_file = locale/pot/tutorial/modify-documents.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-on-ubuntu] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-on-ubuntu.po -source_file = locale/pot/tutorial/install-mongodb-on-ubuntu.pot -source_lang = en - -[mongodb-manual.tutorial--model-tree-structures-with-materialized-paths] -file_filter = locale//LC_MESSAGES/tutorial/model-tree-structures-with-materialized-paths.po -source_file = locale/pot/tutorial/model-tree-structures-with-materialized-paths.pot -source_lang = en - -[mongodb-manual.tutorial--control-access-to-mongodb-with-kerberos-authentication] -file_filter = locale//LC_MESSAGES/tutorial/control-access-to-mongodb-with-kerberos-authentication.po -source_file = locale/pot/tutorial/control-access-to-mongodb-with-kerberos-authentication.pot -source_lang = en - -[mongodb-manual.tutorial--model-tree-structures-with-nested-sets] -file_filter = locale//LC_MESSAGES/tutorial/model-tree-structures-with-nested-sets.po -source_file = locale/pot/tutorial/model-tree-structures-with-nested-sets.pot -source_lang = en - -[mongodb-manual.tutorial--troubleshoot-reduce-function] -file_filter = locale//LC_MESSAGES/tutorial/troubleshoot-reduce-function.po -source_file = locale/pot/tutorial/troubleshoot-reduce-function.pot -source_lang = en - -[mongodb-manual.tutorial--getting-started-with-the-mongo-shell] -file_filter = locale//LC_MESSAGES/tutorial/getting-started-with-the-mongo-shell.po -source_file = locale/pot/tutorial/getting-started-with-the-mongo-shell.pot -source_lang = en - -[mongodb-manual.tutorial--model-referenced-one-to-many-relationships-between-documents] -file_filter = locale//LC_MESSAGES/tutorial/model-referenced-one-to-many-relationships-between-documents.po -source_file = locale/pot/tutorial/model-referenced-one-to-many-relationships-between-documents.pot -source_lang = en - -[mongodb-manual.tutorial--configure-windows-netsh-firewall] -file_filter = locale//LC_MESSAGES/tutorial/configure-windows-netsh-firewall.po -source_file = locale/pot/tutorial/configure-windows-netsh-firewall.pot -source_lang = en - -[mongodb-manual.tutorial--enforce-unique-keys-for-sharded-collections] -file_filter = locale//LC_MESSAGES/tutorial/enforce-unique-keys-for-sharded-collections.po -source_file = locale/pot/tutorial/enforce-unique-keys-for-sharded-collections.pot -source_lang = en - -[mongodb-manual.tutorial--reconfigure-replica-set-with-unavailable-members] -file_filter = locale//LC_MESSAGES/tutorial/reconfigure-replica-set-with-unavailable-members.po -source_file = locale/pot/tutorial/reconfigure-replica-set-with-unavailable-members.pot -source_lang = en - -[mongodb-manual.tutorial--upgrade-cluster-to-ssl] -file_filter = locale//LC_MESSAGES/tutorial/upgrade-cluster-to-ssl.po -source_file = locale/pot/tutorial/upgrade-cluster-to-ssl.pot -source_lang = en - -[mongodb-manual.tutorial--build-a-geohaystack-index] -file_filter = locale//LC_MESSAGES/tutorial/build-a-geohaystack-index.po -source_file = locale/pot/tutorial/build-a-geohaystack-index.pot -source_lang = en - -[mongodb-manual.tutorial--enable-authentication-in-sharded-cluster] -file_filter = locale//LC_MESSAGES/tutorial/enable-authentication-in-sharded-cluster.po -source_file = locale/pot/tutorial/enable-authentication-in-sharded-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--migrate-config-servers-with-different-hostnames] -file_filter = locale//LC_MESSAGES/tutorial/migrate-config-servers-with-different-hostnames.po -source_file = locale/pot/tutorial/migrate-config-servers-with-different-hostnames.pot -source_lang = en - -[mongodb-manual.tutorial--backup-sharded-cluster-metadata] -file_filter = locale//LC_MESSAGES/tutorial/backup-sharded-cluster-metadata.po -source_file = locale/pot/tutorial/backup-sharded-cluster-metadata.pot -source_lang = en - -[mongodb-manual.tutorial--model-tree-structures] -file_filter = locale//LC_MESSAGES/tutorial/model-tree-structures.po -source_file = locale/pot/tutorial/model-tree-structures.pot -source_lang = en - -[mongodb-manual.tutorial--create-a-sparse-index] -file_filter = locale//LC_MESSAGES/tutorial/create-a-sparse-index.po -source_file = locale/pot/tutorial/create-a-sparse-index.pot -source_lang = en - -[mongodb-manual.tutorial--access-mongo-shell-help] -file_filter = locale//LC_MESSAGES/tutorial/access-mongo-shell-help.po -source_file = locale/pot/tutorial/access-mongo-shell-help.pot -source_lang = en - -[mongodb-manual.tutorial--manage-journaling] -file_filter = locale//LC_MESSAGES/tutorial/manage-journaling.po -source_file = locale/pot/tutorial/manage-journaling.pot -source_lang = en - -[mongodb-manual.tutorial--manage-the-database-profiler] -file_filter = locale//LC_MESSAGES/tutorial/manage-the-database-profiler.po -source_file = locale/pot/tutorial/manage-the-database-profiler.pot -source_lang = en - -[mongodb-manual.tutorial--deploy-geographically-distributed-replica-set] -file_filter = locale//LC_MESSAGES/tutorial/deploy-geographically-distributed-replica-set.po -source_file = locale/pot/tutorial/deploy-geographically-distributed-replica-set.pot -source_lang = en - -[mongodb-manual.tutorial--list-indexes] -file_filter = locale//LC_MESSAGES/tutorial/list-indexes.po -source_file = locale/pot/tutorial/list-indexes.pot -source_lang = en - -[mongodb-manual.tutorial--change-oplog-size] -file_filter = locale//LC_MESSAGES/tutorial/change-oplog-size.po -source_file = locale/pot/tutorial/change-oplog-size.pot -source_lang = en - -[mongodb-manual.tutorial--deploy-shard-cluster] -file_filter = locale//LC_MESSAGES/tutorial/deploy-shard-cluster.po -source_file = locale/pot/tutorial/deploy-shard-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-on-os-x] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-on-os-x.po -source_file = locale/pot/tutorial/install-mongodb-on-os-x.pot -source_lang = en - -[mongodb-manual.tutorial--shard-collection-with-a-hashed-shard-key] -file_filter = locale//LC_MESSAGES/tutorial/shard-collection-with-a-hashed-shard-key.po -source_file = locale/pot/tutorial/shard-collection-with-a-hashed-shard-key.pot -source_lang = en - -[mongodb-manual.tutorial--model-tree-structures-with-child-references] -file_filter = locale//LC_MESSAGES/tutorial/model-tree-structures-with-child-references.po -source_file = locale/pot/tutorial/model-tree-structures-with-child-references.pot -source_lang = en - -[mongodb-manual.tutorial--merge-chunks-in-sharded-cluster] -file_filter = locale//LC_MESSAGES/tutorial/merge-chunks-in-sharded-cluster.po -source_file = locale/pot/tutorial/merge-chunks-in-sharded-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--optimize-query-performance-with-indexes-and-projections] -file_filter = locale//LC_MESSAGES/tutorial/optimize-query-performance-with-indexes-and-projections.po -source_file = locale/pot/tutorial/optimize-query-performance-with-indexes-and-projections.pot -source_lang = en - -[mongodb-manual.tutorial--write-scripts-for-the-mongo-shell] -file_filter = locale//LC_MESSAGES/tutorial/write-scripts-for-the-mongo-shell.po -source_file = locale/pot/tutorial/write-scripts-for-the-mongo-shell.pot -source_lang = en - -[mongodb-manual.tutorial--add-user-administrator] -file_filter = locale//LC_MESSAGES/tutorial/add-user-administrator.po -source_file = locale/pot/tutorial/add-user-administrator.pot -source_lang = en - -[mongodb-manual.tutorial--avoid-text-index-name-limit] -file_filter = locale//LC_MESSAGES/tutorial/avoid-text-index-name-limit.po -source_file = locale/pot/tutorial/avoid-text-index-name-limit.pot -source_lang = en - -[mongodb-manual.tutorial--sort-results-with-indexes] -file_filter = locale//LC_MESSAGES/tutorial/sort-results-with-indexes.po -source_file = locale/pot/tutorial/sort-results-with-indexes.pot -source_lang = en - -[mongodb-manual.tutorial--restore-sharded-cluster] -file_filter = locale//LC_MESSAGES/tutorial/restore-sharded-cluster.po -source_file = locale/pot/tutorial/restore-sharded-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--view-roles] -file_filter = locale//LC_MESSAGES/tutorial/view-roles.po -source_file = locale/pot/tutorial/view-roles.pot -source_lang = en - -[mongodb-manual.tutorial--choose-a-shard-key] -file_filter = locale//LC_MESSAGES/tutorial/choose-a-shard-key.po -source_file = locale/pot/tutorial/choose-a-shard-key.pot -source_lang = en - -[mongodb-manual.tutorial--build-a-2d-index] -file_filter = locale//LC_MESSAGES/tutorial/build-a-2d-index.po -source_file = locale/pot/tutorial/build-a-2d-index.pot -source_lang = en - -[mongodb-manual.tutorial--recover-data-following-unexpected-shutdown] -file_filter = locale//LC_MESSAGES/tutorial/recover-data-following-unexpected-shutdown.po -source_file = locale/pot/tutorial/recover-data-following-unexpected-shutdown.pot -source_lang = en - -[mongodb-manual.tutorial--evaluate-operation-performance] -file_filter = locale//LC_MESSAGES/tutorial/evaluate-operation-performance.po -source_file = locale/pot/tutorial/evaluate-operation-performance.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-enterprise-on-windows] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-enterprise-on-windows.po -source_file = locale/pot/tutorial/install-mongodb-enterprise-on-windows.pot -source_lang = en - -[mongodb-manual.tutorial--generate-key-file] -file_filter = locale//LC_MESSAGES/tutorial/generate-key-file.po -source_file = locale/pot/tutorial/generate-key-file.pot -source_lang = en - -[mongodb-manual.tutorial--add-replica-set-arbiter] -file_filter = locale//LC_MESSAGES/tutorial/add-replica-set-arbiter.po -source_file = locale/pot/tutorial/add-replica-set-arbiter.pot -source_lang = en - -[mongodb-manual.tutorial--adjust-replica-set-member-priority] -file_filter = locale//LC_MESSAGES/tutorial/adjust-replica-set-member-priority.po -source_file = locale/pot/tutorial/adjust-replica-set-member-priority.pot -source_lang = en - -[mongodb-manual.tutorial--enable-text-search] -file_filter = locale//LC_MESSAGES/tutorial/enable-text-search.po -source_file = locale/pot/tutorial/enable-text-search.pot -source_lang = en - -[mongodb-manual.tutorial--expire-data] -file_filter = locale//LC_MESSAGES/tutorial/expire-data.po -source_file = locale/pot/tutorial/expire-data.pot -source_lang = en - -[mongodb-manual.tutorial--restore-single-shard] -file_filter = locale//LC_MESSAGES/tutorial/restore-single-shard.po -source_file = locale/pot/tutorial/restore-single-shard.pot -source_lang = en - -[mongodb-manual.tutorial--configure-replica-set-secondary-sync-target] -file_filter = locale//LC_MESSAGES/tutorial/configure-replica-set-secondary-sync-target.po -source_file = locale/pot/tutorial/configure-replica-set-secondary-sync-target.pot -source_lang = en - -[mongodb-manual.tutorial--change-hostnames-in-a-replica-set] -file_filter = locale//LC_MESSAGES/tutorial/change-hostnames-in-a-replica-set.po -source_file = locale/pot/tutorial/change-hostnames-in-a-replica-set.pot -source_lang = en - -[mongodb-manual.tutorial--configure-secondary-only-replica-set-member] -file_filter = locale//LC_MESSAGES/tutorial/configure-secondary-only-replica-set-member.po -source_file = locale/pot/tutorial/configure-secondary-only-replica-set-member.pot -source_lang = en - -[mongodb-manual.tutorial--configure-x509] -file_filter = locale//LC_MESSAGES/tutorial/configure-x509.po -source_file = locale/pot/tutorial/configure-x509.pot -source_lang = en - -[mongodb-manual.tutorial--deploy-replica-set] -file_filter = locale//LC_MESSAGES/tutorial/deploy-replica-set.po -source_file = locale/pot/tutorial/deploy-replica-set.pot -source_lang = en - -[mongodb-manual.tutorial--force-member-to-be-primary] -file_filter = locale//LC_MESSAGES/tutorial/force-member-to-be-primary.po -source_file = locale/pot/tutorial/force-member-to-be-primary.pot -source_lang = en - -[mongodb-manual.tutorial--configure-a-non-voting-replica-set-member] -file_filter = locale//LC_MESSAGES/tutorial/configure-a-non-voting-replica-set-member.po -source_file = locale/pot/tutorial/configure-a-non-voting-replica-set-member.pot -source_lang = en - -[mongodb-manual.tutorial--schedule-backup-window-for-sharded-clusters] -file_filter = locale//LC_MESSAGES/tutorial/schedule-backup-window-for-sharded-clusters.po -source_file = locale/pot/tutorial/schedule-backup-window-for-sharded-clusters.pot -source_lang = en - -[mongodb-manual.tutorial--administer-shard-tags] -file_filter = locale//LC_MESSAGES/tutorial/administer-shard-tags.po -source_file = locale/pot/tutorial/administer-shard-tags.pot -source_lang = en - -[mongodb-manual.tutorial--deploy-config-servers] -file_filter = locale//LC_MESSAGES/tutorial/deploy-config-servers.po -source_file = locale/pot/tutorial/deploy-config-servers.pot -source_lang = en - -[mongodb-manual.tutorial--measure-index-use] -file_filter = locale//LC_MESSAGES/tutorial/measure-index-use.po -source_file = locale/pot/tutorial/measure-index-use.pot -source_lang = en - -[mongodb-manual.tutorial--manage-sharded-cluster-balancer] -file_filter = locale//LC_MESSAGES/tutorial/manage-sharded-cluster-balancer.po -source_file = locale/pot/tutorial/manage-sharded-cluster-balancer.pot -source_lang = en - -[mongodb-manual.tutorial--troubleshoot-replica-sets] -file_filter = locale//LC_MESSAGES/tutorial/troubleshoot-replica-sets.po -source_file = locale/pot/tutorial/troubleshoot-replica-sets.pot -source_lang = en - -[mongodb-manual.tutorial--backup-small-sharded-cluster-with-mongodump] -file_filter = locale//LC_MESSAGES/tutorial/backup-small-sharded-cluster-with-mongodump.po -source_file = locale/pot/tutorial/backup-small-sharded-cluster-with-mongodump.pot -source_lang = en - -[mongodb-manual.tutorial--configure-ssl] -file_filter = locale//LC_MESSAGES/tutorial/configure-ssl.po -source_file = locale/pot/tutorial/configure-ssl.pot -source_lang = en - -[mongodb-manual.tutorial--troubleshoot-map-function] -file_filter = locale//LC_MESSAGES/tutorial/troubleshoot-map-function.po -source_file = locale/pot/tutorial/troubleshoot-map-function.pot -source_lang = en - -[mongodb-manual.tutorial--model-embedded-one-to-many-relationships-between-documents] -file_filter = locale//LC_MESSAGES/tutorial/model-embedded-one-to-many-relationships-between-documents.po -source_file = locale/pot/tutorial/model-embedded-one-to-many-relationships-between-documents.pot -source_lang = en - -[mongodb-manual.tutorial--enable-authentication] -file_filter = locale//LC_MESSAGES/tutorial/enable-authentication.po -source_file = locale/pot/tutorial/enable-authentication.pot -source_lang = en - -[mongodb-manual.tutorial--aggregation-with-user-preference-data] -file_filter = locale//LC_MESSAGES/tutorial/aggregation-with-user-preference-data.po -source_file = locale/pot/tutorial/aggregation-with-user-preference-data.pot -source_lang = en - -[mongodb-manual.tutorial--build-indexes-on-replica-sets] -file_filter = locale//LC_MESSAGES/tutorial/build-indexes-on-replica-sets.po -source_file = locale/pot/tutorial/build-indexes-on-replica-sets.pot -source_lang = en - -[mongodb-manual.tutorial--limit-number-of-elements-in-updated-array] -file_filter = locale//LC_MESSAGES/tutorial/limit-number-of-elements-in-updated-array.po -source_file = locale/pot/tutorial/limit-number-of-elements-in-updated-array.pot -source_lang = en - -[mongodb-manual.tutorial--create-tailable-cursor] -file_filter = locale//LC_MESSAGES/tutorial/create-tailable-cursor.po -source_file = locale/pot/tutorial/create-tailable-cursor.pot -source_lang = en - -[mongodb-manual.tutorial--insert-documents] -file_filter = locale//LC_MESSAGES/tutorial/insert-documents.po -source_file = locale/pot/tutorial/insert-documents.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-on-debian] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-on-debian.po -source_file = locale/pot/tutorial/install-mongodb-on-debian.pot -source_lang = en - -[mongodb-manual.tutorial--terminate-running-operations] -file_filter = locale//LC_MESSAGES/tutorial/terminate-running-operations.po -source_file = locale/pot/tutorial/terminate-running-operations.pot -source_lang = en - -[mongodb-manual.tutorial--replace-replica-set-member] -file_filter = locale//LC_MESSAGES/tutorial/replace-replica-set-member.po -source_file = locale/pot/tutorial/replace-replica-set-member.pot -source_lang = en - -[mongodb-manual.tutorial--rebuild-indexes] -file_filter = locale//LC_MESSAGES/tutorial/rebuild-indexes.po -source_file = locale/pot/tutorial/rebuild-indexes.pot -source_lang = en - -[mongodb-manual.tutorial--convert-secondary-into-arbiter] -file_filter = locale//LC_MESSAGES/tutorial/convert-secondary-into-arbiter.po -source_file = locale/pot/tutorial/convert-secondary-into-arbiter.pot -source_lang = en - -[mongodb-manual.tutorial--control-results-of-text-search] -file_filter = locale//LC_MESSAGES/tutorial/control-results-of-text-search.po -source_file = locale/pot/tutorial/control-results-of-text-search.pot -source_lang = en - -[mongodb-manual.tutorial--aggregation-zip-code-data-set] -file_filter = locale//LC_MESSAGES/tutorial/aggregation-zip-code-data-set.po -source_file = locale/pot/tutorial/aggregation-zip-code-data-set.pot -source_lang = en - -[mongodb-manual.tutorial--change-user-password] -file_filter = locale//LC_MESSAGES/tutorial/change-user-password.po -source_file = locale/pot/tutorial/change-user-password.pot -source_lang = en - -[mongodb-manual.tutorial--convert-standalone-to-replica-set] -file_filter = locale//LC_MESSAGES/tutorial/convert-standalone-to-replica-set.po -source_file = locale/pot/tutorial/convert-standalone-to-replica-set.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-on-red-hat-centos-or-fedora-linux] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux.po -source_file = locale/pot/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux.pot -source_lang = en - -[mongodb-manual.tutorial--configure-replica-set-tag-sets] -file_filter = locale//LC_MESSAGES/tutorial/configure-replica-set-tag-sets.po -source_file = locale/pot/tutorial/configure-replica-set-tag-sets.pot -source_lang = en - -[mongodb-manual.tutorial--remove-shards-from-cluster] -file_filter = locale//LC_MESSAGES/tutorial/remove-shards-from-cluster.po -source_file = locale/pot/tutorial/remove-shards-from-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--iterate-a-cursor] -file_filter = locale//LC_MESSAGES/tutorial/iterate-a-cursor.po -source_file = locale/pot/tutorial/iterate-a-cursor.pot -source_lang = en - -[mongodb-manual.tutorial--calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes] -file_filter = locale//LC_MESSAGES/tutorial/calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes.po -source_file = locale/pot/tutorial/calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes.pot -source_lang = en - -[mongodb-manual.tutorial--remove-replica-set-member] -file_filter = locale//LC_MESSAGES/tutorial/remove-replica-set-member.po -source_file = locale/pot/tutorial/remove-replica-set-member.pot -source_lang = en - -[mongodb-manual.tutorial--expand-replica-set] -file_filter = locale//LC_MESSAGES/tutorial/expand-replica-set.po -source_file = locale/pot/tutorial/expand-replica-set.pot -source_lang = en - -[mongodb-manual.tutorial--resync-replica-set-member] -file_filter = locale//LC_MESSAGES/tutorial/resync-replica-set-member.po -source_file = locale/pot/tutorial/resync-replica-set-member.pot -source_lang = en - -[mongodb-manual.tutorial--manage-in-progress-indexing-operations] -file_filter = locale//LC_MESSAGES/tutorial/manage-in-progress-indexing-operations.po -source_file = locale/pot/tutorial/manage-in-progress-indexing-operations.pot -source_lang = en - -[mongodb-manual.tutorial--rotate-log-files] -file_filter = locale//LC_MESSAGES/tutorial/rotate-log-files.po -source_file = locale/pot/tutorial/rotate-log-files.pot -source_lang = en - -[mongodb-manual.tutorial--migrate-chunks-in-sharded-cluster] -file_filter = locale//LC_MESSAGES/tutorial/migrate-chunks-in-sharded-cluster.po -source_file = locale/pot/tutorial/migrate-chunks-in-sharded-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--use-capped-collections-for-fast-writes-and-reads] -file_filter = locale//LC_MESSAGES/tutorial/use-capped-collections-for-fast-writes-and-reads.po -source_file = locale/pot/tutorial/use-capped-collections-for-fast-writes-and-reads.pot -source_lang = en - -[mongodb-manual.tutorial--model-tree-structures-with-parent-references] -file_filter = locale//LC_MESSAGES/tutorial/model-tree-structures-with-parent-references.po -source_file = locale/pot/tutorial/model-tree-structures-with-parent-references.pot -source_lang = en - -[mongodb-manual.tutorial--convert-sharded-cluster-to-replica-set] -file_filter = locale//LC_MESSAGES/tutorial/convert-sharded-cluster-to-replica-set.po -source_file = locale/pot/tutorial/convert-sharded-cluster-to-replica-set.pot -source_lang = en - -[mongodb-manual.tutorial--add-user-to-database] -file_filter = locale//LC_MESSAGES/tutorial/add-user-to-database.po -source_file = locale/pot/tutorial/add-user-to-database.pot -source_lang = en - -[mongodb-manual.tutorial--isolate-sequence-of-operations] -file_filter = locale//LC_MESSAGES/tutorial/isolate-sequence-of-operations.po -source_file = locale/pot/tutorial/isolate-sequence-of-operations.pot -source_lang = en - -[mongodb-manual.tutorial--configure-a-hidden-replica-set-member] -file_filter = locale//LC_MESSAGES/tutorial/configure-a-hidden-replica-set-member.po -source_file = locale/pot/tutorial/configure-a-hidden-replica-set-member.pot -source_lang = en - -[mongodb-manual.tutorial--migrate-sharded-cluster-to-new-hardware] -file_filter = locale//LC_MESSAGES/tutorial/migrate-sharded-cluster-to-new-hardware.po -source_file = locale/pot/tutorial/migrate-sharded-cluster-to-new-hardware.pot -source_lang = en - -[mongodb-manual.tutorial--model-data-for-keyword-search] -file_filter = locale//LC_MESSAGES/tutorial/model-data-for-keyword-search.po -source_file = locale/pot/tutorial/model-data-for-keyword-search.pot -source_lang = en - -[mongodb-manual.tutorial--backup-sharded-cluster-with-database-dumps] -file_filter = locale//LC_MESSAGES/tutorial/backup-sharded-cluster-with-database-dumps.po -source_file = locale/pot/tutorial/backup-sharded-cluster-with-database-dumps.pot -source_lang = en - -[mongodb-manual.tutorial--build-indexes-in-the-background] -file_filter = locale//LC_MESSAGES/tutorial/build-indexes-in-the-background.po -source_file = locale/pot/tutorial/build-indexes-in-the-background.pot -source_lang = en - -[mongodb-manual.tutorial--configure-ldap-sasl-authentication] -file_filter = locale//LC_MESSAGES/tutorial/configure-ldap-sasl-authentication.po -source_file = locale/pot/tutorial/configure-ldap-sasl-authentication.pot -source_lang = en - -[mongodb-manual.tutorial--map-reduce-examples] -file_filter = locale//LC_MESSAGES/tutorial/map-reduce-examples.po -source_file = locale/pot/tutorial/map-reduce-examples.pot -source_lang = en - -[mongodb-manual.tutorial--troubleshoot-sharded-clusters] -file_filter = locale//LC_MESSAGES/tutorial/troubleshoot-sharded-clusters.po -source_file = locale/pot/tutorial/troubleshoot-sharded-clusters.pot -source_lang = en - -[mongodb-manual.tutorial--deploy-replica-set-for-testing] -file_filter = locale//LC_MESSAGES/tutorial/deploy-replica-set-for-testing.po -source_file = locale/pot/tutorial/deploy-replica-set-for-testing.pot -source_lang = en - -[mongodb-manual.tutorial--restore-replica-set-from-backup] -file_filter = locale//LC_MESSAGES/tutorial/restore-replica-set-from-backup.po -source_file = locale/pot/tutorial/restore-replica-set-from-backup.pot -source_lang = en - -[mongodb-manual.tutorial--create-a-compound-index] -file_filter = locale//LC_MESSAGES/tutorial/create-a-compound-index.po -source_file = locale/pot/tutorial/create-a-compound-index.pot -source_lang = en - -[mongodb-manual.tutorial--getting-started] -file_filter = locale//LC_MESSAGES/tutorial/getting-started.po -source_file = locale/pot/tutorial/getting-started.pot -source_lang = en - -[mongodb-manual.tutorial--create-chunks-in-sharded-cluster] -file_filter = locale//LC_MESSAGES/tutorial/create-chunks-in-sharded-cluster.po -source_file = locale/pot/tutorial/create-chunks-in-sharded-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--project-fields-from-query-results] -file_filter = locale//LC_MESSAGES/tutorial/project-fields-from-query-results.po -source_file = locale/pot/tutorial/project-fields-from-query-results.pot -source_lang = en - -[mongodb-manual.tutorial--create-a-unique-index] -file_filter = locale//LC_MESSAGES/tutorial/create-a-unique-index.po -source_file = locale/pot/tutorial/create-a-unique-index.pot -source_lang = en - -[mongodb-manual.tutorial--store-javascript-function-on-server] -file_filter = locale//LC_MESSAGES/tutorial/store-javascript-function-on-server.po -source_file = locale/pot/tutorial/store-javascript-function-on-server.pot -source_lang = en - -[mongodb-manual.tutorial--change-user-privileges] -file_filter = locale//LC_MESSAGES/tutorial/change-user-privileges.po -source_file = locale/pot/tutorial/change-user-privileges.pot -source_lang = en - -[mongodb-manual.tutorial--remove-indexes] -file_filter = locale//LC_MESSAGES/tutorial/remove-indexes.po -source_file = locale/pot/tutorial/remove-indexes.pot -source_lang = en - -[mongodb-manual.tutorial--model-embedded-one-to-one-relationships-between-documents] -file_filter = locale//LC_MESSAGES/tutorial/model-embedded-one-to-one-relationships-between-documents.po -source_file = locale/pot/tutorial/model-embedded-one-to-one-relationships-between-documents.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-on-windows] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-on-windows.po -source_file = locale/pot/tutorial/install-mongodb-on-windows.pot -source_lang = en - -[mongodb-manual.tutorial--perform-incremental-map-reduce] -file_filter = locale//LC_MESSAGES/tutorial/perform-incremental-map-reduce.po -source_file = locale/pot/tutorial/perform-incremental-map-reduce.pot -source_lang = en - -[mongodb-manual.tutorial--specify-language-for-text-index] -file_filter = locale//LC_MESSAGES/tutorial/specify-language-for-text-index.po -source_file = locale/pot/tutorial/specify-language-for-text-index.pot -source_lang = en - -[mongodb-manual.tutorial--modify-chunk-size-in-sharded-cluster] -file_filter = locale//LC_MESSAGES/tutorial/modify-chunk-size-in-sharded-cluster.po -source_file = locale/pot/tutorial/modify-chunk-size-in-sharded-cluster.pot -source_lang = en - -[mongodb-manual.tutorial--create-queries-that-ensure-selectivity] -file_filter = locale//LC_MESSAGES/tutorial/create-queries-that-ensure-selectivity.po -source_file = locale/pot/tutorial/create-queries-that-ensure-selectivity.pot -source_lang = en - -[mongodb-manual.tutorial--query-a-2d-index] -file_filter = locale//LC_MESSAGES/tutorial/query-a-2d-index.po -source_file = locale/pot/tutorial/query-a-2d-index.pot -source_lang = en - -[mongodb-manual.meta--administration] -file_filter = locale//LC_MESSAGES/meta/administration.po -source_file = locale/pot/meta/administration.pot -source_lang = en - -[mongodb-manual.meta--404] -file_filter = locale//LC_MESSAGES/meta/404.po -source_file = locale/pot/meta/404.pot -source_lang = en - -[mongodb-manual.meta--translation] -file_filter = locale//LC_MESSAGES/meta/translation.po -source_file = locale/pot/meta/translation.pot -source_lang = en - -[mongodb-manual.meta--style-guide] -file_filter = locale//LC_MESSAGES/meta/style-guide.po -source_file = locale/pot/meta/style-guide.pot -source_lang = en - -[mongodb-manual.meta--reference] -file_filter = locale//LC_MESSAGES/meta/reference.po -source_file = locale/pot/meta/reference.pot -source_lang = en - -[mongodb-manual.meta--410] -file_filter = locale//LC_MESSAGES/meta/410.po -source_file = locale/pot/meta/410.pot -source_lang = en - -[mongodb-manual.meta--403] -file_filter = locale//LC_MESSAGES/meta/403.po -source_file = locale/pot/meta/403.pot -source_lang = en - -[mongodb-manual.meta--practices] -file_filter = locale//LC_MESSAGES/meta/practices.po -source_file = locale/pot/meta/practices.pot -source_lang = en - -[mongodb-manual.meta--build] -file_filter = locale//LC_MESSAGES/meta/build.po -source_file = locale/pot/meta/build.pot -source_lang = en - -[mongodb-manual.meta--manual] -file_filter = locale//LC_MESSAGES/meta/manual.po -source_file = locale/pot/meta/manual.pot -source_lang = en - -[mongodb-manual.meta--401] -file_filter = locale//LC_MESSAGES/meta/401.po -source_file = locale/pot/meta/401.pot -source_lang = en - -[mongodb-manual.meta--organization] -file_filter = locale//LC_MESSAGES/meta/organization.po -source_file = locale/pot/meta/organization.pot -source_lang = en - -[mongodb-manual.reference--default-mongodb-port] -file_filter = locale//LC_MESSAGES/reference/default-mongodb-port.po -source_file = locale/pot/reference/default-mongodb-port.pot -source_lang = en - -[mongodb-manual.reference--limits] -file_filter = locale//LC_MESSAGES/reference/limits.po -source_file = locale/pot/reference/limits.pot -source_lang = en - -[mongodb-manual.reference--configuration-options] -file_filter = locale//LC_MESSAGES/reference/configuration-options.po -source_file = locale/pot/reference/configuration-options.pot -source_lang = en - -[mongodb-manual.reference--replica-states] -file_filter = locale//LC_MESSAGES/reference/replica-states.po -source_file = locale/pot/reference/replica-states.pot -source_lang = en - -[mongodb-manual.reference--local-database] -file_filter = locale//LC_MESSAGES/reference/local-database.po -source_file = locale/pot/reference/local-database.pot -source_lang = en - -[mongodb-manual.reference--gridfs] -file_filter = locale//LC_MESSAGES/reference/gridfs.po -source_file = locale/pot/reference/gridfs.pot -source_lang = en - -[mongodb-manual.reference--resource-document] -file_filter = locale//LC_MESSAGES/reference/resource-document.po -source_file = locale/pot/reference/resource-document.pot -source_lang = en - -[mongodb-manual.reference--operator] -file_filter = locale//LC_MESSAGES/reference/operator.po -source_file = locale/pot/reference/operator.pot -source_lang = en - -[mongodb-manual.reference--sql-aggregation-comparison] -file_filter = locale//LC_MESSAGES/reference/sql-aggregation-comparison.po -source_file = locale/pot/reference/sql-aggregation-comparison.pot -source_lang = en - -[mongodb-manual.reference--database-references] -file_filter = locale//LC_MESSAGES/reference/database-references.po -source_file = locale/pot/reference/database-references.pot -source_lang = en - -[mongodb-manual.reference--administration] -file_filter = locale//LC_MESSAGES/reference/administration.po -source_file = locale/pot/reference/administration.pot -source_lang = en - -[mongodb-manual.reference--indexes] -file_filter = locale//LC_MESSAGES/reference/indexes.po -source_file = locale/pot/reference/indexes.pot -source_lang = en - -[mongodb-manual.reference--parameters] -file_filter = locale//LC_MESSAGES/reference/parameters.po -source_file = locale/pot/reference/parameters.pot -source_lang = en - -[mongodb-manual.reference--exit-codes] -file_filter = locale//LC_MESSAGES/reference/exit-codes.po -source_file = locale/pot/reference/exit-codes.pot -source_lang = en - -[mongodb-manual.reference--sql-comparison] -file_filter = locale//LC_MESSAGES/reference/sql-comparison.po -source_file = locale/pot/reference/sql-comparison.pot -source_lang = en - -[mongodb-manual.reference--replica-configuration] -file_filter = locale//LC_MESSAGES/reference/replica-configuration.po -source_file = locale/pot/reference/replica-configuration.pot -source_lang = en - -[mongodb-manual.reference--object-id] -file_filter = locale//LC_MESSAGES/reference/object-id.po -source_file = locale/pot/reference/object-id.pot -source_lang = en - -[mongodb-manual.reference--bson-types] -file_filter = locale//LC_MESSAGES/reference/bson-types.po -source_file = locale/pot/reference/bson-types.pot -source_lang = en - -[mongodb-manual.reference--security] -file_filter = locale//LC_MESSAGES/reference/security.po -source_file = locale/pot/reference/security.pot -source_lang = en - -[mongodb-manual.reference--system-roles-collection] -file_filter = locale//LC_MESSAGES/reference/system-roles-collection.po -source_file = locale/pot/reference/system-roles-collection.pot -source_lang = en - -[mongodb-manual.reference--bios-example-collection] -file_filter = locale//LC_MESSAGES/reference/bios-example-collection.po -source_file = locale/pot/reference/bios-example-collection.pot -source_lang = en - -[mongodb-manual.reference--privilege-actions] -file_filter = locale//LC_MESSAGES/reference/privilege-actions.po -source_file = locale/pot/reference/privilege-actions.pot -source_lang = en - -[mongodb-manual.reference--glossary] -file_filter = locale//LC_MESSAGES/reference/glossary.po -source_file = locale/pot/reference/glossary.pot -source_lang = en - -[mongodb-manual.reference--connection-string] -file_filter = locale//LC_MESSAGES/reference/connection-string.po -source_file = locale/pot/reference/connection-string.pot -source_lang = en - -[mongodb-manual.reference--system-users-collection] -file_filter = locale//LC_MESSAGES/reference/system-users-collection.po -source_file = locale/pot/reference/system-users-collection.pot -source_lang = en - -[mongodb-manual.reference--system-collections] -file_filter = locale//LC_MESSAGES/reference/system-collections.po -source_file = locale/pot/reference/system-collections.pot -source_lang = en - -[mongodb-manual.reference--config-database] -file_filter = locale//LC_MESSAGES/reference/config-database.po -source_file = locale/pot/reference/config-database.pot -source_lang = en - -[mongodb-manual.reference--database-profiler] -file_filter = locale//LC_MESSAGES/reference/database-profiler.po -source_file = locale/pot/reference/database-profiler.pot -source_lang = en - -[mongodb-manual.reference--privilege-documents] -file_filter = locale//LC_MESSAGES/reference/privilege-documents.po -source_file = locale/pot/reference/privilege-documents.pot -source_lang = en - -[mongodb-manual.reference--read-preference] -file_filter = locale//LC_MESSAGES/reference/read-preference.po -source_file = locale/pot/reference/read-preference.pot -source_lang = en - -[mongodb-manual.reference--mongo-shell] -file_filter = locale//LC_MESSAGES/reference/mongo-shell.po -source_file = locale/pot/reference/mongo-shell.pot -source_lang = en - -[mongodb-manual.reference--sharding] -file_filter = locale//LC_MESSAGES/reference/sharding.po -source_file = locale/pot/reference/sharding.pot -source_lang = en - -[mongodb-manual.reference--crud] -file_filter = locale//LC_MESSAGES/reference/crud.po -source_file = locale/pot/reference/crud.pot -source_lang = en - -[mongodb-manual.reference--write-concern] -file_filter = locale//LC_MESSAGES/reference/write-concern.po -source_file = locale/pot/reference/write-concern.pot -source_lang = en - -[mongodb-manual.reference--mongodb-extended-json] -file_filter = locale//LC_MESSAGES/reference/mongodb-extended-json.po -source_file = locale/pot/reference/mongodb-extended-json.pot -source_lang = en - -[mongodb-manual.reference--ulimit] -file_filter = locale//LC_MESSAGES/reference/ulimit.po -source_file = locale/pot/reference/ulimit.pot -source_lang = en - -[mongodb-manual.reference--command] -file_filter = locale//LC_MESSAGES/reference/command.po -source_file = locale/pot/reference/command.pot -source_lang = en - -[mongodb-manual.reference--program] -file_filter = locale//LC_MESSAGES/reference/program.po -source_file = locale/pot/reference/program.pot -source_lang = en - -[mongodb-manual.reference--data-models] -file_filter = locale//LC_MESSAGES/reference/data-models.po -source_file = locale/pot/reference/data-models.pot -source_lang = en - -[mongodb-manual.reference--replication] -file_filter = locale//LC_MESSAGES/reference/replication.po -source_file = locale/pot/reference/replication.pot -source_lang = en - -[mongodb-manual.reference--aggregation-commands-comparison] -file_filter = locale//LC_MESSAGES/reference/aggregation-commands-comparison.po -source_file = locale/pot/reference/aggregation-commands-comparison.pot -source_lang = en - -[mongodb-manual.reference--aggregation] -file_filter = locale//LC_MESSAGES/reference/aggregation.po -source_file = locale/pot/reference/aggregation.pot -source_lang = en - -[mongodb-manual.reference--server-status] -file_filter = locale//LC_MESSAGES/reference/server-status.po -source_file = locale/pot/reference/server-status.pot -source_lang = en - -[mongodb-manual.reference--method] -file_filter = locale//LC_MESSAGES/reference/method.po -source_file = locale/pot/reference/method.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-comparison] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-comparison.po -source_file = locale/pot/reference/operator/aggregation-comparison.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-arithmetic] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-arithmetic.po -source_file = locale/pot/reference/operator/aggregation-arithmetic.pot -source_lang = en - -[mongodb-manual.reference--operator--query-modifier] -file_filter = locale//LC_MESSAGES/reference/operator/query-modifier.po -source_file = locale/pot/reference/operator/query-modifier.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-string] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-string.po -source_file = locale/pot/reference/operator/aggregation-string.pot -source_lang = en - -[mongodb-manual.reference--operator--query] -file_filter = locale//LC_MESSAGES/reference/operator/query.po -source_file = locale/pot/reference/operator/query.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-pipeline] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-pipeline.po -source_file = locale/pot/reference/operator/aggregation-pipeline.pot -source_lang = en - -[mongodb-manual.reference--operator--update] -file_filter = locale//LC_MESSAGES/reference/operator/update.po -source_file = locale/pot/reference/operator/update.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-set] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-set.po -source_file = locale/pot/reference/operator/aggregation-set.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-group] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-group.po -source_file = locale/pot/reference/operator/aggregation-group.pot -source_lang = en - -[mongodb-manual.reference--operator--update-field] -file_filter = locale//LC_MESSAGES/reference/operator/update-field.po -source_file = locale/pot/reference/operator/update-field.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-date] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-date.po -source_file = locale/pot/reference/operator/aggregation-date.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-projection] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-projection.po -source_file = locale/pot/reference/operator/aggregation-projection.pot -source_lang = en - -[mongodb-manual.reference--operator--projection] -file_filter = locale//LC_MESSAGES/reference/operator/projection.po -source_file = locale/pot/reference/operator/projection.pot -source_lang = en - -[mongodb-manual.reference--operator--query-comparison] -file_filter = locale//LC_MESSAGES/reference/operator/query-comparison.po -source_file = locale/pot/reference/operator/query-comparison.pot -source_lang = en - -[mongodb-manual.reference--operator--query-array] -file_filter = locale//LC_MESSAGES/reference/operator/query-array.po -source_file = locale/pot/reference/operator/query-array.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-boolean] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-boolean.po -source_file = locale/pot/reference/operator/aggregation-boolean.pot -source_lang = en - -[mongodb-manual.reference--operator--query-element] -file_filter = locale//LC_MESSAGES/reference/operator/query-element.po -source_file = locale/pot/reference/operator/query-element.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-conditional] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-conditional.po -source_file = locale/pot/reference/operator/aggregation-conditional.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-array] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-array.po -source_file = locale/pot/reference/operator/aggregation-array.pot -source_lang = en - -[mongodb-manual.reference--operator--update-array] -file_filter = locale//LC_MESSAGES/reference/operator/update-array.po -source_file = locale/pot/reference/operator/update-array.pot -source_lang = en - -[mongodb-manual.reference--operator--query-geospatial] -file_filter = locale//LC_MESSAGES/reference/operator/query-geospatial.po -source_file = locale/pot/reference/operator/query-geospatial.pot -source_lang = en - -[mongodb-manual.reference--operator--update-bitwise] -file_filter = locale//LC_MESSAGES/reference/operator/update-bitwise.po -source_file = locale/pot/reference/operator/update-bitwise.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation.po -source_file = locale/pot/reference/operator/aggregation.pot -source_lang = en - -[mongodb-manual.reference--operator--update-isolation] -file_filter = locale//LC_MESSAGES/reference/operator/update-isolation.po -source_file = locale/pot/reference/operator/update-isolation.pot -source_lang = en - -[mongodb-manual.reference--operator--query-logical] -file_filter = locale//LC_MESSAGES/reference/operator/query-logical.po -source_file = locale/pot/reference/operator/query-logical.pot -source_lang = en - -[mongodb-manual.reference--operator--query-evaluation] -file_filter = locale//LC_MESSAGES/reference/operator/query-evaluation.po -source_file = locale/pot/reference/operator/query-evaluation.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--eq] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/eq.po -source_file = locale/pot/reference/operator/aggregation/eq.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--millisecond] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/millisecond.po -source_file = locale/pot/reference/operator/aggregation/millisecond.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--setDifference] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/setDifference.po -source_file = locale/pot/reference/operator/aggregation/setDifference.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--strcasecmp] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/strcasecmp.po -source_file = locale/pot/reference/operator/aggregation/strcasecmp.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--multiply] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/multiply.po -source_file = locale/pot/reference/operator/aggregation/multiply.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--or] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/or.po -source_file = locale/pot/reference/operator/aggregation/or.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--sort] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/sort.po -source_file = locale/pot/reference/operator/aggregation/sort.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--substr] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/substr.po -source_file = locale/pot/reference/operator/aggregation/substr.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--allElementsTrue] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/allElementsTrue.po -source_file = locale/pot/reference/operator/aggregation/allElementsTrue.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--literal] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/literal.po -source_file = locale/pot/reference/operator/aggregation/literal.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--group] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/group.po -source_file = locale/pot/reference/operator/aggregation/group.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--project] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/project.po -source_file = locale/pot/reference/operator/aggregation/project.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--match] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/match.po -source_file = locale/pot/reference/operator/aggregation/match.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--sum] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/sum.po -source_file = locale/pot/reference/operator/aggregation/sum.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--divide] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/divide.po -source_file = locale/pot/reference/operator/aggregation/divide.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--minute] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/minute.po -source_file = locale/pot/reference/operator/aggregation/minute.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--year] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/year.po -source_file = locale/pot/reference/operator/aggregation/year.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--week] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/week.po -source_file = locale/pot/reference/operator/aggregation/week.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--let] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/let.po -source_file = locale/pot/reference/operator/aggregation/let.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--geoNear] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/geoNear.po -source_file = locale/pot/reference/operator/aggregation/geoNear.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--dayOfWeek] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/dayOfWeek.po -source_file = locale/pot/reference/operator/aggregation/dayOfWeek.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--dayOfMonth] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/dayOfMonth.po -source_file = locale/pot/reference/operator/aggregation/dayOfMonth.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--setIntersection] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/setIntersection.po -source_file = locale/pot/reference/operator/aggregation/setIntersection.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--avg] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/avg.po -source_file = locale/pot/reference/operator/aggregation/avg.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--last] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/last.po -source_file = locale/pot/reference/operator/aggregation/last.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--hour] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/hour.po -source_file = locale/pot/reference/operator/aggregation/hour.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--push] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/push.po -source_file = locale/pot/reference/operator/aggregation/push.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--add] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/add.po -source_file = locale/pot/reference/operator/aggregation/add.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--cond] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/cond.po -source_file = locale/pot/reference/operator/aggregation/cond.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--addToSet] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/addToSet.po -source_file = locale/pot/reference/operator/aggregation/addToSet.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--skip] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/skip.po -source_file = locale/pot/reference/operator/aggregation/skip.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--month] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/month.po -source_file = locale/pot/reference/operator/aggregation/month.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--limit] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/limit.po -source_file = locale/pot/reference/operator/aggregation/limit.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--interface] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/interface.po -source_file = locale/pot/reference/operator/aggregation/interface.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--setIsSubset] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/setIsSubset.po -source_file = locale/pot/reference/operator/aggregation/setIsSubset.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--ifNull] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/ifNull.po -source_file = locale/pot/reference/operator/aggregation/ifNull.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--max] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/max.po -source_file = locale/pot/reference/operator/aggregation/max.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--dayOfYear] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/dayOfYear.po -source_file = locale/pot/reference/operator/aggregation/dayOfYear.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--anyElementTrue] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/anyElementTrue.po -source_file = locale/pot/reference/operator/aggregation/anyElementTrue.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--gt] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/gt.po -source_file = locale/pot/reference/operator/aggregation/gt.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--concat] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/concat.po -source_file = locale/pot/reference/operator/aggregation/concat.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--second] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/second.po -source_file = locale/pot/reference/operator/aggregation/second.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--out] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/out.po -source_file = locale/pot/reference/operator/aggregation/out.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--mod] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/mod.po -source_file = locale/pot/reference/operator/aggregation/mod.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--map] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/map.po -source_file = locale/pot/reference/operator/aggregation/map.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--ne] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/ne.po -source_file = locale/pot/reference/operator/aggregation/ne.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--unwind] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/unwind.po -source_file = locale/pot/reference/operator/aggregation/unwind.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--lt] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/lt.po -source_file = locale/pot/reference/operator/aggregation/lt.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--cmp] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/cmp.po -source_file = locale/pot/reference/operator/aggregation/cmp.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--gte] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/gte.po -source_file = locale/pot/reference/operator/aggregation/gte.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--redact] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/redact.po -source_file = locale/pot/reference/operator/aggregation/redact.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--toLower] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/toLower.po -source_file = locale/pot/reference/operator/aggregation/toLower.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--and] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/and.po -source_file = locale/pot/reference/operator/aggregation/and.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--first] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/first.po -source_file = locale/pot/reference/operator/aggregation/first.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--size] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/size.po -source_file = locale/pot/reference/operator/aggregation/size.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--lte] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/lte.po -source_file = locale/pot/reference/operator/aggregation/lte.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--not] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/not.po -source_file = locale/pot/reference/operator/aggregation/not.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--subtract] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/subtract.po -source_file = locale/pot/reference/operator/aggregation/subtract.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--min] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/min.po -source_file = locale/pot/reference/operator/aggregation/min.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--setUnion] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/setUnion.po -source_file = locale/pot/reference/operator/aggregation/setUnion.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--setEquals] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/setEquals.po -source_file = locale/pot/reference/operator/aggregation/setEquals.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--toUpper] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/toUpper.po -source_file = locale/pot/reference/operator/aggregation/toUpper.pot -source_lang = en - -[mongodb-manual.reference--operator--update--sort] -file_filter = locale//LC_MESSAGES/reference/operator/update/sort.po -source_file = locale/pot/reference/operator/update/sort.pot -source_lang = en - -[mongodb-manual.reference--operator--update--inc] -file_filter = locale//LC_MESSAGES/reference/operator/update/inc.po -source_file = locale/pot/reference/operator/update/inc.pot -source_lang = en - -[mongodb-manual.reference--operator--update--pop] -file_filter = locale//LC_MESSAGES/reference/operator/update/pop.po -source_file = locale/pot/reference/operator/update/pop.pot -source_lang = en - -[mongodb-manual.reference--operator--update--slice] -file_filter = locale//LC_MESSAGES/reference/operator/update/slice.po -source_file = locale/pot/reference/operator/update/slice.pot -source_lang = en - -[mongodb-manual.reference--operator--update--pushAll] -file_filter = locale//LC_MESSAGES/reference/operator/update/pushAll.po -source_file = locale/pot/reference/operator/update/pushAll.pot -source_lang = en - -[mongodb-manual.reference--operator--update--setOnInsert] -file_filter = locale//LC_MESSAGES/reference/operator/update/setOnInsert.po -source_file = locale/pot/reference/operator/update/setOnInsert.pot -source_lang = en - -[mongodb-manual.reference--operator--update--push] -file_filter = locale//LC_MESSAGES/reference/operator/update/push.po -source_file = locale/pot/reference/operator/update/push.pot -source_lang = en - -[mongodb-manual.reference--operator--update--positional] -file_filter = locale//LC_MESSAGES/reference/operator/update/positional.po -source_file = locale/pot/reference/operator/update/positional.pot -source_lang = en - -[mongodb-manual.reference--operator--update--addToSet] -file_filter = locale//LC_MESSAGES/reference/operator/update/addToSet.po -source_file = locale/pot/reference/operator/update/addToSet.pot -source_lang = en - -[mongodb-manual.reference--operator--update--each] -file_filter = locale//LC_MESSAGES/reference/operator/update/each.po -source_file = locale/pot/reference/operator/update/each.pot -source_lang = en - -[mongodb-manual.reference--operator--update--currentDate] -file_filter = locale//LC_MESSAGES/reference/operator/update/currentDate.po -source_file = locale/pot/reference/operator/update/currentDate.pot -source_lang = en - -[mongodb-manual.reference--operator--update--pullAll] -file_filter = locale//LC_MESSAGES/reference/operator/update/pullAll.po -source_file = locale/pot/reference/operator/update/pullAll.pot -source_lang = en - -[mongodb-manual.reference--operator--update--unset] -file_filter = locale//LC_MESSAGES/reference/operator/update/unset.po -source_file = locale/pot/reference/operator/update/unset.pot -source_lang = en - -[mongodb-manual.reference--operator--update--max] -file_filter = locale//LC_MESSAGES/reference/operator/update/max.po -source_file = locale/pot/reference/operator/update/max.pot -source_lang = en - -[mongodb-manual.reference--operator--update--bit] -file_filter = locale//LC_MESSAGES/reference/operator/update/bit.po -source_file = locale/pot/reference/operator/update/bit.pot -source_lang = en - -[mongodb-manual.reference--operator--update--set] -file_filter = locale//LC_MESSAGES/reference/operator/update/set.po -source_file = locale/pot/reference/operator/update/set.pot -source_lang = en - -[mongodb-manual.reference--operator--update--isolated] -file_filter = locale//LC_MESSAGES/reference/operator/update/isolated.po -source_file = locale/pot/reference/operator/update/isolated.pot -source_lang = en - -[mongodb-manual.reference--operator--update--position] -file_filter = locale//LC_MESSAGES/reference/operator/update/position.po -source_file = locale/pot/reference/operator/update/position.pot -source_lang = en - -[mongodb-manual.reference--operator--update--mul] -file_filter = locale//LC_MESSAGES/reference/operator/update/mul.po -source_file = locale/pot/reference/operator/update/mul.pot -source_lang = en - -[mongodb-manual.reference--operator--update--rename] -file_filter = locale//LC_MESSAGES/reference/operator/update/rename.po -source_file = locale/pot/reference/operator/update/rename.pot -source_lang = en - -[mongodb-manual.reference--operator--update--pull] -file_filter = locale//LC_MESSAGES/reference/operator/update/pull.po -source_file = locale/pot/reference/operator/update/pull.pot -source_lang = en - -[mongodb-manual.reference--operator--update--min] -file_filter = locale//LC_MESSAGES/reference/operator/update/min.po -source_file = locale/pot/reference/operator/update/min.pot -source_lang = en - -[mongodb-manual.reference--operator--query--or] -file_filter = locale//LC_MESSAGES/reference/operator/query/or.po -source_file = locale/pot/reference/operator/query/or.pot -source_lang = en - -[mongodb-manual.reference--operator--query--where] -file_filter = locale//LC_MESSAGES/reference/operator/query/where.po -source_file = locale/pot/reference/operator/query/where.pot -source_lang = en - -[mongodb-manual.reference--operator--query--center] -file_filter = locale//LC_MESSAGES/reference/operator/query/center.po -source_file = locale/pot/reference/operator/query/center.pot -source_lang = en - -[mongodb-manual.reference--operator--query--in] -file_filter = locale//LC_MESSAGES/reference/operator/query/in.po -source_file = locale/pot/reference/operator/query/in.pot -source_lang = en - -[mongodb-manual.reference--operator--query--geoIntersects] -file_filter = locale//LC_MESSAGES/reference/operator/query/geoIntersects.po -source_file = locale/pot/reference/operator/query/geoIntersects.pot -source_lang = en - -[mongodb-manual.reference--operator--query--geoWithin] -file_filter = locale//LC_MESSAGES/reference/operator/query/geoWithin.po -source_file = locale/pot/reference/operator/query/geoWithin.pot -source_lang = en - -[mongodb-manual.reference--operator--query--all] -file_filter = locale//LC_MESSAGES/reference/operator/query/all.po -source_file = locale/pot/reference/operator/query/all.pot -source_lang = en - -[mongodb-manual.reference--operator--query--centerSphere] -file_filter = locale//LC_MESSAGES/reference/operator/query/centerSphere.po -source_file = locale/pot/reference/operator/query/centerSphere.pot -source_lang = en - -[mongodb-manual.reference--operator--query--nin] -file_filter = locale//LC_MESSAGES/reference/operator/query/nin.po -source_file = locale/pot/reference/operator/query/nin.pot -source_lang = en - -[mongodb-manual.reference--operator--query--nor] -file_filter = locale//LC_MESSAGES/reference/operator/query/nor.po -source_file = locale/pot/reference/operator/query/nor.pot -source_lang = en - -[mongodb-manual.reference--operator--query--polygon] -file_filter = locale//LC_MESSAGES/reference/operator/query/polygon.po -source_file = locale/pot/reference/operator/query/polygon.pot -source_lang = en - -[mongodb-manual.reference--operator--query--exists] -file_filter = locale//LC_MESSAGES/reference/operator/query/exists.po -source_file = locale/pot/reference/operator/query/exists.pot -source_lang = en - -[mongodb-manual.reference--operator--query--gt] -file_filter = locale//LC_MESSAGES/reference/operator/query/gt.po -source_file = locale/pot/reference/operator/query/gt.pot -source_lang = en - -[mongodb-manual.reference--operator--query--geometry] -file_filter = locale//LC_MESSAGES/reference/operator/query/geometry.po -source_file = locale/pot/reference/operator/query/geometry.pot -source_lang = en - -[mongodb-manual.reference--operator--query--uniqueDocs] -file_filter = locale//LC_MESSAGES/reference/operator/query/uniqueDocs.po -source_file = locale/pot/reference/operator/query/uniqueDocs.pot -source_lang = en - -[mongodb-manual.reference--operator--query--mod] -file_filter = locale//LC_MESSAGES/reference/operator/query/mod.po -source_file = locale/pot/reference/operator/query/mod.pot -source_lang = en - -[mongodb-manual.reference--operator--query--regex] -file_filter = locale//LC_MESSAGES/reference/operator/query/regex.po -source_file = locale/pot/reference/operator/query/regex.pot -source_lang = en - -[mongodb-manual.reference--operator--query--near] -file_filter = locale//LC_MESSAGES/reference/operator/query/near.po -source_file = locale/pot/reference/operator/query/near.pot -source_lang = en - -[mongodb-manual.reference--operator--query--ne] -file_filter = locale//LC_MESSAGES/reference/operator/query/ne.po -source_file = locale/pot/reference/operator/query/ne.pot -source_lang = en - -[mongodb-manual.reference--operator--query--maxDistance] -file_filter = locale//LC_MESSAGES/reference/operator/query/maxDistance.po -source_file = locale/pot/reference/operator/query/maxDistance.pot -source_lang = en - -[mongodb-manual.reference--operator--query--lt] -file_filter = locale//LC_MESSAGES/reference/operator/query/lt.po -source_file = locale/pot/reference/operator/query/lt.pot -source_lang = en - -[mongodb-manual.reference--operator--query--gte] -file_filter = locale//LC_MESSAGES/reference/operator/query/gte.po -source_file = locale/pot/reference/operator/query/gte.pot -source_lang = en - -[mongodb-manual.reference--operator--query--box] -file_filter = locale//LC_MESSAGES/reference/operator/query/box.po -source_file = locale/pot/reference/operator/query/box.pot -source_lang = en - -[mongodb-manual.reference--operator--query--nearSphere] -file_filter = locale//LC_MESSAGES/reference/operator/query/nearSphere.po -source_file = locale/pot/reference/operator/query/nearSphere.pot -source_lang = en - -[mongodb-manual.reference--operator--query--type] -file_filter = locale//LC_MESSAGES/reference/operator/query/type.po -source_file = locale/pot/reference/operator/query/type.pot -source_lang = en - -[mongodb-manual.reference--operator--query--and] -file_filter = locale//LC_MESSAGES/reference/operator/query/and.po -source_file = locale/pot/reference/operator/query/and.pot -source_lang = en - -[mongodb-manual.reference--operator--query--elemMatch] -file_filter = locale//LC_MESSAGES/reference/operator/query/elemMatch.po -source_file = locale/pot/reference/operator/query/elemMatch.pot -source_lang = en - -[mongodb-manual.reference--operator--query--size] -file_filter = locale//LC_MESSAGES/reference/operator/query/size.po -source_file = locale/pot/reference/operator/query/size.pot -source_lang = en - -[mongodb-manual.reference--operator--query--lte] -file_filter = locale//LC_MESSAGES/reference/operator/query/lte.po -source_file = locale/pot/reference/operator/query/lte.pot -source_lang = en - -[mongodb-manual.reference--operator--query--not] -file_filter = locale//LC_MESSAGES/reference/operator/query/not.po -source_file = locale/pot/reference/operator/query/not.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--maxScan] -file_filter = locale//LC_MESSAGES/reference/operator/meta/maxScan.po -source_file = locale/pot/reference/operator/meta/maxScan.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--comment] -file_filter = locale//LC_MESSAGES/reference/operator/meta/comment.po -source_file = locale/pot/reference/operator/meta/comment.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--query] -file_filter = locale//LC_MESSAGES/reference/operator/meta/query.po -source_file = locale/pot/reference/operator/meta/query.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--snapshot] -file_filter = locale//LC_MESSAGES/reference/operator/meta/snapshot.po -source_file = locale/pot/reference/operator/meta/snapshot.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--natural] -file_filter = locale//LC_MESSAGES/reference/operator/meta/natural.po -source_file = locale/pot/reference/operator/meta/natural.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--max] -file_filter = locale//LC_MESSAGES/reference/operator/meta/max.po -source_file = locale/pot/reference/operator/meta/max.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--showDiskLoc] -file_filter = locale//LC_MESSAGES/reference/operator/meta/showDiskLoc.po -source_file = locale/pot/reference/operator/meta/showDiskLoc.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--maxTimeMS] -file_filter = locale//LC_MESSAGES/reference/operator/meta/maxTimeMS.po -source_file = locale/pot/reference/operator/meta/maxTimeMS.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--orderby] -file_filter = locale//LC_MESSAGES/reference/operator/meta/orderby.po -source_file = locale/pot/reference/operator/meta/orderby.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--explain] -file_filter = locale//LC_MESSAGES/reference/operator/meta/explain.po -source_file = locale/pot/reference/operator/meta/explain.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--hint] -file_filter = locale//LC_MESSAGES/reference/operator/meta/hint.po -source_file = locale/pot/reference/operator/meta/hint.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--min] -file_filter = locale//LC_MESSAGES/reference/operator/meta/min.po -source_file = locale/pot/reference/operator/meta/min.pot -source_lang = en - -[mongodb-manual.reference--operator--meta--returnKey] -file_filter = locale//LC_MESSAGES/reference/operator/meta/returnKey.po -source_file = locale/pot/reference/operator/meta/returnKey.pot -source_lang = en - -[mongodb-manual.reference--operator--projection--slice] -file_filter = locale//LC_MESSAGES/reference/operator/projection/slice.po -source_file = locale/pot/reference/operator/projection/slice.pot -source_lang = en - -[mongodb-manual.reference--operator--projection--positional] -file_filter = locale//LC_MESSAGES/reference/operator/projection/positional.po -source_file = locale/pot/reference/operator/projection/positional.pot -source_lang = en - -[mongodb-manual.reference--operator--projection--elemMatch] -file_filter = locale//LC_MESSAGES/reference/operator/projection/elemMatch.po -source_file = locale/pot/reference/operator/projection/elemMatch.pot -source_lang = en - -[mongodb-manual.reference--command--whatsmyuri] -file_filter = locale//LC_MESSAGES/reference/command/whatsmyuri.po -source_file = locale/pot/reference/command/whatsmyuri.pot -source_lang = en - -[mongodb-manual.reference--command--dropDatabase] -file_filter = locale//LC_MESSAGES/reference/command/dropDatabase.po -source_file = locale/pot/reference/command/dropDatabase.pot -source_lang = en - -[mongodb-manual.reference--command--handshake] -file_filter = locale//LC_MESSAGES/reference/command/handshake.po -source_file = locale/pot/reference/command/handshake.pot -source_lang = en - -[mongodb-manual.reference--command--shardingState] -file_filter = locale//LC_MESSAGES/reference/command/shardingState.po -source_file = locale/pot/reference/command/shardingState.pot -source_lang = en - -[mongodb-manual.reference--command--getnonce] -file_filter = locale//LC_MESSAGES/reference/command/getnonce.po -source_file = locale/pot/reference/command/getnonce.pot -source_lang = en - -[mongodb-manual.reference--command--sleep] -file_filter = locale//LC_MESSAGES/reference/command/sleep.po -source_file = locale/pot/reference/command/sleep.pot -source_lang = en - -[mongodb-manual.reference--command--logApplicationMessage] -file_filter = locale//LC_MESSAGES/reference/command/logApplicationMessage.po -source_file = locale/pot/reference/command/logApplicationMessage.pot -source_lang = en - -[mongodb-manual.reference--command--eval] -file_filter = locale//LC_MESSAGES/reference/command/eval.po -source_file = locale/pot/reference/command/eval.pot -source_lang = en - -[mongodb-manual.reference--command--getPrevError] -file_filter = locale//LC_MESSAGES/reference/command/getPrevError.po -source_file = locale/pot/reference/command/getPrevError.pot -source_lang = en - -[mongodb-manual.reference--command--clean] -file_filter = locale//LC_MESSAGES/reference/command/clean.po -source_file = locale/pot/reference/command/clean.pot -source_lang = en - -[mongodb-manual.reference--command--skewClockCommand] -file_filter = locale//LC_MESSAGES/reference/command/skewClockCommand.po -source_file = locale/pot/reference/command/skewClockCommand.pot -source_lang = en - -[mongodb-manual.reference--command--godinsert] -file_filter = locale//LC_MESSAGES/reference/command/godinsert.po -source_file = locale/pot/reference/command/godinsert.pot -source_lang = en - -[mongodb-manual.reference--command--nav-auditing] -file_filter = locale//LC_MESSAGES/reference/command/nav-auditing.po -source_file = locale/pot/reference/command/nav-auditing.pot -source_lang = en - -[mongodb-manual.reference--command--buildInfo] -file_filter = locale//LC_MESSAGES/reference/command/buildInfo.po -source_file = locale/pot/reference/command/buildInfo.pot -source_lang = en - -[mongodb-manual.reference--command--listDatabases] -file_filter = locale//LC_MESSAGES/reference/command/listDatabases.po -source_file = locale/pot/reference/command/listDatabases.pot -source_lang = en - -[mongodb-manual.reference--command--dropAllRolesFromDatabase] -file_filter = locale//LC_MESSAGES/reference/command/dropAllRolesFromDatabase.po -source_file = locale/pot/reference/command/dropAllRolesFromDatabase.pot -source_lang = en - -[mongodb-manual.reference--command--convertToCapped] -file_filter = locale//LC_MESSAGES/reference/command/convertToCapped.po -source_file = locale/pot/reference/command/convertToCapped.pot -source_lang = en - -[mongodb-manual.reference--command--mapReduce] -file_filter = locale//LC_MESSAGES/reference/command/mapReduce.po -source_file = locale/pot/reference/command/mapReduce.pot -source_lang = en - -[mongodb-manual.reference--command--authenticate] -file_filter = locale//LC_MESSAGES/reference/command/authenticate.po -source_file = locale/pot/reference/command/authenticate.pot -source_lang = en - -[mongodb-manual.reference--command--group] -file_filter = locale//LC_MESSAGES/reference/command/group.po -source_file = locale/pot/reference/command/group.pot -source_lang = en - -[mongodb-manual.reference--command--nav-crud] -file_filter = locale//LC_MESSAGES/reference/command/nav-crud.po -source_file = locale/pot/reference/command/nav-crud.pot -source_lang = en - -[mongodb-manual.reference--command--medianKey] -file_filter = locale//LC_MESSAGES/reference/command/medianKey.po -source_file = locale/pot/reference/command/medianKey.pot -source_lang = en - -[mongodb-manual.reference--command--replSetFreeze] -file_filter = locale//LC_MESSAGES/reference/command/replSetFreeze.po -source_file = locale/pot/reference/command/replSetFreeze.pot -source_lang = en - -[mongodb-manual.reference--command--listCommands] -file_filter = locale//LC_MESSAGES/reference/command/listCommands.po -source_file = locale/pot/reference/command/listCommands.pot -source_lang = en - -[mongodb-manual.reference--command--nav-diagnostic] -file_filter = locale//LC_MESSAGES/reference/command/nav-diagnostic.po -source_file = locale/pot/reference/command/nav-diagnostic.pot -source_lang = en - -[mongodb-manual.reference--command--grantRolesToRole] -file_filter = locale//LC_MESSAGES/reference/command/grantRolesToRole.po -source_file = locale/pot/reference/command/grantRolesToRole.pot -source_lang = en - -[mongodb-manual.reference--command--updateRole] -file_filter = locale//LC_MESSAGES/reference/command/updateRole.po -source_file = locale/pot/reference/command/updateRole.pot -source_lang = en - -[mongodb-manual.reference--command--cleanupOrphaned] -file_filter = locale//LC_MESSAGES/reference/command/cleanupOrphaned.po -source_file = locale/pot/reference/command/cleanupOrphaned.pot -source_lang = en - -[mongodb-manual.reference--command--getParameter] -file_filter = locale//LC_MESSAGES/reference/command/getParameter.po -source_file = locale/pot/reference/command/getParameter.pot -source_lang = en - -[mongodb-manual.reference--command--nav-administration] -file_filter = locale//LC_MESSAGES/reference/command/nav-administration.po -source_file = locale/pot/reference/command/nav-administration.pot -source_lang = en - -[mongodb-manual.reference--command--revokeRolesFromRole] -file_filter = locale//LC_MESSAGES/reference/command/revokeRolesFromRole.po -source_file = locale/pot/reference/command/revokeRolesFromRole.pot -source_lang = en - -[mongodb-manual.reference--command--nav-sharding] -file_filter = locale//LC_MESSAGES/reference/command/nav-sharding.po -source_file = locale/pot/reference/command/nav-sharding.pot -source_lang = en - -[mongodb-manual.reference--command--testDistLockWithSyncCluster] -file_filter = locale//LC_MESSAGES/reference/command/testDistLockWithSyncCluster.po -source_file = locale/pot/reference/command/testDistLockWithSyncCluster.pot -source_lang = en - -[mongodb-manual.reference--command--recvChunkStatus] -file_filter = locale//LC_MESSAGES/reference/command/recvChunkStatus.po -source_file = locale/pot/reference/command/recvChunkStatus.pot -source_lang = en - -[mongodb-manual.reference--command--createUser] -file_filter = locale//LC_MESSAGES/reference/command/createUser.po -source_file = locale/pot/reference/command/createUser.pot -source_lang = en - -[mongodb-manual.reference--command--top] -file_filter = locale//LC_MESSAGES/reference/command/top.po -source_file = locale/pot/reference/command/top.pot -source_lang = en - -[mongodb-manual.reference--command--dbHash] -file_filter = locale//LC_MESSAGES/reference/command/dbHash.po -source_file = locale/pot/reference/command/dbHash.pot -source_lang = en - -[mongodb-manual.reference--command--mapreduce_shardedfinish] -file_filter = locale//LC_MESSAGES/reference/command/mapreduce.shardedfinish.po -source_file = locale/pot/reference/command/mapreduce.shardedfinish.pot -source_lang = en - -[mongodb-manual.reference--command--updateUser] -file_filter = locale//LC_MESSAGES/reference/command/updateUser.po -source_file = locale/pot/reference/command/updateUser.pot -source_lang = en - -[mongodb-manual.reference--command--configureFailPoint] -file_filter = locale//LC_MESSAGES/reference/command/configureFailPoint.po -source_file = locale/pot/reference/command/configureFailPoint.pot -source_lang = en - -[mongodb-manual.reference--command--nav-authentication] -file_filter = locale//LC_MESSAGES/reference/command/nav-authentication.po -source_file = locale/pot/reference/command/nav-authentication.pot -source_lang = en - -[mongodb-manual.reference--command--features] -file_filter = locale//LC_MESSAGES/reference/command/features.po -source_file = locale/pot/reference/command/features.pot -source_lang = en - -[mongodb-manual.reference--command--geoNear] -file_filter = locale//LC_MESSAGES/reference/command/geoNear.po -source_file = locale/pot/reference/command/geoNear.pot -source_lang = en - -[mongodb-manual.reference--command--repairDatabase] -file_filter = locale//LC_MESSAGES/reference/command/repairDatabase.po -source_file = locale/pot/reference/command/repairDatabase.pot -source_lang = en - -[mongodb-manual.reference--command--replSetHeartbeat] -file_filter = locale//LC_MESSAGES/reference/command/replSetHeartbeat.po -source_file = locale/pot/reference/command/replSetHeartbeat.pot -source_lang = en - -[mongodb-manual.reference--command--resetError] -file_filter = locale//LC_MESSAGES/reference/command/resetError.po -source_file = locale/pot/reference/command/resetError.pot -source_lang = en - -[mongodb-manual.reference--command--split] -file_filter = locale//LC_MESSAGES/reference/command/split.po -source_file = locale/pot/reference/command/split.pot -source_lang = en - -[mongodb-manual.reference--command--shardCollection] -file_filter = locale//LC_MESSAGES/reference/command/shardCollection.po -source_file = locale/pot/reference/command/shardCollection.pot -source_lang = en - -[mongodb-manual.reference--command--writeBacksQueued] -file_filter = locale//LC_MESSAGES/reference/command/writeBacksQueued.po -source_file = locale/pot/reference/command/writeBacksQueued.pot -source_lang = en - -[mongodb-manual.reference--command--profile] -file_filter = locale//LC_MESSAGES/reference/command/profile.po -source_file = locale/pot/reference/command/profile.pot -source_lang = en - -[mongodb-manual.reference--command--journalLatencyTest] -file_filter = locale//LC_MESSAGES/reference/command/journalLatencyTest.po -source_file = locale/pot/reference/command/journalLatencyTest.pot -source_lang = en - -[mongodb-manual.reference--command--resync] -file_filter = locale//LC_MESSAGES/reference/command/resync.po -source_file = locale/pot/reference/command/resync.pot -source_lang = en - -[mongodb-manual.reference--command--indexStats] -file_filter = locale//LC_MESSAGES/reference/command/indexStats.po -source_file = locale/pot/reference/command/indexStats.pot -source_lang = en - -[mongodb-manual.reference--command--replSetReconfig] -file_filter = locale//LC_MESSAGES/reference/command/replSetReconfig.po -source_file = locale/pot/reference/command/replSetReconfig.pot -source_lang = en - -[mongodb-manual.reference--command--availableQueryOptions] -file_filter = locale//LC_MESSAGES/reference/command/availableQueryOptions.po -source_file = locale/pot/reference/command/availableQueryOptions.pot -source_lang = en - -[mongodb-manual.reference--command--recvChunkStart] -file_filter = locale//LC_MESSAGES/reference/command/recvChunkStart.po -source_file = locale/pot/reference/command/recvChunkStart.pot -source_lang = en - -[mongodb-manual.reference--command--validate] -file_filter = locale//LC_MESSAGES/reference/command/validate.po -source_file = locale/pot/reference/command/validate.pot -source_lang = en - -[mongodb-manual.reference--command--writebacklisten] -file_filter = locale//LC_MESSAGES/reference/command/writebacklisten.po -source_file = locale/pot/reference/command/writebacklisten.pot -source_lang = en - -[mongodb-manual.reference--command--update] -file_filter = locale//LC_MESSAGES/reference/command/update.po -source_file = locale/pot/reference/command/update.pot -source_lang = en - -[mongodb-manual.reference--command--connPoolStats] -file_filter = locale//LC_MESSAGES/reference/command/connPoolStats.po -source_file = locale/pot/reference/command/connPoolStats.pot -source_lang = en - -[mongodb-manual.reference--command--touch] -file_filter = locale//LC_MESSAGES/reference/command/touch.po -source_file = locale/pot/reference/command/touch.pot -source_lang = en - -[mongodb-manual.reference--command--isSelf] -file_filter = locale//LC_MESSAGES/reference/command/isSelf.po -source_file = locale/pot/reference/command/isSelf.pot -source_lang = en - -[mongodb-manual.reference--command--removeShard] -file_filter = locale//LC_MESSAGES/reference/command/removeShard.po -source_file = locale/pot/reference/command/removeShard.pot -source_lang = en - -[mongodb-manual.reference--command--copydb] -file_filter = locale//LC_MESSAGES/reference/command/copydb.po -source_file = locale/pot/reference/command/copydb.pot -source_lang = en - -[mongodb-manual.reference--command--getoptime] -file_filter = locale//LC_MESSAGES/reference/command/getoptime.po -source_file = locale/pot/reference/command/getoptime.pot -source_lang = en - -[mongodb-manual.reference--command--cloneCollectionAsCapped] -file_filter = locale//LC_MESSAGES/reference/command/cloneCollectionAsCapped.po -source_file = locale/pot/reference/command/cloneCollectionAsCapped.pot -source_lang = en - -[mongodb-manual.reference--command--cloneCollection] -file_filter = locale//LC_MESSAGES/reference/command/cloneCollection.po -source_file = locale/pot/reference/command/cloneCollection.pot -source_lang = en - -[mongodb-manual.reference--command--replSetSyncFrom] -file_filter = locale//LC_MESSAGES/reference/command/replSetSyncFrom.po -source_file = locale/pot/reference/command/replSetSyncFrom.pot -source_lang = en - -[mongodb-manual.reference--command--replSetStepDown] -file_filter = locale//LC_MESSAGES/reference/command/replSetStepDown.po -source_file = locale/pot/reference/command/replSetStepDown.pot -source_lang = en - -[mongodb-manual.reference--command--revokeRolesFromUser] -file_filter = locale//LC_MESSAGES/reference/command/revokeRolesFromUser.po -source_file = locale/pot/reference/command/revokeRolesFromUser.pot -source_lang = en - -[mongodb-manual.reference--command--forceerror] -file_filter = locale//LC_MESSAGES/reference/command/forceerror.po -source_file = locale/pot/reference/command/forceerror.pot -source_lang = en - -[mongodb-manual.reference--command--setShardVersion] -file_filter = locale//LC_MESSAGES/reference/command/setShardVersion.po -source_file = locale/pot/reference/command/setShardVersion.pot -source_lang = en - -[mongodb-manual.reference--command--geoWalk] -file_filter = locale//LC_MESSAGES/reference/command/geoWalk.po -source_file = locale/pot/reference/command/geoWalk.pot -source_lang = en - -[mongodb-manual.reference--command--rolesInfo] -file_filter = locale//LC_MESSAGES/reference/command/rolesInfo.po -source_file = locale/pot/reference/command/rolesInfo.pot -source_lang = en - -[mongodb-manual.reference--command--mergeChunks] -file_filter = locale//LC_MESSAGES/reference/command/mergeChunks.po -source_file = locale/pot/reference/command/mergeChunks.pot -source_lang = en - -[mongodb-manual.reference--command--aggregate] -file_filter = locale//LC_MESSAGES/reference/command/aggregate.po -source_file = locale/pot/reference/command/aggregate.pot -source_lang = en - -[mongodb-manual.reference--command--usersInfo] -file_filter = locale//LC_MESSAGES/reference/command/usersInfo.po -source_file = locale/pot/reference/command/usersInfo.pot -source_lang = en - -[mongodb-manual.reference--command--splitVector] -file_filter = locale//LC_MESSAGES/reference/command/splitVector.po -source_file = locale/pot/reference/command/splitVector.pot -source_lang = en - -[mongodb-manual.reference--command--nav-replication] -file_filter = locale//LC_MESSAGES/reference/command/nav-replication.po -source_file = locale/pot/reference/command/nav-replication.pot -source_lang = en - -[mongodb-manual.reference--command--transferMods] -file_filter = locale//LC_MESSAGES/reference/command/transferMods.po -source_file = locale/pot/reference/command/transferMods.pot -source_lang = en - -[mongodb-manual.reference--command--replSetElect] -file_filter = locale//LC_MESSAGES/reference/command/replSetElect.po -source_file = locale/pot/reference/command/replSetElect.pot -source_lang = en - -[mongodb-manual.reference--command--isMaster] -file_filter = locale//LC_MESSAGES/reference/command/isMaster.po -source_file = locale/pot/reference/command/isMaster.pot -source_lang = en - -[mongodb-manual.reference--command--grantRolesToUser] -file_filter = locale//LC_MESSAGES/reference/command/grantRolesToUser.po -source_file = locale/pot/reference/command/grantRolesToUser.pot -source_lang = en - -[mongodb-manual.reference--command--clone] -file_filter = locale//LC_MESSAGES/reference/command/clone.po -source_file = locale/pot/reference/command/clone.pot -source_lang = en - -[mongodb-manual.reference--command--dataSize] -file_filter = locale//LC_MESSAGES/reference/command/dataSize.po -source_file = locale/pot/reference/command/dataSize.pot -source_lang = en - -[mongodb-manual.reference--command--text] -file_filter = locale//LC_MESSAGES/reference/command/text.po -source_file = locale/pot/reference/command/text.pot -source_lang = en - -[mongodb-manual.reference--command--getLog] -file_filter = locale//LC_MESSAGES/reference/command/getLog.po -source_file = locale/pot/reference/command/getLog.pot -source_lang = en - -[mongodb-manual.reference--command--getCmdLineOpts] -file_filter = locale//LC_MESSAGES/reference/command/getCmdLineOpts.po -source_file = locale/pot/reference/command/getCmdLineOpts.pot -source_lang = en - -[mongodb-manual.reference--command--nav-role-management] -file_filter = locale//LC_MESSAGES/reference/command/nav-role-management.po -source_file = locale/pot/reference/command/nav-role-management.pot -source_lang = en - -[mongodb-manual.reference--command--nav-aggregation] -file_filter = locale//LC_MESSAGES/reference/command/nav-aggregation.po -source_file = locale/pot/reference/command/nav-aggregation.pot -source_lang = en - -[mongodb-manual.reference--command--diagLogging] -file_filter = locale//LC_MESSAGES/reference/command/diagLogging.po -source_file = locale/pot/reference/command/diagLogging.pot -source_lang = en - -[mongodb-manual.reference--command--enableSharding] -file_filter = locale//LC_MESSAGES/reference/command/enableSharding.po -source_file = locale/pot/reference/command/enableSharding.pot -source_lang = en - -[mongodb-manual.reference--command--serverStatus] -file_filter = locale//LC_MESSAGES/reference/command/serverStatus.po -source_file = locale/pot/reference/command/serverStatus.pot -source_lang = en - -[mongodb-manual.reference--command--replSetInitiate] -file_filter = locale//LC_MESSAGES/reference/command/replSetInitiate.po -source_file = locale/pot/reference/command/replSetInitiate.pot -source_lang = en - -[mongodb-manual.reference--command--flushRouterConfig] -file_filter = locale//LC_MESSAGES/reference/command/flushRouterConfig.po -source_file = locale/pot/reference/command/flushRouterConfig.pot -source_lang = en - -[mongodb-manual.reference--command--nav-geospatial] -file_filter = locale//LC_MESSAGES/reference/command/nav-geospatial.po -source_file = locale/pot/reference/command/nav-geospatial.pot -source_lang = en - -[mongodb-manual.reference--command--copydbgetnonce] -file_filter = locale//LC_MESSAGES/reference/command/copydbgetnonce.po -source_file = locale/pot/reference/command/copydbgetnonce.pot -source_lang = en - -[mongodb-manual.reference--command--listShards] -file_filter = locale//LC_MESSAGES/reference/command/listShards.po -source_file = locale/pot/reference/command/listShards.pot -source_lang = en - -[mongodb-manual.reference--command--dbStats] -file_filter = locale//LC_MESSAGES/reference/command/dbStats.po -source_file = locale/pot/reference/command/dbStats.pot -source_lang = en - -[mongodb-manual.reference--command--recvChunkAbort] -file_filter = locale//LC_MESSAGES/reference/command/recvChunkAbort.po -source_file = locale/pot/reference/command/recvChunkAbort.pot -source_lang = en - -[mongodb-manual.reference--command--count] -file_filter = locale//LC_MESSAGES/reference/command/count.po -source_file = locale/pot/reference/command/count.pot -source_lang = en - -[mongodb-manual.reference--command--emptycapped] -file_filter = locale//LC_MESSAGES/reference/command/emptycapped.po -source_file = locale/pot/reference/command/emptycapped.pot -source_lang = en - -[mongodb-manual.reference--command--grantPrivilegesToRole] -file_filter = locale//LC_MESSAGES/reference/command/grantPrivilegesToRole.po -source_file = locale/pot/reference/command/grantPrivilegesToRole.pot -source_lang = en - -[mongodb-manual.reference--command--dropRole] -file_filter = locale//LC_MESSAGES/reference/command/dropRole.po -source_file = locale/pot/reference/command/dropRole.pot -source_lang = en - -[mongodb-manual.reference--command--unsetSharding] -file_filter = locale//LC_MESSAGES/reference/command/unsetSharding.po -source_file = locale/pot/reference/command/unsetSharding.pot -source_lang = en - -[mongodb-manual.reference--command--dropUser] -file_filter = locale//LC_MESSAGES/reference/command/dropUser.po -source_file = locale/pot/reference/command/dropUser.pot -source_lang = en - -[mongodb-manual.reference--command--reIndex] -file_filter = locale//LC_MESSAGES/reference/command/reIndex.po -source_file = locale/pot/reference/command/reIndex.pot -source_lang = en - -[mongodb-manual.reference--command--connPoolSync] -file_filter = locale//LC_MESSAGES/reference/command/connPoolSync.po -source_file = locale/pot/reference/command/connPoolSync.pot -source_lang = en - -[mongodb-manual.reference--command--splitChunk] -file_filter = locale//LC_MESSAGES/reference/command/splitChunk.po -source_file = locale/pot/reference/command/splitChunk.pot -source_lang = en - -[mongodb-manual.reference--command--dropIndexes] -file_filter = locale//LC_MESSAGES/reference/command/dropIndexes.po -source_file = locale/pot/reference/command/dropIndexes.pot -source_lang = en - -[mongodb-manual.reference--command--findAndModify] -file_filter = locale//LC_MESSAGES/reference/command/findAndModify.po -source_file = locale/pot/reference/command/findAndModify.pot -source_lang = en - -[mongodb-manual.reference--command--getLastError] -file_filter = locale//LC_MESSAGES/reference/command/getLastError.po -source_file = locale/pot/reference/command/getLastError.pot -source_lang = en - -[mongodb-manual.reference--command--testDistLockWithSkew] -file_filter = locale//LC_MESSAGES/reference/command/testDistLockWithSkew.po -source_file = locale/pot/reference/command/testDistLockWithSkew.pot -source_lang = en - -[mongodb-manual.reference--command--setParameter] -file_filter = locale//LC_MESSAGES/reference/command/setParameter.po -source_file = locale/pot/reference/command/setParameter.pot -source_lang = en - -[mongodb-manual.reference--command--drop] -file_filter = locale//LC_MESSAGES/reference/command/drop.po -source_file = locale/pot/reference/command/drop.pot -source_lang = en - -[mongodb-manual.reference--command--replSetMaintenance] -file_filter = locale//LC_MESSAGES/reference/command/replSetMaintenance.po -source_file = locale/pot/reference/command/replSetMaintenance.pot -source_lang = en - -[mongodb-manual.reference--command--replSetGetStatus] -file_filter = locale//LC_MESSAGES/reference/command/replSetGetStatus.po -source_file = locale/pot/reference/command/replSetGetStatus.pot -source_lang = en - -[mongodb-manual.reference--command--dropAllUsersFromDatabase] -file_filter = locale//LC_MESSAGES/reference/command/dropAllUsersFromDatabase.po -source_file = locale/pot/reference/command/dropAllUsersFromDatabase.pot -source_lang = en - -[mongodb-manual.reference--command--isdbgrid] -file_filter = locale//LC_MESSAGES/reference/command/isdbgrid.po -source_file = locale/pot/reference/command/isdbgrid.pot -source_lang = en - -[mongodb-manual.reference--command--nav-testing] -file_filter = locale//LC_MESSAGES/reference/command/nav-testing.po -source_file = locale/pot/reference/command/nav-testing.pot -source_lang = en - -[mongodb-manual.reference--command--hashBSONElement] -file_filter = locale//LC_MESSAGES/reference/command/hashBSONElement.po -source_file = locale/pot/reference/command/hashBSONElement.pot -source_lang = en - -[mongodb-manual.reference--command--checkShardingIndex] -file_filter = locale//LC_MESSAGES/reference/command/checkShardingIndex.po -source_file = locale/pot/reference/command/checkShardingIndex.pot -source_lang = en - -[mongodb-manual.reference--command--insert] -file_filter = locale//LC_MESSAGES/reference/command/insert.po -source_file = locale/pot/reference/command/insert.pot -source_lang = en - -[mongodb-manual.reference--command--nav-user-management] -file_filter = locale//LC_MESSAGES/reference/command/nav-user-management.po -source_file = locale/pot/reference/command/nav-user-management.pot -source_lang = en - -[mongodb-manual.reference--command--filemd5] -file_filter = locale//LC_MESSAGES/reference/command/filemd5.po -source_file = locale/pot/reference/command/filemd5.pot -source_lang = en - -[mongodb-manual.reference--command--createRole] -file_filter = locale//LC_MESSAGES/reference/command/createRole.po -source_file = locale/pot/reference/command/createRole.pot -source_lang = en - -[mongodb-manual.reference--command--nav-internal] -file_filter = locale//LC_MESSAGES/reference/command/nav-internal.po -source_file = locale/pot/reference/command/nav-internal.pot -source_lang = en - -[mongodb-manual.reference--command--collStats] -file_filter = locale//LC_MESSAGES/reference/command/collStats.po -source_file = locale/pot/reference/command/collStats.pot -source_lang = en - -[mongodb-manual.reference--command--logRotate] -file_filter = locale//LC_MESSAGES/reference/command/logRotate.po -source_file = locale/pot/reference/command/logRotate.pot -source_lang = en - -[mongodb-manual.reference--command--collMod] -file_filter = locale//LC_MESSAGES/reference/command/collMod.po -source_file = locale/pot/reference/command/collMod.pot -source_lang = en - -[mongodb-manual.reference--command--hostInfo] -file_filter = locale//LC_MESSAGES/reference/command/hostInfo.po -source_file = locale/pot/reference/command/hostInfo.pot -source_lang = en - -[mongodb-manual.reference--command--shutdown] -file_filter = locale//LC_MESSAGES/reference/command/shutdown.po -source_file = locale/pot/reference/command/shutdown.pot -source_lang = en - -[mongodb-manual.reference--command--logout] -file_filter = locale//LC_MESSAGES/reference/command/logout.po -source_file = locale/pot/reference/command/logout.pot -source_lang = en - -[mongodb-manual.reference--command--fsync] -file_filter = locale//LC_MESSAGES/reference/command/fsync.po -source_file = locale/pot/reference/command/fsync.pot -source_lang = en - -[mongodb-manual.reference--command--geoSearch] -file_filter = locale//LC_MESSAGES/reference/command/geoSearch.po -source_file = locale/pot/reference/command/geoSearch.pot -source_lang = en - -[mongodb-manual.reference--command--closeAllDatabases] -file_filter = locale//LC_MESSAGES/reference/command/closeAllDatabases.po -source_file = locale/pot/reference/command/closeAllDatabases.pot -source_lang = en - -[mongodb-manual.reference--command--replSetFresh] -file_filter = locale//LC_MESSAGES/reference/command/replSetFresh.po -source_file = locale/pot/reference/command/replSetFresh.pot -source_lang = en - -[mongodb-manual.reference--command--replSetTest] -file_filter = locale//LC_MESSAGES/reference/command/replSetTest.po -source_file = locale/pot/reference/command/replSetTest.pot -source_lang = en - -[mongodb-manual.reference--command--getShardVersion] -file_filter = locale//LC_MESSAGES/reference/command/getShardVersion.po -source_file = locale/pot/reference/command/getShardVersion.pot -source_lang = en - -[mongodb-manual.reference--command--applyOps] -file_filter = locale//LC_MESSAGES/reference/command/applyOps.po -source_file = locale/pot/reference/command/applyOps.pot -source_lang = en - -[mongodb-manual.reference--command--recvChunkCommit] -file_filter = locale//LC_MESSAGES/reference/command/recvChunkCommit.po -source_file = locale/pot/reference/command/recvChunkCommit.pot -source_lang = en - -[mongodb-manual.reference--command--cursorInfo] -file_filter = locale//LC_MESSAGES/reference/command/cursorInfo.po -source_file = locale/pot/reference/command/cursorInfo.pot -source_lang = en - -[mongodb-manual.reference--command--captrunc] -file_filter = locale//LC_MESSAGES/reference/command/captrunc.po -source_file = locale/pot/reference/command/captrunc.pot -source_lang = en - -[mongodb-manual.reference--command--moveChunk] -file_filter = locale//LC_MESSAGES/reference/command/moveChunk.po -source_file = locale/pot/reference/command/moveChunk.pot -source_lang = en - -[mongodb-manual.reference--command--revokePrivilegesFromRole] -file_filter = locale//LC_MESSAGES/reference/command/revokePrivilegesFromRole.po -source_file = locale/pot/reference/command/revokePrivilegesFromRole.pot -source_lang = en - -[mongodb-manual.reference--command--distinct] -file_filter = locale//LC_MESSAGES/reference/command/distinct.po -source_file = locale/pot/reference/command/distinct.pot -source_lang = en - -[mongodb-manual.reference--command--driverOIDTest] -file_filter = locale//LC_MESSAGES/reference/command/driverOIDTest.po -source_file = locale/pot/reference/command/driverOIDTest.pot -source_lang = en - -[mongodb-manual.reference--command--netstat] -file_filter = locale//LC_MESSAGES/reference/command/netstat.po -source_file = locale/pot/reference/command/netstat.pot -source_lang = en - -[mongodb-manual.reference--command--getShardMap] -file_filter = locale//LC_MESSAGES/reference/command/getShardMap.po -source_file = locale/pot/reference/command/getShardMap.pot -source_lang = en - -[mongodb-manual.reference--command--ping] -file_filter = locale//LC_MESSAGES/reference/command/ping.po -source_file = locale/pot/reference/command/ping.pot -source_lang = en - -[mongodb-manual.reference--command--addShard] -file_filter = locale//LC_MESSAGES/reference/command/addShard.po -source_file = locale/pot/reference/command/addShard.pot -source_lang = en - -[mongodb-manual.reference--command--movePrimary] -file_filter = locale//LC_MESSAGES/reference/command/movePrimary.po -source_file = locale/pot/reference/command/movePrimary.pot -source_lang = en - -[mongodb-manual.reference--command--migrateClone] -file_filter = locale//LC_MESSAGES/reference/command/migrateClone.po -source_file = locale/pot/reference/command/migrateClone.pot -source_lang = en - -[mongodb-manual.reference--command--replSetGetRBID] -file_filter = locale//LC_MESSAGES/reference/command/replSetGetRBID.po -source_file = locale/pot/reference/command/replSetGetRBID.pot -source_lang = en - -[mongodb-manual.reference--command--renameCollection] -file_filter = locale//LC_MESSAGES/reference/command/renameCollection.po -source_file = locale/pot/reference/command/renameCollection.pot -source_lang = en - -[mongodb-manual.reference--command--delete] -file_filter = locale//LC_MESSAGES/reference/command/delete.po -source_file = locale/pot/reference/command/delete.pot -source_lang = en - -[mongodb-manual.reference--command--create] -file_filter = locale//LC_MESSAGES/reference/command/create.po -source_file = locale/pot/reference/command/create.pot -source_lang = en - -[mongodb-manual.reference--command--compact] -file_filter = locale//LC_MESSAGES/reference/command/compact.po -source_file = locale/pot/reference/command/compact.pot -source_lang = en - -[mongodb-manual.reference--program--mongod] -file_filter = locale//LC_MESSAGES/reference/program/mongod.po -source_file = locale/pot/reference/program/mongod.pot -source_lang = en - -[mongodb-manual.reference--program--mongofiles] -file_filter = locale//LC_MESSAGES/reference/program/mongofiles.po -source_file = locale/pot/reference/program/mongofiles.pot -source_lang = en - -[mongodb-manual.reference--program--mongoimport] -file_filter = locale//LC_MESSAGES/reference/program/mongoimport.po -source_file = locale/pot/reference/program/mongoimport.pot -source_lang = en - -[mongodb-manual.reference--program--bsondump] -file_filter = locale//LC_MESSAGES/reference/program/bsondump.po -source_file = locale/pot/reference/program/bsondump.pot -source_lang = en - -[mongodb-manual.reference--program--mongod_exe] -file_filter = locale//LC_MESSAGES/reference/program/mongod.exe.po -source_file = locale/pot/reference/program/mongod.exe.pot -source_lang = en - -[mongodb-manual.reference--program--mongos_exe] -file_filter = locale//LC_MESSAGES/reference/program/mongos.exe.po -source_file = locale/pot/reference/program/mongos.exe.pot -source_lang = en - -[mongodb-manual.reference--program--mongotop] -file_filter = locale//LC_MESSAGES/reference/program/mongotop.po -source_file = locale/pot/reference/program/mongotop.pot -source_lang = en - -[mongodb-manual.reference--program--mongorestore] -file_filter = locale//LC_MESSAGES/reference/program/mongorestore.po -source_file = locale/pot/reference/program/mongorestore.pot -source_lang = en - -[mongodb-manual.reference--program--mongo] -file_filter = locale//LC_MESSAGES/reference/program/mongo.po -source_file = locale/pot/reference/program/mongo.pot -source_lang = en - -[mongodb-manual.reference--program--mongodump] -file_filter = locale//LC_MESSAGES/reference/program/mongodump.po -source_file = locale/pot/reference/program/mongodump.pot -source_lang = en - -[mongodb-manual.reference--program--mongoexport] -file_filter = locale//LC_MESSAGES/reference/program/mongoexport.po -source_file = locale/pot/reference/program/mongoexport.pot -source_lang = en - -[mongodb-manual.reference--program--mongoperf] -file_filter = locale//LC_MESSAGES/reference/program/mongoperf.po -source_file = locale/pot/reference/program/mongoperf.pot -source_lang = en - -[mongodb-manual.reference--program--mongooplog] -file_filter = locale//LC_MESSAGES/reference/program/mongooplog.po -source_file = locale/pot/reference/program/mongooplog.pot -source_lang = en - -[mongodb-manual.reference--program--mongosniff] -file_filter = locale//LC_MESSAGES/reference/program/mongosniff.po -source_file = locale/pot/reference/program/mongosniff.pot -source_lang = en - -[mongodb-manual.reference--program--mongos] -file_filter = locale//LC_MESSAGES/reference/program/mongos.po -source_file = locale/pot/reference/program/mongos.pot -source_lang = en - -[mongodb-manual.reference--program--mongostat] -file_filter = locale//LC_MESSAGES/reference/program/mongostat.po -source_file = locale/pot/reference/program/mongostat.pot -source_lang = en - -[mongodb-manual.reference--method--hostname] -file_filter = locale//LC_MESSAGES/reference/method/hostname.po -source_file = locale/pot/reference/method/hostname.pot -source_lang = en - -[mongodb-manual.reference--method--stopMongod] -file_filter = locale//LC_MESSAGES/reference/method/stopMongod.po -source_file = locale/pot/reference/method/stopMongod.pot -source_lang = en - -[mongodb-manual.reference--method--db_repairDatabase] -file_filter = locale//LC_MESSAGES/reference/method/db.repairDatabase.po -source_file = locale/pot/reference/method/db.repairDatabase.pot -source_lang = en - -[mongodb-manual.reference--method--sh_isBalancerRunning] -file_filter = locale//LC_MESSAGES/reference/method/sh.isBalancerRunning.po -source_file = locale/pot/reference/method/sh.isBalancerRunning.pot -source_lang = en - -[mongodb-manual.reference--method--pwd] -file_filter = locale//LC_MESSAGES/reference/method/pwd.po -source_file = locale/pot/reference/method/pwd.pot -source_lang = en - -[mongodb-manual.reference--method--db_loadServerScripts] -file_filter = locale//LC_MESSAGES/reference/method/db.loadServerScripts.po -source_file = locale/pot/reference/method/db.loadServerScripts.pot -source_lang = en - -[mongodb-manual.reference--method--stopMongoProgramByPid] -file_filter = locale//LC_MESSAGES/reference/method/stopMongoProgramByPid.po -source_file = locale/pot/reference/method/stopMongoProgramByPid.pot -source_lang = en - -[mongodb-manual.reference--method--waitMongoProgramOnPort] -file_filter = locale//LC_MESSAGES/reference/method/waitMongoProgramOnPort.po -source_file = locale/pot/reference/method/waitMongoProgramOnPort.pot -source_lang = en - -[mongodb-manual.reference--method--srand] -file_filter = locale//LC_MESSAGES/reference/method/srand.po -source_file = locale/pot/reference/method/srand.pot -source_lang = en - -[mongodb-manual.reference--method--sh_waitForBalancer] -file_filter = locale//LC_MESSAGES/reference/method/sh.waitForBalancer.po -source_file = locale/pot/reference/method/sh.waitForBalancer.pot -source_lang = en - -[mongodb-manual.reference--method--ObjectId_getTimestamp] -file_filter = locale//LC_MESSAGES/reference/method/ObjectId.getTimestamp.po -source_file = locale/pot/reference/method/ObjectId.getTimestamp.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_storageSize] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.storageSize.po -source_file = locale/pot/reference/method/db.collection.storageSize.pot -source_lang = en - -[mongodb-manual.reference--method--Mongo_getDB] -file_filter = locale//LC_MESSAGES/reference/method/Mongo.getDB.po -source_file = locale/pot/reference/method/Mongo.getDB.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_snapshot] -file_filter = locale//LC_MESSAGES/reference/method/cursor.snapshot.po -source_file = locale/pot/reference/method/cursor.snapshot.pot -source_lang = en - -[mongodb-manual.reference--method--db_shutdownServer] -file_filter = locale//LC_MESSAGES/reference/method/db.shutdownServer.po -source_file = locale/pot/reference/method/db.shutdownServer.pot -source_lang = en - -[mongodb-manual.reference--method--sh_help] -file_filter = locale//LC_MESSAGES/reference/method/sh.help.po -source_file = locale/pot/reference/method/sh.help.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_dropIndexes] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.dropIndexes.po -source_file = locale/pot/reference/method/db.collection.dropIndexes.pot -source_lang = en - -[mongodb-manual.reference--method--db_cloneCollection] -file_filter = locale//LC_MESSAGES/reference/method/db.cloneCollection.po -source_file = locale/pot/reference/method/db.cloneCollection.pot -source_lang = en - -[mongodb-manual.reference--method--db_printSecondaryReplicationInfo] -file_filter = locale//LC_MESSAGES/reference/method/db.printSecondaryReplicationInfo.po -source_file = locale/pot/reference/method/db.printSecondaryReplicationInfo.pot -source_lang = en - -[mongodb-manual.reference--method--db_printSlaveReplicationInfo] -file_filter = locale//LC_MESSAGES/reference/method/db.printSlaveReplicationInfo.po -source_file = locale/pot/reference/method/db.printSlaveReplicationInfo.pot -source_lang = en - -[mongodb-manual.reference--method--js-sharding] -file_filter = locale//LC_MESSAGES/reference/method/js-sharding.po -source_file = locale/pot/reference/method/js-sharding.pot -source_lang = en - -[mongodb-manual.reference--method--Mongo_setSlaveOk] -file_filter = locale//LC_MESSAGES/reference/method/Mongo.setSlaveOk.po -source_file = locale/pot/reference/method/Mongo.setSlaveOk.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_maxTimeMS] -file_filter = locale//LC_MESSAGES/reference/method/cursor.maxTimeMS.po -source_file = locale/pot/reference/method/cursor.maxTimeMS.pot -source_lang = en - -[mongodb-manual.reference--method--js-replication] -file_filter = locale//LC_MESSAGES/reference/method/js-replication.po -source_file = locale/pot/reference/method/js-replication.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_showDiskLoc] -file_filter = locale//LC_MESSAGES/reference/method/cursor.showDiskLoc.po -source_file = locale/pot/reference/method/cursor.showDiskLoc.pot -source_lang = en - -[mongodb-manual.reference--method--mkdir] -file_filter = locale//LC_MESSAGES/reference/method/mkdir.po -source_file = locale/pot/reference/method/mkdir.pot -source_lang = en - -[mongodb-manual.reference--method--rs_remove] -file_filter = locale//LC_MESSAGES/reference/method/rs.remove.po -source_file = locale/pot/reference/method/rs.remove.pot -source_lang = en - -[mongodb-manual.reference--method--sh_waitForDLock] -file_filter = locale//LC_MESSAGES/reference/method/sh.waitForDLock.po -source_file = locale/pot/reference/method/sh.waitForDLock.pot -source_lang = en - -[mongodb-manual.reference--method--ObjectId_toString] -file_filter = locale//LC_MESSAGES/reference/method/ObjectId.toString.po -source_file = locale/pot/reference/method/ObjectId.toString.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_skip] -file_filter = locale//LC_MESSAGES/reference/method/cursor.skip.po -source_file = locale/pot/reference/method/cursor.skip.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_limit] -file_filter = locale//LC_MESSAGES/reference/method/cursor.limit.po -source_file = locale/pot/reference/method/cursor.limit.pot -source_lang = en - -[mongodb-manual.reference--method--db_fsyncUnlock] -file_filter = locale//LC_MESSAGES/reference/method/db.fsyncUnlock.po -source_file = locale/pot/reference/method/db.fsyncUnlock.pot -source_lang = en - -[mongodb-manual.reference--method--db_getCollectionNames] -file_filter = locale//LC_MESSAGES/reference/method/db.getCollectionNames.po -source_file = locale/pot/reference/method/db.getCollectionNames.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_update] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.update.po -source_file = locale/pot/reference/method/db.collection.update.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_sort] -file_filter = locale//LC_MESSAGES/reference/method/cursor.sort.po -source_file = locale/pot/reference/method/cursor.sort.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_objsLeftInBatch] -file_filter = locale//LC_MESSAGES/reference/method/cursor.objsLeftInBatch.po -source_file = locale/pot/reference/method/cursor.objsLeftInBatch.pot -source_lang = en - -[mongodb-manual.reference--method--rs_initiate] -file_filter = locale//LC_MESSAGES/reference/method/rs.initiate.po -source_file = locale/pot/reference/method/rs.initiate.pot -source_lang = en - -[mongodb-manual.reference--method--rs_conf] -file_filter = locale//LC_MESSAGES/reference/method/rs.conf.po -source_file = locale/pot/reference/method/rs.conf.pot -source_lang = en - -[mongodb-manual.reference--method--sh_disableBalancing] -file_filter = locale//LC_MESSAGES/reference/method/sh.disableBalancing.po -source_file = locale/pot/reference/method/sh.disableBalancing.pot -source_lang = en - -[mongodb-manual.reference--method--js-cursor] -file_filter = locale//LC_MESSAGES/reference/method/js-cursor.po -source_file = locale/pot/reference/method/js-cursor.pot -source_lang = en - -[mongodb-manual.reference--method--getHostName] -file_filter = locale//LC_MESSAGES/reference/method/getHostName.po -source_file = locale/pot/reference/method/getHostName.pot -source_lang = en - -[mongodb-manual.reference--method--db_removeUser] -file_filter = locale//LC_MESSAGES/reference/method/db.removeUser.po -source_file = locale/pot/reference/method/db.removeUser.pot -source_lang = en - -[mongodb-manual.reference--method--db_getUsers] -file_filter = locale//LC_MESSAGES/reference/method/db.getUsers.po -source_file = locale/pot/reference/method/db.getUsers.pot -source_lang = en - -[mongodb-manual.reference--method--db_help] -file_filter = locale//LC_MESSAGES/reference/method/db.help.po -source_file = locale/pot/reference/method/db.help.pot -source_lang = en - -[mongodb-manual.reference--method--db_dropUser] -file_filter = locale//LC_MESSAGES/reference/method/db.dropUser.po -source_file = locale/pot/reference/method/db.dropUser.pot -source_lang = en - -[mongodb-manual.reference--method--startMongoProgram] -file_filter = locale//LC_MESSAGES/reference/method/startMongoProgram.po -source_file = locale/pot/reference/method/startMongoProgram.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_validate] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.validate.po -source_file = locale/pot/reference/method/db.collection.validate.pot -source_lang = en - -[mongodb-manual.reference--method--listFiles] -file_filter = locale//LC_MESSAGES/reference/method/listFiles.po -source_file = locale/pot/reference/method/listFiles.pot -source_lang = en - -[mongodb-manual.reference--method--Mongo_getReadPrefTagSet] -file_filter = locale//LC_MESSAGES/reference/method/Mongo.getReadPrefTagSet.po -source_file = locale/pot/reference/method/Mongo.getReadPrefTagSet.pot -source_lang = en - -[mongodb-manual.reference--method--db_listCommands] -file_filter = locale//LC_MESSAGES/reference/method/db.listCommands.po -source_file = locale/pot/reference/method/db.listCommands.pot -source_lang = en - -[mongodb-manual.reference--method--ObjectId_valueOf] -file_filter = locale//LC_MESSAGES/reference/method/ObjectId.valueOf.po -source_file = locale/pot/reference/method/ObjectId.valueOf.pot -source_lang = en - -[mongodb-manual.reference--method--db_runCommand] -file_filter = locale//LC_MESSAGES/reference/method/db.runCommand.po -source_file = locale/pot/reference/method/db.runCommand.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_group] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.group.po -source_file = locale/pot/reference/method/db.collection.group.pot -source_lang = en - -[mongodb-manual.reference--method--sh_removeShardTag] -file_filter = locale//LC_MESSAGES/reference/method/sh.removeShardTag.po -source_file = locale/pot/reference/method/sh.removeShardTag.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_distinct] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.distinct.po -source_file = locale/pot/reference/method/db.collection.distinct.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_save] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.save.po -source_file = locale/pot/reference/method/db.collection.save.pot -source_lang = en - -[mongodb-manual.reference--method--db_grantRolesToRole] -file_filter = locale//LC_MESSAGES/reference/method/db.grantRolesToRole.po -source_file = locale/pot/reference/method/db.grantRolesToRole.pot -source_lang = en - -[mongodb-manual.reference--method--db_resetError] -file_filter = locale//LC_MESSAGES/reference/method/db.resetError.po -source_file = locale/pot/reference/method/db.resetError.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_totalSize] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.totalSize.po -source_file = locale/pot/reference/method/db.collection.totalSize.pot -source_lang = en - -[mongodb-manual.reference--method--quit] -file_filter = locale//LC_MESSAGES/reference/method/quit.po -source_file = locale/pot/reference/method/quit.pot -source_lang = en - -[mongodb-manual.reference--method--js-connection] -file_filter = locale//LC_MESSAGES/reference/method/js-connection.po -source_file = locale/pot/reference/method/js-connection.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_findOne] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.findOne.po -source_file = locale/pot/reference/method/db.collection.findOne.pot -source_lang = en - -[mongodb-manual.reference--method--db_createCollection] -file_filter = locale//LC_MESSAGES/reference/method/db.createCollection.po -source_file = locale/pot/reference/method/db.createCollection.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_findAndModify] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.findAndModify.po -source_file = locale/pot/reference/method/db.collection.findAndModify.pot -source_lang = en - -[mongodb-manual.reference--method--clearRawMongoProgramOutput] -file_filter = locale//LC_MESSAGES/reference/method/clearRawMongoProgramOutput.po -source_file = locale/pot/reference/method/clearRawMongoProgramOutput.pot -source_lang = en - -[mongodb-manual.reference--method--db_copyDatabase] -file_filter = locale//LC_MESSAGES/reference/method/db.copyDatabase.po -source_file = locale/pot/reference/method/db.copyDatabase.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_totalIndexSize] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.totalIndexSize.po -source_file = locale/pot/reference/method/db.collection.totalIndexSize.pot -source_lang = en - -[mongodb-manual.reference--method--connect] -file_filter = locale//LC_MESSAGES/reference/method/connect.po -source_file = locale/pot/reference/method/connect.pot -source_lang = en - -[mongodb-manual.reference--method--js-user-management] -file_filter = locale//LC_MESSAGES/reference/method/js-user-management.po -source_file = locale/pot/reference/method/js-user-management.pot -source_lang = en - -[mongodb-manual.reference--method--db_getRole] -file_filter = locale//LC_MESSAGES/reference/method/db.getRole.po -source_file = locale/pot/reference/method/db.getRole.pot -source_lang = en - -[mongodb-manual.reference--method--sh__checkMongos] -file_filter = locale//LC_MESSAGES/reference/method/sh._checkMongos.po -source_file = locale/pot/reference/method/sh._checkMongos.pot -source_lang = en - -[mongodb-manual.reference--method--waitProgram] -file_filter = locale//LC_MESSAGES/reference/method/waitProgram.po -source_file = locale/pot/reference/method/waitProgram.pot -source_lang = en - -[mongodb-manual.reference--method--Mongo_getReadPrefMode] -file_filter = locale//LC_MESSAGES/reference/method/Mongo.getReadPrefMode.po -source_file = locale/pot/reference/method/Mongo.getReadPrefMode.pot -source_lang = en - -[mongodb-manual.reference--method--db_getLastErrorObj] -file_filter = locale//LC_MESSAGES/reference/method/db.getLastErrorObj.po -source_file = locale/pot/reference/method/db.getLastErrorObj.pot -source_lang = en - -[mongodb-manual.reference--method--md5sumFile] -file_filter = locale//LC_MESSAGES/reference/method/md5sumFile.po -source_file = locale/pot/reference/method/md5sumFile.pot -source_lang = en - -[mongodb-manual.reference--method--db_createRole] -file_filter = locale//LC_MESSAGES/reference/method/db.createRole.po -source_file = locale/pot/reference/method/db.createRole.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_next] -file_filter = locale//LC_MESSAGES/reference/method/cursor.next.po -source_file = locale/pot/reference/method/cursor.next.pot -source_lang = en - -[mongodb-manual.reference--method--db_stats] -file_filter = locale//LC_MESSAGES/reference/method/db.stats.po -source_file = locale/pot/reference/method/db.stats.pot -source_lang = en - -[mongodb-manual.reference--method--db_dropAllUsers] -file_filter = locale//LC_MESSAGES/reference/method/db.dropAllUsers.po -source_file = locale/pot/reference/method/db.dropAllUsers.pot -source_lang = en - -[mongodb-manual.reference--method--db_serverStatus] -file_filter = locale//LC_MESSAGES/reference/method/db.serverStatus.po -source_file = locale/pot/reference/method/db.serverStatus.pot -source_lang = en - -[mongodb-manual.reference--method--db_dropAllRoles] -file_filter = locale//LC_MESSAGES/reference/method/db.dropAllRoles.po -source_file = locale/pot/reference/method/db.dropAllRoles.pot -source_lang = en - -[mongodb-manual.reference--method--fuzzFile] -file_filter = locale//LC_MESSAGES/reference/method/fuzzFile.po -source_file = locale/pot/reference/method/fuzzFile.pot -source_lang = en - -[mongodb-manual.reference--method--db_updateRole] -file_filter = locale//LC_MESSAGES/reference/method/db.updateRole.po -source_file = locale/pot/reference/method/db.updateRole.pot -source_lang = en - -[mongodb-manual.reference--method--sh_shardCollection] -file_filter = locale//LC_MESSAGES/reference/method/sh.shardCollection.po -source_file = locale/pot/reference/method/sh.shardCollection.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_getIndexes] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.getIndexes.po -source_file = locale/pot/reference/method/db.collection.getIndexes.pot -source_lang = en - -[mongodb-manual.reference--method--sh_setBalancerState] -file_filter = locale//LC_MESSAGES/reference/method/sh.setBalancerState.po -source_file = locale/pot/reference/method/sh.setBalancerState.pot -source_lang = en - -[mongodb-manual.reference--method--db_grantRolesToUser] -file_filter = locale//LC_MESSAGES/reference/method/db.grantRolesToUser.po -source_file = locale/pot/reference/method/db.grantRolesToUser.pot -source_lang = en - -[mongodb-manual.reference--method--js-database] -file_filter = locale//LC_MESSAGES/reference/method/js-database.po -source_file = locale/pot/reference/method/js-database.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_toArray] -file_filter = locale//LC_MESSAGES/reference/method/cursor.toArray.po -source_file = locale/pot/reference/method/cursor.toArray.pot -source_lang = en - -[mongodb-manual.reference--method--js-constructor] -file_filter = locale//LC_MESSAGES/reference/method/js-constructor.po -source_file = locale/pot/reference/method/js-constructor.pot -source_lang = en - -[mongodb-manual.reference--method--sh__lastMigration] -file_filter = locale//LC_MESSAGES/reference/method/sh._lastMigration.po -source_file = locale/pot/reference/method/sh._lastMigration.pot -source_lang = en - -[mongodb-manual.reference--method--sh_addTagRange] -file_filter = locale//LC_MESSAGES/reference/method/sh.addTagRange.po -source_file = locale/pot/reference/method/sh.addTagRange.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_mapReduce] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.mapReduce.po -source_file = locale/pot/reference/method/db.collection.mapReduce.pot -source_lang = en - -[mongodb-manual.reference--method--getMemInfo] -file_filter = locale//LC_MESSAGES/reference/method/getMemInfo.po -source_file = locale/pot/reference/method/getMemInfo.pot -source_lang = en - -[mongodb-manual.reference--method--db_printReplicationInfo] -file_filter = locale//LC_MESSAGES/reference/method/db.printReplicationInfo.po -source_file = locale/pot/reference/method/db.printReplicationInfo.pot -source_lang = en - -[mongodb-manual.reference--method--db_getRoles] -file_filter = locale//LC_MESSAGES/reference/method/db.getRoles.po -source_file = locale/pot/reference/method/db.getRoles.pot -source_lang = en - -[mongodb-manual.reference--method--sh_splitAt] -file_filter = locale//LC_MESSAGES/reference/method/sh.splitAt.po -source_file = locale/pot/reference/method/sh.splitAt.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_createIndex] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.createIndex.po -source_file = locale/pot/reference/method/db.collection.createIndex.pot -source_lang = en - -[mongodb-manual.reference--method--sh_enableBalancing] -file_filter = locale//LC_MESSAGES/reference/method/sh.enableBalancing.po -source_file = locale/pot/reference/method/sh.enableBalancing.pot -source_lang = en - -[mongodb-manual.reference--method--db_auth] -file_filter = locale//LC_MESSAGES/reference/method/db.auth.po -source_file = locale/pot/reference/method/db.auth.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_count] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.count.po -source_file = locale/pot/reference/method/db.collection.count.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_explain] -file_filter = locale//LC_MESSAGES/reference/method/cursor.explain.po -source_file = locale/pot/reference/method/cursor.explain.pot -source_lang = en - -[mongodb-manual.reference--method--sh__adminCommand] -file_filter = locale//LC_MESSAGES/reference/method/sh._adminCommand.po -source_file = locale/pot/reference/method/sh._adminCommand.pot -source_lang = en - -[mongodb-manual.reference--method--db_getReplicationInfo] -file_filter = locale//LC_MESSAGES/reference/method/db.getReplicationInfo.po -source_file = locale/pot/reference/method/db.getReplicationInfo.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_hasNext] -file_filter = locale//LC_MESSAGES/reference/method/cursor.hasNext.po -source_file = locale/pot/reference/method/cursor.hasNext.pot -source_lang = en - -[mongodb-manual.reference--method--db_fsyncLock] -file_filter = locale//LC_MESSAGES/reference/method/db.fsyncLock.po -source_file = locale/pot/reference/method/db.fsyncLock.pot -source_lang = en - -[mongodb-manual.reference--method--db_eval] -file_filter = locale//LC_MESSAGES/reference/method/db.eval.po -source_file = locale/pot/reference/method/db.eval.pot -source_lang = en - -[mongodb-manual.reference--method--sh_waitForPingChange] -file_filter = locale//LC_MESSAGES/reference/method/sh.waitForPingChange.po -source_file = locale/pot/reference/method/sh.waitForPingChange.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_forEach] -file_filter = locale//LC_MESSAGES/reference/method/cursor.forEach.po -source_file = locale/pot/reference/method/cursor.forEach.pot -source_lang = en - -[mongodb-manual.reference--method--sh_getBalancerHost] -file_filter = locale//LC_MESSAGES/reference/method/sh.getBalancerHost.po -source_file = locale/pot/reference/method/sh.getBalancerHost.pot -source_lang = en - -[mongodb-manual.reference--method--rs_printReplicationInfo] -file_filter = locale//LC_MESSAGES/reference/method/rs.printReplicationInfo.po -source_file = locale/pot/reference/method/rs.printReplicationInfo.pot -source_lang = en - -[mongodb-manual.reference--method--cd] -file_filter = locale//LC_MESSAGES/reference/method/cd.po -source_file = locale/pot/reference/method/cd.pot -source_lang = en - -[mongodb-manual.reference--method--js-native] -file_filter = locale//LC_MESSAGES/reference/method/js-native.po -source_file = locale/pot/reference/method/js-native.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_dropIndex] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.dropIndex.po -source_file = locale/pot/reference/method/db.collection.dropIndex.pot -source_lang = en - -[mongodb-manual.reference--method--stopMongoProgram] -file_filter = locale//LC_MESSAGES/reference/method/stopMongoProgram.po -source_file = locale/pot/reference/method/stopMongoProgram.pot -source_lang = en - -[mongodb-manual.reference--method--db_addUser] -file_filter = locale//LC_MESSAGES/reference/method/db.addUser.po -source_file = locale/pot/reference/method/db.addUser.pot -source_lang = en - -[mongodb-manual.reference--method--db_getUser] -file_filter = locale//LC_MESSAGES/reference/method/db.getUser.po -source_file = locale/pot/reference/method/db.getUser.pot -source_lang = en - -[mongodb-manual.reference--method--rs_status] -file_filter = locale//LC_MESSAGES/reference/method/rs.status.po -source_file = locale/pot/reference/method/rs.status.pot -source_lang = en - -[mongodb-manual.reference--method--db_revokeRolesFromRole] -file_filter = locale//LC_MESSAGES/reference/method/db.revokeRolesFromRole.po -source_file = locale/pot/reference/method/db.revokeRolesFromRole.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_stats] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.stats.po -source_file = locale/pot/reference/method/db.collection.stats.pot -source_lang = en - -[mongodb-manual.reference--method--Date] -file_filter = locale//LC_MESSAGES/reference/method/Date.po -source_file = locale/pot/reference/method/Date.pot -source_lang = en - -[mongodb-manual.reference--method--runProgram] -file_filter = locale//LC_MESSAGES/reference/method/runProgram.po -source_file = locale/pot/reference/method/runProgram.pot -source_lang = en - -[mongodb-manual.reference--method--db_grantPrivilegesToRole] -file_filter = locale//LC_MESSAGES/reference/method/db.grantPrivilegesToRole.po -source_file = locale/pot/reference/method/db.grantPrivilegesToRole.pot -source_lang = en - -[mongodb-manual.reference--method--rs_slaveOk] -file_filter = locale//LC_MESSAGES/reference/method/rs.slaveOk.po -source_file = locale/pot/reference/method/rs.slaveOk.pot -source_lang = en - -[mongodb-manual.reference--method--db_dropRole] -file_filter = locale//LC_MESSAGES/reference/method/db.dropRole.po -source_file = locale/pot/reference/method/db.dropRole.pot -source_lang = en - -[mongodb-manual.reference--method--sh_splitFind] -file_filter = locale//LC_MESSAGES/reference/method/sh.splitFind.po -source_file = locale/pot/reference/method/sh.splitFind.pot -source_lang = en - -[mongodb-manual.reference--method--db_setProfilingLevel] -file_filter = locale//LC_MESSAGES/reference/method/db.setProfilingLevel.po -source_file = locale/pot/reference/method/db.setProfilingLevel.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_indexStats] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.indexStats.po -source_file = locale/pot/reference/method/db.collection.indexStats.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_drop] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.drop.po -source_file = locale/pot/reference/method/db.collection.drop.pot -source_lang = en - -[mongodb-manual.reference--method--db_killOp] -file_filter = locale//LC_MESSAGES/reference/method/db.killOp.po -source_file = locale/pot/reference/method/db.killOp.pot -source_lang = en - -[mongodb-manual.reference--method--cat] -file_filter = locale//LC_MESSAGES/reference/method/cat.po -source_file = locale/pot/reference/method/cat.pot -source_lang = en - -[mongodb-manual.reference--method--sh_status] -file_filter = locale//LC_MESSAGES/reference/method/sh.status.po -source_file = locale/pot/reference/method/sh.status.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_size] -file_filter = locale//LC_MESSAGES/reference/method/cursor.size.po -source_file = locale/pot/reference/method/cursor.size.pot -source_lang = en - -[mongodb-manual.reference--method--db_getMongo] -file_filter = locale//LC_MESSAGES/reference/method/db.getMongo.po -source_file = locale/pot/reference/method/db.getMongo.pot -source_lang = en - -[mongodb-manual.reference--method--copyDbpath] -file_filter = locale//LC_MESSAGES/reference/method/copyDbpath.po -source_file = locale/pot/reference/method/copyDbpath.pot -source_lang = en - -[mongodb-manual.reference--method--rand] -file_filter = locale//LC_MESSAGES/reference/method/rand.po -source_file = locale/pot/reference/method/rand.pot -source_lang = en - -[mongodb-manual.reference--method--db_isMaster] -file_filter = locale//LC_MESSAGES/reference/method/db.isMaster.po -source_file = locale/pot/reference/method/db.isMaster.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_aggregate] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.aggregate.po -source_file = locale/pot/reference/method/db.collection.aggregate.pot -source_lang = en - -[mongodb-manual.reference--method--rs_stepDown] -file_filter = locale//LC_MESSAGES/reference/method/rs.stepDown.po -source_file = locale/pot/reference/method/rs.stepDown.pot -source_lang = en - -[mongodb-manual.reference--method--rs_help] -file_filter = locale//LC_MESSAGES/reference/method/rs.help.po -source_file = locale/pot/reference/method/rs.help.pot -source_lang = en - -[mongodb-manual.reference--method--db_getProfilingStatus] -file_filter = locale//LC_MESSAGES/reference/method/db.getProfilingStatus.po -source_file = locale/pot/reference/method/db.getProfilingStatus.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_find] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.find.po -source_file = locale/pot/reference/method/db.collection.find.pot -source_lang = en - -[mongodb-manual.reference--method--rs_add] -file_filter = locale//LC_MESSAGES/reference/method/rs.add.po -source_file = locale/pot/reference/method/rs.add.pot -source_lang = en - -[mongodb-manual.reference--method--sh_startBalancer] -file_filter = locale//LC_MESSAGES/reference/method/sh.startBalancer.po -source_file = locale/pot/reference/method/sh.startBalancer.pot -source_lang = en - -[mongodb-manual.reference--method--js-collection] -file_filter = locale//LC_MESSAGES/reference/method/js-collection.po -source_file = locale/pot/reference/method/js-collection.pot -source_lang = en - -[mongodb-manual.reference--method--db_revokeRolesFromUser] -file_filter = locale//LC_MESSAGES/reference/method/db.revokeRolesFromUser.po -source_file = locale/pot/reference/method/db.revokeRolesFromUser.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_hint] -file_filter = locale//LC_MESSAGES/reference/method/cursor.hint.po -source_file = locale/pot/reference/method/cursor.hint.pot -source_lang = en - -[mongodb-manual.reference--method--sh_enableSharding] -file_filter = locale//LC_MESSAGES/reference/method/sh.enableSharding.po -source_file = locale/pot/reference/method/sh.enableSharding.pot -source_lang = en - -[mongodb-manual.reference--method--db_logout] -file_filter = locale//LC_MESSAGES/reference/method/db.logout.po -source_file = locale/pot/reference/method/db.logout.pot -source_lang = en - -[mongodb-manual.reference--method--db_dropDatabase] -file_filter = locale//LC_MESSAGES/reference/method/db.dropDatabase.po -source_file = locale/pot/reference/method/db.dropDatabase.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_max] -file_filter = locale//LC_MESSAGES/reference/method/cursor.max.po -source_file = locale/pot/reference/method/cursor.max.pot -source_lang = en - -[mongodb-manual.reference--method--UUID] -file_filter = locale//LC_MESSAGES/reference/method/UUID.po -source_file = locale/pot/reference/method/UUID.pot -source_lang = en - -[mongodb-manual.reference--method--rs_addArb] -file_filter = locale//LC_MESSAGES/reference/method/rs.addArb.po -source_file = locale/pot/reference/method/rs.addArb.pot -source_lang = en - -[mongodb-manual.reference--method--load] -file_filter = locale//LC_MESSAGES/reference/method/load.po -source_file = locale/pot/reference/method/load.pot -source_lang = en - -[mongodb-manual.reference--method--rs_reconfig] -file_filter = locale//LC_MESSAGES/reference/method/rs.reconfig.po -source_file = locale/pot/reference/method/rs.reconfig.pot -source_lang = en - -[mongodb-manual.reference--method--removeFile] -file_filter = locale//LC_MESSAGES/reference/method/removeFile.po -source_file = locale/pot/reference/method/removeFile.pot -source_lang = en - -[mongodb-manual.reference--method--db_printCollectionStats] -file_filter = locale//LC_MESSAGES/reference/method/db.printCollectionStats.po -source_file = locale/pot/reference/method/db.printCollectionStats.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_getShardDistribution] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.getShardDistribution.po -source_file = locale/pot/reference/method/db.collection.getShardDistribution.pot -source_lang = en - -[mongodb-manual.reference--method--db_changeUserPassword] -file_filter = locale//LC_MESSAGES/reference/method/db.changeUserPassword.po -source_file = locale/pot/reference/method/db.changeUserPassword.pot -source_lang = en - -[mongodb-manual.reference--method--sh_waitForBalancerOff] -file_filter = locale//LC_MESSAGES/reference/method/sh.waitForBalancerOff.po -source_file = locale/pot/reference/method/sh.waitForBalancerOff.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_remove] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.remove.po -source_file = locale/pot/reference/method/db.collection.remove.pot -source_lang = en - -[mongodb-manual.reference--method--db_cloneDatabase] -file_filter = locale//LC_MESSAGES/reference/method/db.cloneDatabase.po -source_file = locale/pot/reference/method/db.cloneDatabase.pot -source_lang = en - -[mongodb-manual.reference--method--db_version] -file_filter = locale//LC_MESSAGES/reference/method/db.version.po -source_file = locale/pot/reference/method/db.version.pot -source_lang = en - -[mongodb-manual.reference--method--rs_syncFrom] -file_filter = locale//LC_MESSAGES/reference/method/rs.syncFrom.po -source_file = locale/pot/reference/method/rs.syncFrom.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_renameCollection] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.renameCollection.po -source_file = locale/pot/reference/method/db.collection.renameCollection.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_getIndexStats] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.getIndexStats.po -source_file = locale/pot/reference/method/db.collection.getIndexStats.pot -source_lang = en - -[mongodb-manual.reference--method--db_commandHelp] -file_filter = locale//LC_MESSAGES/reference/method/db.commandHelp.po -source_file = locale/pot/reference/method/db.commandHelp.pot -source_lang = en - -[mongodb-manual.reference--method--isWindows] -file_filter = locale//LC_MESSAGES/reference/method/isWindows.po -source_file = locale/pot/reference/method/isWindows.pot -source_lang = en - -[mongodb-manual.reference--method--js-subprocess] -file_filter = locale//LC_MESSAGES/reference/method/js-subprocess.po -source_file = locale/pot/reference/method/js-subprocess.pot -source_lang = en - -[mongodb-manual.reference--method--run] -file_filter = locale//LC_MESSAGES/reference/method/run.po -source_file = locale/pot/reference/method/run.pot -source_lang = en - -[mongodb-manual.reference--method--db_revokePrivilegesFromRole] -file_filter = locale//LC_MESSAGES/reference/method/db.revokePrivilegesFromRole.po -source_file = locale/pot/reference/method/db.revokePrivilegesFromRole.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_getShardVersion] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.getShardVersion.po -source_file = locale/pot/reference/method/db.collection.getShardVersion.pot -source_lang = en - -[mongodb-manual.reference--method--db_getLastError] -file_filter = locale//LC_MESSAGES/reference/method/db.getLastError.po -source_file = locale/pot/reference/method/db.getLastError.pot -source_lang = en - -[mongodb-manual.reference--method--db_createUser] -file_filter = locale//LC_MESSAGES/reference/method/db.createUser.po -source_file = locale/pot/reference/method/db.createUser.pot -source_lang = en - -[mongodb-manual.reference--method--resetDbpath] -file_filter = locale//LC_MESSAGES/reference/method/resetDbpath.po -source_file = locale/pot/reference/method/resetDbpath.pot -source_lang = en - -[mongodb-manual.reference--method--version] -file_filter = locale//LC_MESSAGES/reference/method/version.po -source_file = locale/pot/reference/method/version.pot -source_lang = en - -[mongodb-manual.reference--method--db_getProfilingLevel] -file_filter = locale//LC_MESSAGES/reference/method/db.getProfilingLevel.po -source_file = locale/pot/reference/method/db.getProfilingLevel.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_insert] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.insert.po -source_file = locale/pot/reference/method/db.collection.insert.pot -source_lang = en - -[mongodb-manual.reference--method--db_serverBuildInfo] -file_filter = locale//LC_MESSAGES/reference/method/db.serverBuildInfo.po -source_file = locale/pot/reference/method/db.serverBuildInfo.pot -source_lang = en - -[mongodb-manual.reference--method--sh_getBalancerState] -file_filter = locale//LC_MESSAGES/reference/method/sh.getBalancerState.po -source_file = locale/pot/reference/method/sh.getBalancerState.pot -source_lang = en - -[mongodb-manual.reference--method--sh_addShard] -file_filter = locale//LC_MESSAGES/reference/method/sh.addShard.po -source_file = locale/pot/reference/method/sh.addShard.pot -source_lang = en - -[mongodb-manual.reference--method--db_getPrevError] -file_filter = locale//LC_MESSAGES/reference/method/db.getPrevError.po -source_file = locale/pot/reference/method/db.getPrevError.pot -source_lang = en - -[mongodb-manual.reference--method--Mongo] -file_filter = locale//LC_MESSAGES/reference/method/Mongo.po -source_file = locale/pot/reference/method/Mongo.pot -source_lang = en - -[mongodb-manual.reference--method--db_hostInfo] -file_filter = locale//LC_MESSAGES/reference/method/db.hostInfo.po -source_file = locale/pot/reference/method/db.hostInfo.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_count] -file_filter = locale//LC_MESSAGES/reference/method/cursor.count.po -source_file = locale/pot/reference/method/cursor.count.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_copyTo] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.copyTo.po -source_file = locale/pot/reference/method/db.collection.copyTo.pot -source_lang = en - -[mongodb-manual.reference--method--rs_printSecondaryReplicationInfo] -file_filter = locale//LC_MESSAGES/reference/method/rs.printSecondaryReplicationInfo.po -source_file = locale/pot/reference/method/rs.printSecondaryReplicationInfo.pot -source_lang = en - -[mongodb-manual.reference--method--rs_printSlaveReplicationInfo] -file_filter = locale//LC_MESSAGES/reference/method/rs.printSlaveReplicationInfo.po -source_file = locale/pot/reference/method/rs.printSlaveReplicationInfo.pot -source_lang = en - -[mongodb-manual.reference--method--runMongoProgram] -file_filter = locale//LC_MESSAGES/reference/method/runMongoProgram.po -source_file = locale/pot/reference/method/runMongoProgram.pot -source_lang = en - -[mongodb-manual.reference--method--js-role-management] -file_filter = locale//LC_MESSAGES/reference/method/js-role-management.po -source_file = locale/pot/reference/method/js-role-management.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_reIndex] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.reIndex.po -source_file = locale/pot/reference/method/db.collection.reIndex.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_min] -file_filter = locale//LC_MESSAGES/reference/method/cursor.min.po -source_file = locale/pot/reference/method/cursor.min.pot -source_lang = en - -[mongodb-manual.reference--method--db_updateUser] -file_filter = locale//LC_MESSAGES/reference/method/db.updateUser.po -source_file = locale/pot/reference/method/db.updateUser.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_batchSize] -file_filter = locale//LC_MESSAGES/reference/method/cursor.batchSize.po -source_file = locale/pot/reference/method/cursor.batchSize.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_addOption] -file_filter = locale//LC_MESSAGES/reference/method/cursor.addOption.po -source_file = locale/pot/reference/method/cursor.addOption.pot -source_lang = en - -[mongodb-manual.reference--method--rs_freeze] -file_filter = locale//LC_MESSAGES/reference/method/rs.freeze.po -source_file = locale/pot/reference/method/rs.freeze.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_map] -file_filter = locale//LC_MESSAGES/reference/method/cursor.map.po -source_file = locale/pot/reference/method/cursor.map.pot -source_lang = en - -[mongodb-manual.reference--method--rawMongoProgramOutput] -file_filter = locale//LC_MESSAGES/reference/method/rawMongoProgramOutput.po -source_file = locale/pot/reference/method/rawMongoProgramOutput.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_ensureIndex] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.ensureIndex.po -source_file = locale/pot/reference/method/db.collection.ensureIndex.pot -source_lang = en - -[mongodb-manual.reference--method--sh_addShardTag] -file_filter = locale//LC_MESSAGES/reference/method/sh.addShardTag.po -source_file = locale/pot/reference/method/sh.addShardTag.pot -source_lang = en - -[mongodb-manual.reference--method--db_currentOp] -file_filter = locale//LC_MESSAGES/reference/method/db.currentOp.po -source_file = locale/pot/reference/method/db.currentOp.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_dataSize] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.dataSize.po -source_file = locale/pot/reference/method/db.collection.dataSize.pot -source_lang = en - -[mongodb-manual.reference--method--db_getName] -file_filter = locale//LC_MESSAGES/reference/method/db.getName.po -source_file = locale/pot/reference/method/db.getName.pot -source_lang = en - -[mongodb-manual.reference--method--cursor_readPref] -file_filter = locale//LC_MESSAGES/reference/method/cursor.readPref.po -source_file = locale/pot/reference/method/cursor.readPref.pot -source_lang = en - -[mongodb-manual.reference--method--sh_stopBalancer] -file_filter = locale//LC_MESSAGES/reference/method/sh.stopBalancer.po -source_file = locale/pot/reference/method/sh.stopBalancer.pot -source_lang = en - -[mongodb-manual.reference--method--db_printShardingStatus] -file_filter = locale//LC_MESSAGES/reference/method/db.printShardingStatus.po -source_file = locale/pot/reference/method/db.printShardingStatus.pot -source_lang = en - -[mongodb-manual.reference--method--Mongo_setReadPref] -file_filter = locale//LC_MESSAGES/reference/method/Mongo.setReadPref.po -source_file = locale/pot/reference/method/Mongo.setReadPref.pot -source_lang = en - -[mongodb-manual.reference--method--db_getSiblingDB] -file_filter = locale//LC_MESSAGES/reference/method/db.getSiblingDB.po -source_file = locale/pot/reference/method/db.getSiblingDB.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_isCapped] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.isCapped.po -source_file = locale/pot/reference/method/db.collection.isCapped.pot -source_lang = en - -[mongodb-manual.reference--method--db_getCollection] -file_filter = locale//LC_MESSAGES/reference/method/db.getCollection.po -source_file = locale/pot/reference/method/db.getCollection.pot -source_lang = en - -[mongodb-manual.reference--method--sh_moveChunk] -file_filter = locale//LC_MESSAGES/reference/method/sh.moveChunk.po -source_file = locale/pot/reference/method/sh.moveChunk.pot -source_lang = en - -[mongodb-manual.reference--method--sh__checkFullName] -file_filter = locale//LC_MESSAGES/reference/method/sh._checkFullName.po -source_file = locale/pot/reference/method/sh._checkFullName.pot -source_lang = en - -[mongodb-manual.reference--method--ls] -file_filter = locale//LC_MESSAGES/reference/method/ls.po -source_file = locale/pot/reference/method/ls.pot -source_lang = en - -[mongodb-manual.core--aggregation-pipeline-optimization] -file_filter = locale//LC_MESSAGES/core/aggregation-pipeline-optimization.po -source_file = locale/pot/core/aggregation-pipeline-optimization.pot -source_lang = en - -[mongodb-manual.core--data-model-operations] -file_filter = locale//LC_MESSAGES/core/data-model-operations.po -source_file = locale/pot/core/data-model-operations.pot -source_lang = en - -[mongodb-manual.core--journaling] -file_filter = locale//LC_MESSAGES/core/journaling.po -source_file = locale/pot/core/journaling.pot -source_lang = en - -[mongodb-manual.core--tag-aware-sharding] -file_filter = locale//LC_MESSAGES/core/tag-aware-sharding.po -source_file = locale/pot/core/tag-aware-sharding.pot -source_lang = en - -[mongodb-manual.core--data-model-design] -file_filter = locale//LC_MESSAGES/core/data-model-design.po -source_file = locale/pot/core/data-model-design.pot -source_lang = en - -[mongodb-manual.core--single-purpose-aggregation] -file_filter = locale//LC_MESSAGES/core/single-purpose-aggregation.po -source_file = locale/pot/core/single-purpose-aggregation.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-architectures] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-architectures.po -source_file = locale/pot/core/sharded-cluster-architectures.pot -source_lang = en - -[mongodb-manual.core--query-optimization] -file_filter = locale//LC_MESSAGES/core/query-optimization.po -source_file = locale/pot/core/query-optimization.pot -source_lang = en - -[mongodb-manual.core--backups] -file_filter = locale//LC_MESSAGES/core/backups.po -source_file = locale/pot/core/backups.pot -source_lang = en - -[mongodb-manual.core--security-interface] -file_filter = locale//LC_MESSAGES/core/security-interface.po -source_file = locale/pot/core/security-interface.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-query-router] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-query-router.po -source_file = locale/pot/core/sharded-cluster-query-router.pot -source_lang = en - -[mongodb-manual.core--gridfs] -file_filter = locale//LC_MESSAGES/core/gridfs.po -source_file = locale/pot/core/gridfs.pot -source_lang = en - -[mongodb-manual.core--sharding-chunk-migration] -file_filter = locale//LC_MESSAGES/core/sharding-chunk-migration.po -source_file = locale/pot/core/sharding-chunk-migration.pot -source_lang = en - -[mongodb-manual.core--document] -file_filter = locale//LC_MESSAGES/core/document.po -source_file = locale/pot/core/document.pot -source_lang = en - -[mongodb-manual.core--map-reduce-concurrency] -file_filter = locale//LC_MESSAGES/core/map-reduce-concurrency.po -source_file = locale/pot/core/map-reduce-concurrency.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-requirements] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-requirements.po -source_file = locale/pot/core/sharded-cluster-requirements.pot -source_lang = en - -[mongodb-manual.core--replica-set-architecture-geographically-distributed] -file_filter = locale//LC_MESSAGES/core/replica-set-architecture-geographically-distributed.po -source_file = locale/pot/core/replica-set-architecture-geographically-distributed.pot -source_lang = en - -[mongodb-manual.core--index-creation] -file_filter = locale//LC_MESSAGES/core/index-creation.po -source_file = locale/pot/core/index-creation.pot -source_lang = en - -[mongodb-manual.core--replica-set-hidden-member] -file_filter = locale//LC_MESSAGES/core/replica-set-hidden-member.po -source_file = locale/pot/core/replica-set-hidden-member.pot -source_lang = en - -[mongodb-manual.core--sharding-shard-key-indexes] -file_filter = locale//LC_MESSAGES/core/sharding-shard-key-indexes.po -source_file = locale/pot/core/sharding-shard-key-indexes.pot -source_lang = en - -[mongodb-manual.core--data-modeling-introduction] -file_filter = locale//LC_MESSAGES/core/data-modeling-introduction.po -source_file = locale/pot/core/data-modeling-introduction.pot -source_lang = en - -[mongodb-manual.core--replica-set-architecture-four-members] -file_filter = locale//LC_MESSAGES/core/replica-set-architecture-four-members.po -source_file = locale/pot/core/replica-set-architecture-four-members.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-shards] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-shards.po -source_file = locale/pot/core/sharded-cluster-shards.pot -source_lang = en - -[mongodb-manual.core--administration] -file_filter = locale//LC_MESSAGES/core/administration.po -source_file = locale/pot/core/administration.pot -source_lang = en - -[mongodb-manual.core--aggregation-pipeline] -file_filter = locale//LC_MESSAGES/core/aggregation-pipeline.po -source_file = locale/pot/core/aggregation-pipeline.pot -source_lang = en - -[mongodb-manual.core--indexes] -file_filter = locale//LC_MESSAGES/core/indexes.po -source_file = locale/pot/core/indexes.pot -source_lang = en - -[mongodb-manual.core--index-multikey] -file_filter = locale//LC_MESSAGES/core/index-multikey.po -source_file = locale/pot/core/index-multikey.pot -source_lang = en - -[mongodb-manual.core--replication-introduction] -file_filter = locale//LC_MESSAGES/core/replication-introduction.po -source_file = locale/pot/core/replication-introduction.pot -source_lang = en - -[mongodb-manual.core--2d] -file_filter = locale//LC_MESSAGES/core/2d.po -source_file = locale/pot/core/2d.pot -source_lang = en - -[mongodb-manual.core--index-unique] -file_filter = locale//LC_MESSAGES/core/index-unique.po -source_file = locale/pot/core/index-unique.pot -source_lang = en - -[mongodb-manual.core--replica-set-write-concern] -file_filter = locale//LC_MESSAGES/core/replica-set-write-concern.po -source_file = locale/pot/core/replica-set-write-concern.pot -source_lang = en - -[mongodb-manual.core--replica-set-architecture-three-members] -file_filter = locale//LC_MESSAGES/core/replica-set-architecture-three-members.po -source_file = locale/pot/core/replica-set-architecture-three-members.pot -source_lang = en - -[mongodb-manual.core--replica-set-arbiter] -file_filter = locale//LC_MESSAGES/core/replica-set-arbiter.po -source_file = locale/pot/core/replica-set-arbiter.pot -source_lang = en - -[mongodb-manual.core--aggregation-mechanics] -file_filter = locale//LC_MESSAGES/core/aggregation-mechanics.po -source_file = locale/pot/core/aggregation-mechanics.pot -source_lang = en - -[mongodb-manual.core--index-text] -file_filter = locale//LC_MESSAGES/core/index-text.po -source_file = locale/pot/core/index-text.pot -source_lang = en - -[mongodb-manual.core--security-introduction] -file_filter = locale//LC_MESSAGES/core/security-introduction.po -source_file = locale/pot/core/security-introduction.pot -source_lang = en - -[mongodb-manual.core--replica-set-primary] -file_filter = locale//LC_MESSAGES/core/replica-set-primary.po -source_file = locale/pot/core/replica-set-primary.pot -source_lang = en - -[mongodb-manual.core--index-single] -file_filter = locale//LC_MESSAGES/core/index-single.po -source_file = locale/pot/core/index-single.pot -source_lang = en - -[mongodb-manual.core--import-export] -file_filter = locale//LC_MESSAGES/core/import-export.po -source_file = locale/pot/core/import-export.pot -source_lang = en - -[mongodb-manual.core--replica-set-secondary] -file_filter = locale//LC_MESSAGES/core/replica-set-secondary.po -source_file = locale/pot/core/replica-set-secondary.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-architectures-production] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-architectures-production.po -source_file = locale/pot/core/sharded-cluster-architectures-production.pot -source_lang = en - -[mongodb-manual.core--index-ttl] -file_filter = locale//LC_MESSAGES/core/index-ttl.po -source_file = locale/pot/core/index-ttl.pot -source_lang = en - -[mongodb-manual.core--index-sparse] -file_filter = locale//LC_MESSAGES/core/index-sparse.po -source_file = locale/pot/core/index-sparse.pot -source_lang = en - -[mongodb-manual.core--security] -file_filter = locale//LC_MESSAGES/core/security.po -source_file = locale/pot/core/security.pot -source_lang = en - -[mongodb-manual.core--index-types] -file_filter = locale//LC_MESSAGES/core/index-types.po -source_file = locale/pot/core/index-types.pot -source_lang = en - -[mongodb-manual.core--aggregation-pipeline-limits] -file_filter = locale//LC_MESSAGES/core/aggregation-pipeline-limits.po -source_file = locale/pot/core/aggregation-pipeline-limits.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-config-servers] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-config-servers.po -source_file = locale/pot/core/sharded-cluster-config-servers.pot -source_lang = en - -[mongodb-manual.core--index-compound] -file_filter = locale//LC_MESSAGES/core/index-compound.po -source_file = locale/pot/core/index-compound.pot -source_lang = en - -[mongodb-manual.core--replication-process] -file_filter = locale//LC_MESSAGES/core/replication-process.po -source_file = locale/pot/core/replication-process.pot -source_lang = en - -[mongodb-manual.core--capped-collections] -file_filter = locale//LC_MESSAGES/core/capped-collections.po -source_file = locale/pot/core/capped-collections.pot -source_lang = en - -[mongodb-manual.core--replica-set-elections] -file_filter = locale//LC_MESSAGES/core/replica-set-elections.po -source_file = locale/pot/core/replica-set-elections.pot -source_lang = en - -[mongodb-manual.core--geohaystack] -file_filter = locale//LC_MESSAGES/core/geohaystack.po -source_file = locale/pot/core/geohaystack.pot -source_lang = en - -[mongodb-manual.core--index-hashed] -file_filter = locale//LC_MESSAGES/core/index-hashed.po -source_file = locale/pot/core/index-hashed.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-architectures-test] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-architectures-test.po -source_file = locale/pot/core/sharded-cluster-architectures-test.pot -source_lang = en - -[mongodb-manual.core--replica-set-oplog] -file_filter = locale//LC_MESSAGES/core/replica-set-oplog.po -source_file = locale/pot/core/replica-set-oplog.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-metadata] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-metadata.po -source_file = locale/pot/core/sharded-cluster-metadata.pot -source_lang = en - -[mongodb-manual.core--read-preference] -file_filter = locale//LC_MESSAGES/core/read-preference.po -source_file = locale/pot/core/read-preference.pot -source_lang = en - -[mongodb-manual.core--master-slave] -file_filter = locale//LC_MESSAGES/core/master-slave.po -source_file = locale/pot/core/master-slave.pot -source_lang = en - -[mongodb-manual.core--distributed-write-operations] -file_filter = locale//LC_MESSAGES/core/distributed-write-operations.po -source_file = locale/pot/core/distributed-write-operations.pot -source_lang = en - -[mongodb-manual.core--sharding-balancing] -file_filter = locale//LC_MESSAGES/core/sharding-balancing.po -source_file = locale/pot/core/sharding-balancing.pot -source_lang = en - -[mongodb-manual.core--replica-set-high-availability] -file_filter = locale//LC_MESSAGES/core/replica-set-high-availability.po -source_file = locale/pot/core/replica-set-high-availability.pot -source_lang = en - -[mongodb-manual.core--introduction] -file_filter = locale//LC_MESSAGES/core/introduction.po -source_file = locale/pot/core/introduction.pot -source_lang = en - -[mongodb-manual.core--distributed-queries] -file_filter = locale//LC_MESSAGES/core/distributed-queries.po -source_file = locale/pot/core/distributed-queries.pot -source_lang = en - -[mongodb-manual.core--replica-set-priority-0-member] -file_filter = locale//LC_MESSAGES/core/replica-set-priority-0-member.po -source_file = locale/pot/core/replica-set-priority-0-member.pot -source_lang = en - -[mongodb-manual.core--query-plans] -file_filter = locale//LC_MESSAGES/core/query-plans.po -source_file = locale/pot/core/query-plans.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-operations] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-operations.po -source_file = locale/pot/core/sharded-cluster-operations.pot -source_lang = en - -[mongodb-manual.core--replica-set-sync] -file_filter = locale//LC_MESSAGES/core/replica-set-sync.po -source_file = locale/pot/core/replica-set-sync.pot -source_lang = en - -[mongodb-manual.core--sharding] -file_filter = locale//LC_MESSAGES/core/sharding.po -source_file = locale/pot/core/sharding.pot -source_lang = en - -[mongodb-manual.core--sharding-shard-key] -file_filter = locale//LC_MESSAGES/core/sharding-shard-key.po -source_file = locale/pot/core/sharding-shard-key.pot -source_lang = en - -[mongodb-manual.core--replica-set-architectures] -file_filter = locale//LC_MESSAGES/core/replica-set-architectures.po -source_file = locale/pot/core/replica-set-architectures.pot -source_lang = en - -[mongodb-manual.core--replica-set-members] -file_filter = locale//LC_MESSAGES/core/replica-set-members.po -source_file = locale/pot/core/replica-set-members.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-mechanics] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-mechanics.po -source_file = locale/pot/core/sharded-cluster-mechanics.pot -source_lang = en - -[mongodb-manual.core--write-operations] -file_filter = locale//LC_MESSAGES/core/write-operations.po -source_file = locale/pot/core/write-operations.pot -source_lang = en - -[mongodb-manual.core--server-side-javascript] -file_filter = locale//LC_MESSAGES/core/server-side-javascript.po -source_file = locale/pot/core/server-side-javascript.pot -source_lang = en - -[mongodb-manual.core--sharding-chunk-splitting] -file_filter = locale//LC_MESSAGES/core/sharding-chunk-splitting.po -source_file = locale/pot/core/sharding-chunk-splitting.pot -source_lang = en - -[mongodb-manual.core--crud] -file_filter = locale//LC_MESSAGES/core/crud.po -source_file = locale/pot/core/crud.pot -source_lang = en - -[mongodb-manual.core--write-concern] -file_filter = locale//LC_MESSAGES/core/write-concern.po -source_file = locale/pot/core/write-concern.pot -source_lang = en - -[mongodb-manual.core--operational-segregation] -file_filter = locale//LC_MESSAGES/core/operational-segregation.po -source_file = locale/pot/core/operational-segregation.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-components] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-components.po -source_file = locale/pot/core/sharded-cluster-components.pot -source_lang = en - -[mongodb-manual.core--auditing] -file_filter = locale//LC_MESSAGES/core/auditing.po -source_file = locale/pot/core/auditing.pot -source_lang = en - -[mongodb-manual.core--indexes-introduction] -file_filter = locale//LC_MESSAGES/core/indexes-introduction.po -source_file = locale/pot/core/indexes-introduction.pot -source_lang = en - -[mongodb-manual.core--shell-types] -file_filter = locale//LC_MESSAGES/core/shell-types.po -source_file = locale/pot/core/shell-types.pot -source_lang = en - -[mongodb-manual.core--data-models] -file_filter = locale//LC_MESSAGES/core/data-models.po -source_file = locale/pot/core/data-models.pot -source_lang = en - -[mongodb-manual.core--sharded-cluster-high-availability] -file_filter = locale//LC_MESSAGES/core/sharded-cluster-high-availability.po -source_file = locale/pot/core/sharded-cluster-high-availability.pot -source_lang = en - -[mongodb-manual.core--security-network] -file_filter = locale//LC_MESSAGES/core/security-network.po -source_file = locale/pot/core/security-network.pot -source_lang = en - -[mongodb-manual.core--map-reduce-sharded-collections] -file_filter = locale//LC_MESSAGES/core/map-reduce-sharded-collections.po -source_file = locale/pot/core/map-reduce-sharded-collections.pot -source_lang = en - -[mongodb-manual.core--index-properties] -file_filter = locale//LC_MESSAGES/core/index-properties.po -source_file = locale/pot/core/index-properties.pot -source_lang = en - -[mongodb-manual.core--replica-set-delayed-member] -file_filter = locale//LC_MESSAGES/core/replica-set-delayed-member.po -source_file = locale/pot/core/replica-set-delayed-member.pot -source_lang = en - -[mongodb-manual.core--geospatial-indexes] -file_filter = locale//LC_MESSAGES/core/geospatial-indexes.po -source_file = locale/pot/core/geospatial-indexes.pot -source_lang = en - -[mongodb-manual.core--sharding-introduction] -file_filter = locale//LC_MESSAGES/core/sharding-introduction.po -source_file = locale/pot/core/sharding-introduction.pot -source_lang = en - -[mongodb-manual.core--replication] -file_filter = locale//LC_MESSAGES/core/replication.po -source_file = locale/pot/core/replication.pot -source_lang = en - -[mongodb-manual.core--read-preference-mechanics] -file_filter = locale//LC_MESSAGES/core/read-preference-mechanics.po -source_file = locale/pot/core/read-preference-mechanics.pot -source_lang = en - -[mongodb-manual.core--aggregation-introduction] -file_filter = locale//LC_MESSAGES/core/aggregation-introduction.po -source_file = locale/pot/core/aggregation-introduction.pot -source_lang = en - -[mongodb-manual.core--map-reduce] -file_filter = locale//LC_MESSAGES/core/map-reduce.po -source_file = locale/pot/core/map-reduce.pot -source_lang = en - -[mongodb-manual.core--crud-introduction] -file_filter = locale//LC_MESSAGES/core/crud-introduction.po -source_file = locale/pot/core/crud-introduction.pot -source_lang = en - -[mongodb-manual.core--aggregation] -file_filter = locale//LC_MESSAGES/core/aggregation.po -source_file = locale/pot/core/aggregation.pot -source_lang = en - -[mongodb-manual.core--aggregation-pipeline-sharded-collections] -file_filter = locale//LC_MESSAGES/core/aggregation-pipeline-sharded-collections.po -source_file = locale/pot/core/aggregation-pipeline-sharded-collections.pot -source_lang = en - -[mongodb-manual.core--2dsphere] -file_filter = locale//LC_MESSAGES/core/2dsphere.po -source_file = locale/pot/core/2dsphere.pot -source_lang = en - -[mongodb-manual.core--bulk-inserts] -file_filter = locale//LC_MESSAGES/core/bulk-inserts.po -source_file = locale/pot/core/bulk-inserts.pot -source_lang = en - -[mongodb-manual.core--replica-set-rollbacks] -file_filter = locale//LC_MESSAGES/core/replica-set-rollbacks.po -source_file = locale/pot/core/replica-set-rollbacks.pot -source_lang = en - -[mongodb-manual.core--cursors] -file_filter = locale//LC_MESSAGES/core/cursors.po -source_file = locale/pot/core/cursors.pot -source_lang = en - -[mongodb-manual.core--write-performance] -file_filter = locale//LC_MESSAGES/core/write-performance.po -source_file = locale/pot/core/write-performance.pot -source_lang = en - -[mongodb-manual.core--read-operations] -file_filter = locale//LC_MESSAGES/core/read-operations.po -source_file = locale/pot/core/read-operations.pot -source_lang = en - -[mongodb-manual.tutorial--add-admin-user] -file_filter = locale//LC_MESSAGES/tutorial/add-admin-user.po -source_file = locale/pot/tutorial/add-admin-user.pot -source_lang = en - -[mongodb-manual.tutorial--verify-user-privileges] -file_filter = locale//LC_MESSAGES/tutorial/verify-user-privileges.po -source_file = locale/pot/tutorial/verify-user-privileges.pot -source_lang = en - -[mongodb-manual.tutorial--assign-role-to-user] -file_filter = locale//LC_MESSAGES/tutorial/assign-role-to-user.po -source_file = locale/pot/tutorial/assign-role-to-user.pot -source_lang = en - -[mongodb-manual.administration--security-checklist] -file_filter = locale//LC_MESSAGES/administration/security-checklist.po -source_file = locale/pot/administration/security-checklist.pot -source_lang = en - -[mongodb-manual.administration--security-user-role-management] -file_filter = locale//LC_MESSAGES/administration/security-user-role-management.po -source_file = locale/pot/administration/security-user-role-management.pot -source_lang = en - -[mongodb-manual.administration--install-enterprise] -file_filter = locale//LC_MESSAGES/administration/install-enterprise.po -source_file = locale/pot/administration/install-enterprise.pot -source_lang = en - -[mongodb-manual.tutorial--control-access-to-mongodb-windows-with-kerberos-authentication] -file_filter = locale//LC_MESSAGES/tutorial/control-access-to-mongodb-windows-with-kerberos-authentication.po -source_file = locale/pot/tutorial/control-access-to-mongodb-windows-with-kerberos-authentication.pot -source_lang = en - -[mongodb-manual.tutorial--enable-authentication-without-bypass] -file_filter = locale//LC_MESSAGES/tutorial/enable-authentication-without-bypass.po -source_file = locale/pot/tutorial/enable-authentication-without-bypass.pot -source_lang = en - -[mongodb-manual.tutorial--troubleshoot-kerberos] -file_filter = locale//LC_MESSAGES/tutorial/troubleshoot-kerberos.po -source_file = locale/pot/tutorial/troubleshoot-kerberos.pot -source_lang = en - -[mongodb-manual.tutorial--text-search-in-aggregation] -file_filter = locale//LC_MESSAGES/tutorial/text-search-in-aggregation.po -source_file = locale/pot/tutorial/text-search-in-aggregation.pot -source_lang = en - -[mongodb-manual.tutorial--perform-maintence-on-replica-set-members] -file_filter = locale//LC_MESSAGES/tutorial/perform-maintence-on-replica-set-members.po -source_file = locale/pot/tutorial/perform-maintence-on-replica-set-members.pot -source_lang = en - -[mongodb-manual.tutorial--authenticate-as-client] -file_filter = locale//LC_MESSAGES/tutorial/authenticate-as-client.po -source_file = locale/pot/tutorial/authenticate-as-client.pot -source_lang = en - -[mongodb-manual.meta--includes] -file_filter = locale//LC_MESSAGES/meta/includes.po -source_file = locale/pot/meta/includes.pot -source_lang = en - -[mongodb-manual.reference--text-search-languages] -file_filter = locale//LC_MESSAGES/reference/text-search-languages.po -source_file = locale/pot/reference/text-search-languages.pot -source_lang = en - -[mongodb-manual.reference--audit-message] -file_filter = locale//LC_MESSAGES/reference/audit-message.po -source_file = locale/pot/reference/audit-message.pot -source_lang = en - -[mongodb-manual.reference--built-in-roles] -file_filter = locale//LC_MESSAGES/reference/built-in-roles.po -source_file = locale/pot/reference/built-in-roles.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-text-search] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-text-search.po -source_file = locale/pot/reference/operator/aggregation-text-search.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation--meta] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation/meta.po -source_file = locale/pot/reference/operator/aggregation/meta.pot -source_lang = en - -[mongodb-manual.release-notes--2_4-changelog] -file_filter = locale//LC_MESSAGES/release-notes/2.4-changelog.po -source_file = locale/pot/release-notes/2.4-changelog.pot -source_lang = en - -[mongodb-manual.release-notes--2_6-compatibility] -file_filter = locale//LC_MESSAGES/release-notes/2.6-compatibility.po -source_file = locale/pot/release-notes/2.6-compatibility.pot -source_lang = en - -[mongodb-manual.release-notes--2_6-downgrade] -file_filter = locale//LC_MESSAGES/release-notes/2.6-downgrade.po -source_file = locale/pot/release-notes/2.6-downgrade.pot -source_lang = en - -[mongodb-manual.release-notes--2_6-upgrade-authorization] -file_filter = locale//LC_MESSAGES/release-notes/2.6-upgrade-authorization.po -source_file = locale/pot/release-notes/2.6-upgrade-authorization.pot -source_lang = en - -[mongodb-manual.administration--security-deployment] -file_filter = locale//LC_MESSAGES/administration/security-deployment.po -source_file = locale/pot/administration/security-deployment.pot -source_lang = en - -[mongodb-manual.tutorial--implement-redaction-with-multiple-tags] -file_filter = locale//LC_MESSAGES/tutorial/implement-redaction-with-multiple-tags.po -source_file = locale/pot/tutorial/implement-redaction-with-multiple-tags.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-enterprise-on-ubuntu] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-enterprise-on-ubuntu.po -source_file = locale/pot/tutorial/install-mongodb-enterprise-on-ubuntu.pot -source_lang = en - -[mongodb-manual.tutorial--control-access-to-document-content-with-field-level-security] -file_filter = locale//LC_MESSAGES/tutorial/control-access-to-document-content-with-field-level-security.po -source_file = locale/pot/tutorial/control-access-to-document-content-with-field-level-security.pot -source_lang = en - -[mongodb-manual.tutorial--backup-with-mongodump] -file_filter = locale//LC_MESSAGES/tutorial/backup-with-mongodump.po -source_file = locale/pot/tutorial/backup-with-mongodump.pot -source_lang = en - -[mongodb-manual.tutorial--backup-with-filesystem-snapshots] -file_filter = locale//LC_MESSAGES/tutorial/backup-with-filesystem-snapshots.po -source_file = locale/pot/tutorial/backup-with-filesystem-snapshots.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-enterprise-on-amazon] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-enterprise-on-amazon.po -source_file = locale/pot/tutorial/install-mongodb-enterprise-on-amazon.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-enterprise-on-red-hat-or-centos] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-enterprise-on-red-hat-or-centos.po -source_file = locale/pot/tutorial/install-mongodb-enterprise-on-red-hat-or-centos.pot -source_lang = en - -[mongodb-manual.tutorial--deploy-replica-set-with-auth] -file_filter = locale//LC_MESSAGES/tutorial/deploy-replica-set-with-auth.po -source_file = locale/pot/tutorial/deploy-replica-set-with-auth.pot -source_lang = en - -[mongodb-manual.tutorial--change-own-password-and-custom-data] -file_filter = locale//LC_MESSAGES/tutorial/change-own-password-and-custom-data.po -source_file = locale/pot/tutorial/change-own-password-and-custom-data.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-enterprise-on-suse] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-enterprise-on-suse.po -source_file = locale/pot/tutorial/install-mongodb-enterprise-on-suse.pot -source_lang = en - -[mongodb-manual.reference--aggregation-variables] -file_filter = locale//LC_MESSAGES/reference/aggregation-variables.po -source_file = locale/pot/reference/aggregation-variables.pot -source_lang = en - -[mongodb-manual.reference--operator--query--text] -file_filter = locale//LC_MESSAGES/reference/operator/query/text.po -source_file = locale/pot/reference/operator/query/text.pot -source_lang = en - -[mongodb-manual.reference--operator--projection--meta] -file_filter = locale//LC_MESSAGES/reference/operator/projection/meta.po -source_file = locale/pot/reference/operator/projection/meta.pot -source_lang = en - -[mongodb-manual.reference--command--planCacheListFilters] -file_filter = locale//LC_MESSAGES/reference/command/planCacheListFilters.po -source_file = locale/pot/reference/command/planCacheListFilters.pot -source_lang = en - -[mongodb-manual.reference--command--createIndexes] -file_filter = locale//LC_MESSAGES/reference/command/createIndexes.po -source_file = locale/pot/reference/command/createIndexes.pot -source_lang = en - -[mongodb-manual.reference--command--invalidateUserCache] -file_filter = locale//LC_MESSAGES/reference/command/invalidateUserCache.po -source_file = locale/pot/reference/command/invalidateUserCache.pot -source_lang = en - -[mongodb-manual.reference--command--planCacheClear] -file_filter = locale//LC_MESSAGES/reference/command/planCacheClear.po -source_file = locale/pot/reference/command/planCacheClear.pot -source_lang = en - -[mongodb-manual.reference--command--planCacheSetFilter] -file_filter = locale//LC_MESSAGES/reference/command/planCacheSetFilter.po -source_file = locale/pot/reference/command/planCacheSetFilter.pot -source_lang = en - -[mongodb-manual.reference--command--planCacheListPlans] -file_filter = locale//LC_MESSAGES/reference/command/planCacheListPlans.po -source_file = locale/pot/reference/command/planCacheListPlans.pot -source_lang = en - -[mongodb-manual.reference--command--planCacheClearFilters] -file_filter = locale//LC_MESSAGES/reference/command/planCacheClearFilters.po -source_file = locale/pot/reference/command/planCacheClearFilters.pot -source_lang = en - -[mongodb-manual.reference--command--parallelCollectionScan] -file_filter = locale//LC_MESSAGES/reference/command/parallelCollectionScan.po -source_file = locale/pot/reference/command/parallelCollectionScan.pot -source_lang = en - -[mongodb-manual.reference--command--shardConnPoolStats] -file_filter = locale//LC_MESSAGES/reference/command/shardConnPoolStats.po -source_file = locale/pot/reference/command/shardConnPoolStats.pot -source_lang = en - -[mongodb-manual.reference--command--nav-plan-cache] -file_filter = locale//LC_MESSAGES/reference/command/nav-plan-cache.po -source_file = locale/pot/reference/command/nav-plan-cache.pot -source_lang = en - -[mongodb-manual.reference--command--authSchemaUpgrade] -file_filter = locale//LC_MESSAGES/reference/command/authSchemaUpgrade.po -source_file = locale/pot/reference/command/authSchemaUpgrade.pot -source_lang = en - -[mongodb-manual.reference--command--planCacheListQueryShapes] -file_filter = locale//LC_MESSAGES/reference/command/planCacheListQueryShapes.po -source_file = locale/pot/reference/command/planCacheListQueryShapes.pot -source_lang = en - -[mongodb-manual.reference--method--PlanCache_getPlansByQuery] -file_filter = locale//LC_MESSAGES/reference/method/PlanCache.getPlansByQuery.po -source_file = locale/pot/reference/method/PlanCache.getPlansByQuery.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_initializeUnorderedBulkOp] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.initializeUnorderedBulkOp.po -source_file = locale/pot/reference/method/db.collection.initializeUnorderedBulkOp.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_getPlanCache] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.getPlanCache.po -source_file = locale/pot/reference/method/db.collection.getPlanCache.pot -source_lang = en - -[mongodb-manual.reference--method--WriteResult] -file_filter = locale//LC_MESSAGES/reference/method/WriteResult.po -source_file = locale/pot/reference/method/WriteResult.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_find_upsert] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.find.upsert.po -source_file = locale/pot/reference/method/Bulk.find.upsert.pot -source_lang = en - -[mongodb-manual.reference--method--db_upgradeCheckAllDBs] -file_filter = locale//LC_MESSAGES/reference/method/db.upgradeCheckAllDBs.po -source_file = locale/pot/reference/method/db.upgradeCheckAllDBs.pot -source_lang = en - -[mongodb-manual.reference--method--WriteResult_hasWriteConcernError] -file_filter = locale//LC_MESSAGES/reference/method/WriteResult.hasWriteConcernError.po -source_file = locale/pot/reference/method/WriteResult.hasWriteConcernError.pot -source_lang = en - -[mongodb-manual.reference--method--db_upgradeCheck] -file_filter = locale//LC_MESSAGES/reference/method/db.upgradeCheck.po -source_file = locale/pot/reference/method/db.upgradeCheck.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.po -source_file = locale/pot/reference/method/Bulk.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_find_updateOne] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.find.updateOne.po -source_file = locale/pot/reference/method/Bulk.find.updateOne.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_execute] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.execute.po -source_file = locale/pot/reference/method/Bulk.execute.pot -source_lang = en - -[mongodb-manual.reference--method--db_collection_initializeOrderedBulkOp] -file_filter = locale//LC_MESSAGES/reference/method/db.collection.initializeOrderedBulkOp.po -source_file = locale/pot/reference/method/db.collection.initializeOrderedBulkOp.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_find_remove] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.find.remove.po -source_file = locale/pot/reference/method/Bulk.find.remove.pot -source_lang = en - -[mongodb-manual.reference--method--PlanCache_listQueryShapes] -file_filter = locale//LC_MESSAGES/reference/method/PlanCache.listQueryShapes.po -source_file = locale/pot/reference/method/PlanCache.listQueryShapes.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_find_replaceOne] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.find.replaceOne.po -source_file = locale/pot/reference/method/Bulk.find.replaceOne.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_find_removeOne] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.find.removeOne.po -source_file = locale/pot/reference/method/Bulk.find.removeOne.pot -source_lang = en - -[mongodb-manual.reference--method--PlanCache_help] -file_filter = locale//LC_MESSAGES/reference/method/PlanCache.help.po -source_file = locale/pot/reference/method/PlanCache.help.pot -source_lang = en - -[mongodb-manual.reference--method--PlanCache_clear] -file_filter = locale//LC_MESSAGES/reference/method/PlanCache.clear.po -source_file = locale/pot/reference/method/PlanCache.clear.pot -source_lang = en - -[mongodb-manual.reference--method--js-bulk] -file_filter = locale//LC_MESSAGES/reference/method/js-bulk.po -source_file = locale/pot/reference/method/js-bulk.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_find] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.find.po -source_file = locale/pot/reference/method/Bulk.find.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_insert] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.insert.po -source_file = locale/pot/reference/method/Bulk.insert.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_find_update] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.find.update.po -source_file = locale/pot/reference/method/Bulk.find.update.pot -source_lang = en - -[mongodb-manual.reference--method--PlanCache_clearPlansByQuery] -file_filter = locale//LC_MESSAGES/reference/method/PlanCache.clearPlansByQuery.po -source_file = locale/pot/reference/method/PlanCache.clearPlansByQuery.pot -source_lang = en - -[mongodb-manual.reference--method--js-plan-cache] -file_filter = locale//LC_MESSAGES/reference/method/js-plan-cache.po -source_file = locale/pot/reference/method/js-plan-cache.pot -source_lang = en - -[mongodb-manual.reference--method--WriteResult_hasWriteError] -file_filter = locale//LC_MESSAGES/reference/method/WriteResult.hasWriteError.po -source_file = locale/pot/reference/method/WriteResult.hasWriteError.pot -source_lang = en - -[mongodb-manual.core--kerberos] -file_filter = locale//LC_MESSAGES/core/kerberos.po -source_file = locale/pot/core/kerberos.pot -source_lang = en - -[mongodb-manual.core--authorization] -file_filter = locale//LC_MESSAGES/core/authorization.po -source_file = locale/pot/core/authorization.pot -source_lang = en - -[mongodb-manual.core--authentication] -file_filter = locale//LC_MESSAGES/core/authentication.po -source_file = locale/pot/core/authentication.pot -source_lang = en - -[mongodb-manual.core--storage] -file_filter = locale//LC_MESSAGES/core/storage.po -source_file = locale/pot/core/storage.pot -source_lang = en - -[mongodb-manual.core--read-operations-introduction] -file_filter = locale//LC_MESSAGES/core/read-operations-introduction.po -source_file = locale/pot/core/read-operations-introduction.pot -source_lang = en - -[mongodb-manual.core--write-operations-introduction] -file_filter = locale//LC_MESSAGES/core/write-operations-introduction.po -source_file = locale/pot/core/write-operations-introduction.pot -source_lang = en - -[mongodb-manual.core--index-intersection] -file_filter = locale//LC_MESSAGES/core/index-intersection.po -source_file = locale/pot/core/index-intersection.pot -source_lang = en - -[mongodb-manual.release-notes--2_6-changelog] -file_filter = locale//LC_MESSAGES/release-notes/2.6-changelog.po -source_file = locale/pot/release-notes/2.6-changelog.pot -source_lang = en - -[mongodb-manual.tutorial--implement-field-level-redaction] -file_filter = locale//LC_MESSAGES/tutorial/implement-field-level-redaction.po -source_file = locale/pot/tutorial/implement-field-level-redaction.pot -source_lang = en - -[mongodb-manual.tutorial--install-mongodb-enterprise-on-debian] -file_filter = locale//LC_MESSAGES/tutorial/install-mongodb-enterprise-on-debian.po -source_file = locale/pot/tutorial/install-mongodb-enterprise-on-debian.pot -source_lang = en - -[mongodb-manual.tutorial--configure-ldap-sasl-activedirectory] -file_filter = locale//LC_MESSAGES/tutorial/configure-ldap-sasl-activedirectory.po -source_file = locale/pot/tutorial/configure-ldap-sasl-activedirectory.pot -source_lang = en - -[mongodb-manual.tutorial--configure-ldap-sasl-openldap] -file_filter = locale//LC_MESSAGES/tutorial/configure-ldap-sasl-openldap.po -source_file = locale/pot/tutorial/configure-ldap-sasl-openldap.pot -source_lang = en - -[mongodb-manual.tutorial--configure-ssl-clients] -file_filter = locale//LC_MESSAGES/tutorial/configure-ssl-clients.po -source_file = locale/pot/tutorial/configure-ssl-clients.pot -source_lang = en - -[mongodb-manual.tutorial--model-monetary-data] -file_filter = locale//LC_MESSAGES/tutorial/model-monetary-data.po -source_file = locale/pot/tutorial/model-monetary-data.pot -source_lang = en - -[mongodb-manual.tutorial--configure-fips] -file_filter = locale//LC_MESSAGES/tutorial/configure-fips.po -source_file = locale/pot/tutorial/configure-fips.pot -source_lang = en - -[mongodb-manual.tutorial--configure-x509-client-authentication] -file_filter = locale//LC_MESSAGES/tutorial/configure-x509-client-authentication.po -source_file = locale/pot/tutorial/configure-x509-client-authentication.pot -source_lang = en - -[mongodb-manual.tutorial--configure-x509-member-authentication] -file_filter = locale//LC_MESSAGES/tutorial/configure-x509-member-authentication.po -source_file = locale/pot/tutorial/configure-x509-member-authentication.pot -source_lang = en - -[mongodb-manual.tutorial--verify-mongodb-packages] -file_filter = locale//LC_MESSAGES/tutorial/verify-mongodb-packages.po -source_file = locale/pot/tutorial/verify-mongodb-packages.pot -source_lang = en - -[mongodb-manual.tutorial--modify-an-index] -file_filter = locale//LC_MESSAGES/tutorial/modify-an-index.po -source_file = locale/pot/tutorial/modify-an-index.pot -source_lang = en - -[mongodb-manual.meta--aggregation-quick-reference] -file_filter = locale//LC_MESSAGES/meta/aggregation-quick-reference.po -source_file = locale/pot/meta/aggregation-quick-reference.pot -source_lang = en - -[mongodb-manual.reference--operator--aggregation-literal] -file_filter = locale//LC_MESSAGES/reference/operator/aggregation-literal.po -source_file = locale/pot/reference/operator/aggregation-literal.pot -source_lang = en - -[mongodb-manual.reference--operator--query--minDistance] -file_filter = locale//LC_MESSAGES/reference/operator/query/minDistance.po -source_file = locale/pot/reference/operator/query/minDistance.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_toString] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.toString.po -source_file = locale/pot/reference/method/Bulk.toString.pot -source_lang = en - -[mongodb-manual.reference--method--BulkWriteResult] -file_filter = locale//LC_MESSAGES/reference/method/BulkWriteResult.po -source_file = locale/pot/reference/method/BulkWriteResult.pot -source_lang = en - -[mongodb-manual.reference--method--db_serverCmdLineOpts] -file_filter = locale//LC_MESSAGES/reference/method/db.serverCmdLineOpts.po -source_file = locale/pot/reference/method/db.serverCmdLineOpts.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_getOperations] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.getOperations.po -source_file = locale/pot/reference/method/Bulk.getOperations.pot -source_lang = en - -[mongodb-manual.reference--method--Bulk_tojson] -file_filter = locale//LC_MESSAGES/reference/method/Bulk.tojson.po -source_file = locale/pot/reference/method/Bulk.tojson.pot -source_lang = en - -[mongodb-manual.core--collection-level-access-control] -file_filter = locale//LC_MESSAGES/core/collection-level-access-control.po -source_file = locale/pot/core/collection-level-access-control.pot -source_lang = en - diff --git a/source/includes/5.0-changes/removed-parameters.rst b/source/includes/5.0-changes/removed-parameters.rst index 22b7d73e3bd..6edca637825 100644 --- a/source/includes/5.0-changes/removed-parameters.rst +++ b/source/includes/5.0-changes/removed-parameters.rst @@ -20,3 +20,19 @@ MongoDB 5.0 removes the following server parameters: parameter. In 5.0+, collection and index creation inside of transactions is always enabled. You can no longer use the server parameter to disable this behavior. + + * - ``connPoolMaxShardedConnsPerHost`` + + - MongoDB 5.0 removes the ``connPoolMaxShardedConnsPerHost`` server + parameter. + + * - ``connPoolMaxShardedInUseConnsPerHost`` + + - MongoDB 5.0 removes the ``connPoolMaxShardedInUseConnsPerHost`` server + parameter. + + * - ``shardedConnPoolIdleTimeoutMinutes`` + + - MongoDB 5.0 removes the ``shardedConnPoolIdleTimeoutMinutes`` server + parameter. + diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 4a705df575d..c47e303f2a4 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -1163,55 +1163,6 @@ General Parameters } ) -.. parameter:: connPoolMaxShardedConnsPerHost - - |both| - - *Default*: 200 - - Sets the maximum size of the legacy connection pools for communication to the - shards. The size of a pool does not prevent the creation of - additional connections, but *does* prevent the connection pools from - retaining connections above this limit. - - .. note:: - - The parameter is separate from the connections in TaskExecutor - pools. See :parameter:`ShardingTaskExecutorPoolMaxSize`. - - Increase the :parameter:`connPoolMaxShardedConnsPerHost` value - **only** if the number of connections in a connection pool has a - high level of churn or if the total number of created connections - increase. - - You can only set :parameter:`connPoolMaxShardedConnsPerHost` during - startup in the config file or on the command line. For example: - - .. code-block:: bash - - mongos --setParameter connPoolMaxShardedConnsPerHost=250 - - -.. parameter:: connPoolMaxShardedInUseConnsPerHost - - |both| - - Sets the maximum number of in-use connections at any given time for - the legacy sharded cluster connection pools. - - By default, the parameter is unset. - - You can only set :parameter:`connPoolMaxShardedConnsPerHost` during - startup in the config file or on the command line. For example: - - .. code-block:: bash - - mongos --setParameter connPoolMaxShardedInUseConnsPerHost=100 - - .. seealso:: - - :parameter:`connPoolMaxShardedConnsPerHost` - .. parameter:: httpVerboseLogging |both| @@ -1227,25 +1178,6 @@ General Parameters mongos --setParameter httpVerboseLogging=true -.. parameter:: shardedConnPoolIdleTimeoutMinutes - - |both| - - Sets the time limit that a connection in the legacy sharded cluster - connection pool can remain idle before being closed. - - By default, the parameter is unset. - - You can only set :parameter:`shardedConnPoolIdleTimeoutMinutes` during - startup in the config file or on the command line. For example: - - .. code-block:: bash - - mongos --setParameter shardedConnPoolIdleTimeoutMinutes=10 - - .. seealso:: - - :parameter:`connPoolMaxShardedConnsPerHost` .. parameter:: slowConnectionThresholdMillis @@ -1343,10 +1275,6 @@ General Parameters mongos --setParameter globalConnPoolIdleTimeoutMinutes=10 - .. seealso:: - - :parameter:`connPoolMaxShardedConnsPerHost` - .. parameter:: cursorTimeoutMillis |both| From b4beb716fdb74b107fd6a39dac71e475ebdb5c5e Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:51:27 -0600 Subject: [PATCH 092/308] DOCSP-36124 Adds upsertedCount to updateOne and updateMany (#6152) * DOCSP-36124 Adds upsertedCount to updateOne and updateMany * Adds upsertedCount to examples --- source/reference/method/db.collection.updateMany.txt | 5 ++++- source/reference/method/db.collection.updateOne.txt | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/reference/method/db.collection.updateMany.txt b/source/reference/method/db.collection.updateMany.txt index b37e053e2c4..4de88ca0cab 100644 --- a/source/reference/method/db.collection.updateMany.txt +++ b/source/reference/method/db.collection.updateMany.txt @@ -185,6 +185,8 @@ The method returns a document that contains: - ``upsertedId`` containing the ``_id`` for the upserted document +- ``upsertedCount`` containing the number of upserted documents + Access Control -------------- @@ -589,7 +591,8 @@ The operation returns: "acknowledged" : true, "matchedCount" : 0, "modifiedCount" : 0, - "upsertedId" : ObjectId("56fc5dcb39ee682bdc609b02") + "upsertedId" : ObjectId("56fc5dcb39ee682bdc609b02"), + "upsertedCount": 1 } The collection now contains the following documents: diff --git a/source/reference/method/db.collection.updateOne.txt b/source/reference/method/db.collection.updateOne.txt index 57712b3f152..f0fdbbddb97 100644 --- a/source/reference/method/db.collection.updateOne.txt +++ b/source/reference/method/db.collection.updateOne.txt @@ -180,7 +180,9 @@ The method returns a document that contains: - ``modifiedCount`` containing the number of modified documents -- ``upsertedId`` containing the ``_id`` for the upserted document. +- ``upsertedId`` containing the ``_id`` for the upserted document + +- ``upsertedCount`` containing the number of upserted documents - A boolean ``acknowledged`` as ``true`` if the operation ran with :term:`write concern` or ``false`` if write concern was disabled @@ -659,7 +661,8 @@ Since ``upsert:true`` the document is ``inserted`` based on the ``filter`` and "acknowledged" : true, "matchedCount" : 0, "modifiedCount" : 0, - "upsertedId" : 4 + "upsertedId" : 4, + "upsertedCount": 1 } The collection now contains the following documents: From 681f892c138b10c86ef5b54dbdf38c412078a166 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Mon, 5 Feb 2024 14:06:14 -0500 Subject: [PATCH 093/308] (DOCSP-36260): Use isNumber in filter examples (#6217) * (DOCSP-36260): Use isNumber in filter examples * fix line highlights --- .../reference/operator/aggregation/filter.txt | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/source/reference/operator/aggregation/filter.txt b/source/reference/operator/aggregation/filter.txt index af049356bd4..492a0e0025d 100644 --- a/source/reference/operator/aggregation/filter.txt +++ b/source/reference/operator/aggregation/filter.txt @@ -105,10 +105,7 @@ Behavior $filter: { input: [ 1, "a", 2, null, 3.1, NumberLong(4), "5" ], as: "num", - cond: { $and: [ - { $gte: [ "$$num", NumberLong("-9223372036854775807") ] }, - { $lte: [ "$$num", NumberLong("9223372036854775807") ] } - ] } + cond: { $isNumber: "$$num" } } } @@ -116,16 +113,13 @@ Behavior * - .. code-block:: javascript :copyable: false - :emphasize-lines: 9 + :emphasize-lines: 6 { $filter: { input: [ 1, "a", 2, null, 3.1, NumberLong(4), "5" ], as: "num", - cond: { $and:[ - { $gte: [ "$$num", NumberLong("-9223372036854775807") ] }, - { $lte: [ "$$num", NumberLong("9223372036854775807") ] } - ] }, + cond: { $isNumber: "$$num" }, limit: 2 } } @@ -134,17 +128,14 @@ Behavior * - .. code-block:: javascript :copyable: false - :emphasize-lines: 9 + :emphasize-lines: 6 { $filter: { input: [ 1, "a", 2, null, 3.1, NumberLong(4), "5" ], as: "num", - cond: { $and:[ - { $gte: [ "$$num", NumberLong("-9223372036854775807") ] }, - { $lte: [ "$$num", NumberLong("9223372036854775807") ] } - ] }, - limit: { $add: [ 0, 1 ]} + cond: { $isNumber: "$$num" }, + limit: { $add: [ 0, 1 ] } } } From 7764f517756eed2372627b1432b56489ea63ff96 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Mon, 5 Feb 2024 14:21:09 -0800 Subject: [PATCH 094/308] DOCSP-36171-reshard-update (#6211) * DOCSP-36171-reshard-update * DOCSP-36171-reshard-update --------- Co-authored-by: jason-price-mongodb --- source/reference/command/reshardCollection.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/reference/command/reshardCollection.txt b/source/reference/command/reshardCollection.txt index a0396a970b7..ad5151be135 100644 --- a/source/reference/command/reshardCollection.txt +++ b/source/reference/command/reshardCollection.txt @@ -58,7 +58,7 @@ The command has the following syntax: }, ... ], - forceDistribution: + forceRedistribution: } ) @@ -113,7 +113,7 @@ The command takes the following fields: * - ``collation`` - document - - Optional. If the collection specified to ``reshardCollection`` + - Optional. If the collection specified in ``reshardCollection`` has a default :ref:`collation `, you *must* include a collation document with ``{ locale : "simple" }``, or the ``reshardCollection`` command fails. @@ -125,8 +125,8 @@ The command takes the following fields: * - ``forceRedistribution`` - boolean - - Optional. When set to ``true``, the operation executes even if the new - shard key is the same as the old shard key. Use with the + - Optional. If set to ``true``, the operation runs even if the new + shard key is the same as the old shard key. Use with the ``zones`` option to move data to specific zones. .. versionadded:: 7.2 @@ -201,8 +201,8 @@ Commit Phase :ref:`sharding-resharding` -Example -------- +Examples +-------- Reshard a Collection ~~~~~~~~~~~~~~~~~~~~ @@ -217,9 +217,10 @@ new shard key ``{ order_id: 1 }``: key: { order_id: 1 } }) -MongoDB returns the following: +Output: .. code-block:: javascript + :copyable: false { ok: 1, From 46c6ab69793564bb49076f7fb3b076e8b652aa5a Mon Sep 17 00:00:00 2001 From: Sarah Olson <98367156+sarah-olson-mongodb@users.noreply.github.com> Date: Tue, 6 Feb 2024 08:01:21 -0800 Subject: [PATCH 095/308] Docsp 36255 -- Build error cleanup (#6246) * DOCSP-36255: Remove link to 2.6 release notes * DOCSP-36255: missing link build error fix * DOCSP-36255: Build error fix * DOCSP-36255: Build error fix * DOCSP-36255: Build error fix --- source/core/replica-set-write-concern.txt | 4 ---- source/includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst | 2 +- source/release-notes/3.0-compatibility.txt | 2 +- source/release-notes/3.0-upgrade.txt | 4 +--- source/release-notes/4.2.txt | 6 +++--- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/source/core/replica-set-write-concern.txt b/source/core/replica-set-write-concern.txt index 7840c04de6c..1d259a4ee8c 100644 --- a/source/core/replica-set-write-concern.txt +++ b/source/core/replica-set-write-concern.txt @@ -110,10 +110,6 @@ operation. Refer to the documentation for the write operation for instructions on write concern support and syntax. For complete documentation on write concern, see :ref:`write-concern`. -.. seealso:: - - :ref:`write-methods-incompatibility` - .. _repl-set-modify-default-write-concern: Modify Default Write Concern diff --git a/source/includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst b/source/includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst index 3f6df2e4406..6336f9f4d6f 100644 --- a/source/includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst +++ b/source/includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst @@ -1,7 +1,7 @@ When starting a :binary:`~bin.mongod` instance with :ref:`TLS/SSL enabled `, you must specify a value for the :option:`--tlsCAFile ` flag, the -:setting:`tls.CAFile` configuration option, or the :parameter:`tlsUseSystemCA` +:setting:`net.tls.CAFile` configuration option, or the :parameter:`tlsUseSystemCA` parameter. ``--tlsCAFile``, ``tls.CAFile``, and ``tlsUseSystemCA`` are all mutually diff --git a/source/release-notes/3.0-compatibility.txt b/source/release-notes/3.0-compatibility.txt index d7bda355d65..3cf2c4ecdca 100644 --- a/source/release-notes/3.0-compatibility.txt +++ b/source/release-notes/3.0-compatibility.txt @@ -327,7 +327,7 @@ If you do not currently have any users *or* you are using ``authSchema`` version 1, the query will not return any result. If your ``authSchema`` version is less -than ``3`` or the query does not return any results, see :doc:`/release-notes/2.6-upgrade-authorization` to +than ``3`` or the query does not return any results, see the 2.6 Upgrade Authorization to upgrade the ``authSchema`` version before upgrading to MongoDB 3.0. After upgrading MongoDB to 3.0 from 2.6, to use the new ``SCRAM-SHA-1`` diff --git a/source/release-notes/3.0-upgrade.txt b/source/release-notes/3.0-upgrade.txt index 745f72f79da..eaed9729efc 100644 --- a/source/release-notes/3.0-upgrade.txt +++ b/source/release-notes/3.0-upgrade.txt @@ -49,9 +49,7 @@ version earlier than MongoDB 2.4. If your existing MongoDB deployment is already running with authentication and authorization, your user data model ``authSchema`` must be at least version 3. To verify the version of your existing -``authSchema``, see :ref:`legacy-auth-model-removed`. To upgrade your -``authSchema`` version, see -:ref:`Upgrade Authorization Data <2.6-upgrade-authorization-model>` for details. +``authSchema``, see :ref:`legacy-auth-model-removed`. Preparedness ~~~~~~~~~~~~ diff --git a/source/release-notes/4.2.txt b/source/release-notes/4.2.txt index 2fb8a33fd00..af57018f96a 100644 --- a/source/release-notes/4.2.txt +++ b/source/release-notes/4.2.txt @@ -1808,11 +1808,11 @@ the following output changes: ` * - :serverstatus:`metrics.repl` - - Added new :serverstatus:`metrics.repl.stepDown` metrics: + - Added new ``metrics.repl.stepDown`` metrics: - - :serverstatus:`metrics.repl.stepDown.userOperationsKilled` + - ``metrics.repl.stepDown.userOperationsKilled`` - - :serverstatus:`metrics.repl.stepDown.userOperationsRunning` + - ``metrics.repl.stepDown.userOperationsRunning`` * - :serverstatus:`transactions` From 6e3d7e7011a41d40778ec56e2aa7bd26d7010df1 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:35:12 -0600 Subject: [PATCH 096/308] DOCSP-35881 Atlas support for Authentication methods (#6120) Co-authored-by: pierwill --- source/reference/method/db.auth.txt | 15 +++++++++++++++ source/reference/method/db.logout.txt | 14 ++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/source/reference/method/db.auth.txt b/source/reference/method/db.auth.txt index 49ecd86e812..d6c29785044 100644 --- a/source/reference/method/db.auth.txt +++ b/source/reference/method/db.auth.txt @@ -26,6 +26,21 @@ Definition .. include:: /includes/extracts/4.4-changes-passwordPrompt.rst + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Syntax ------ diff --git a/source/reference/method/db.logout.txt b/source/reference/method/db.logout.txt index cf6844ffb8c..9a010e59568 100644 --- a/source/reference/method/db.logout.txt +++ b/source/reference/method/db.logout.txt @@ -39,3 +39,17 @@ db.logout() :method:`db.logout()` function provides a wrapper around the database command :dbcommand:`logout`. + + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst From ccf4d346b5f6a374959f738228a9b4e5d571c491 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Tue, 6 Feb 2024 10:35:55 -0600 Subject: [PATCH 097/308] DOCSP-35882 Atlas support for User Management methods (#6130) * DOCSP-35873 Test * edit update include --------- Co-authored-by: pierwill --- ...fact-environments-atlas-support-no-free-or-m10.rst | 2 +- source/reference/method/db.createUser.txt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/source/includes/fact-environments-atlas-support-no-free-or-m10.rst b/source/includes/fact-environments-atlas-support-no-free-or-m10.rst index 8a2b00e7ea0..ffb00e55122 100644 --- a/source/includes/fact-environments-atlas-support-no-free-or-m10.rst +++ b/source/includes/fact-environments-atlas-support-no-free-or-m10.rst @@ -1,4 +1,4 @@ .. note:: - This command has *no support* in M0, M2, M5, and M10 clusters. + This |command| has *limited support* in M0, M2, M5, and M10 clusters. For more information, see :atlas:`Unsupported Commands `. diff --git a/source/reference/method/db.createUser.txt b/source/reference/method/db.createUser.txt index 7b4bbc51077..c6c29fbd835 100644 --- a/source/reference/method/db.createUser.txt +++ b/source/reference/method/db.createUser.txt @@ -187,7 +187,18 @@ Definition The client digests the password and passes the digested password to the server. +Compatibility +------------- +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst Roles ~~~~~ From ac08b38a1dd796f5d6fcc4741e1dce230e3fb019 Mon Sep 17 00:00:00 2001 From: jocelyn-mendez1 <91144778+jocelyn-mendez1@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:06:14 -0500 Subject: [PATCH 098/308] DOCSP-28324 Update getShardDistribution method syntax (#6241) * DOCSP-28324 remove tip and update syntax * DOCSP-28324 fix build error * DOCSP-28324 fix build error --- .../db.collection.getShardDistribution.txt | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/source/reference/method/db.collection.getShardDistribution.txt b/source/reference/method/db.collection.getShardDistribution.txt index b761e097295..09d1238dee4 100644 --- a/source/reference/method/db.collection.getShardDistribution.txt +++ b/source/reference/method/db.collection.getShardDistribution.txt @@ -22,20 +22,15 @@ Definition Prints the data distribution statistics for a :term:`sharded ` collection. - .. tip:: - - Before running the method, use the :dbcommand:`flushRouterConfig` - command to refresh the cached routing table to avoid returning - stale distribution information for the collection. Once - refreshed, run :method:`db.collection.getShardDistribution()` for - the collection you wish to build the index. +Syntax +------ - For example: +The :method:`~db.collection.getShardDistribution()` method has the following +form: - .. code-block:: javascript +.. code-block:: javascript - db.adminCommand( { flushRouterConfig: "test.myShardedCollection" } ); - db.getSiblingDB("test").myShardedCollection.getShardDistribution(); + db.collection.getShardDistribution() .. seealso:: From 92fd2b9add37f42da4524d55f400c8b1d267ef59 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:06:44 -0500 Subject: [PATCH 099/308] DOCSP-36128 updating lookup performance (#6139) * DOCSP-36128 updating lookup performance * DOCSP-36128 updating lookup performance --- source/reference/operator/aggregation/lookup.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/source/reference/operator/aggregation/lookup.txt b/source/reference/operator/aggregation/lookup.txt index 538a6c1001e..b1ba0f4a93e 100644 --- a/source/reference/operator/aggregation/lookup.txt +++ b/source/reference/operator/aggregation/lookup.txt @@ -557,13 +557,9 @@ different ``$lookup`` operations. - .. _uncorrelated-subqueries-performance: - - An index on the foreign collection cannot support uncorrelated - subqueries. - - - To improve performance for uncorrelated subqueries, use generic - indexing strategies and query optimization techniques. For - example, add appropriate indexes to support aggregation stages - before ``$lookup``. + - ``$lookup`` operations that contain uncorrelated subqueries + perform better when the inner pipeline can reference an + index of the foreign collection. - MongoDB only needs to run the ``$lookup`` subquery once before caching the query because there is no relationship between the From b69a18d875c1c3df9d14053bbe14f5d979e1e16d Mon Sep 17 00:00:00 2001 From: jocelyn-mendez1 <91144778+jocelyn-mendez1@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:07:18 -0500 Subject: [PATCH 100/308] DOCSP-34433 Add array brackets to dropIndex example (#6245) * DOCSP-34433 add array * DOCSP-34433 fix spacing --- source/core/indexes/drop-index.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/indexes/drop-index.txt b/source/core/indexes/drop-index.txt index 483e4fb34f5..652404f09dd 100644 --- a/source/core/indexes/drop-index.txt +++ b/source/core/indexes/drop-index.txt @@ -77,7 +77,7 @@ method and specify an array of index names: .. code-block:: javascript - db..dropIndexes("", "", "") + db..dropIndexes( [ "", "", "" ] ) Drop All Indexes Except the ``_id`` Index ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 2b6b082fdc617255db57baf7fe753ccbbbfcff9e Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Tue, 6 Feb 2024 12:07:38 -0500 Subject: [PATCH 101/308] DOCS-16595 New planCache Query Counter (#6068) --- source/reference/command/serverStatus.txt | 20 ++++++++++++++++++-- source/release-notes/7.3.txt | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index 7c4a20dc61a..83346bd13ff 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -3907,11 +3907,13 @@ planCache totalSizeEstimateBytes : Long(""), classic : { hits : Long(""), - misses : Long("") + misses : Long(""), + skipped : Long("") }, sbe : { hits : Long(""), - misses: Long("") + misses: Long(""), + skipped : Long("") } } @@ -3948,6 +3950,13 @@ planCache Number of classic execution engine query plans which were not found in the query cache and went through the query planning phase. +.. serverstatus:: planCache.classic.skipped + + Number of classic execution engine query plans that were not found in the + query cache because the query is ineligible for caching. + + .. versionadded:: 7.3 + .. serverstatus:: planCache.sbe.hits Number of |sbe-short| query plans found in the query @@ -3958,6 +3967,13 @@ planCache Number of |sbe-short| plans which were not found in the query cache and went through the query planning phase. +.. serverstatus:: planCache.sbe.skipped + + Number of |sbe-short| query plans that were not found in the + query cache because the query is ineligible for caching. + + .. versionadded:: 7.3 + .. _server-status-queryStats: queryStats diff --git a/source/release-notes/7.3.txt b/source/release-notes/7.3.txt index f966cca98cc..2bb97025a6d 100644 --- a/source/release-notes/7.3.txt +++ b/source/release-notes/7.3.txt @@ -39,4 +39,5 @@ includes the following new metrics: - :serverstatus:`metrics.repl.waiters.replication` - :serverstatus:`metrics.repl.waiters.opTime` - +- :serverstatus:`planCache.classic.skipped` +- :serverstatus:`planCache.sbe.skipped` From 118bef29dd19f25fbe6b8fecd72c1f272d5b499a Mon Sep 17 00:00:00 2001 From: Nick Villahermosa Date: Tue, 6 Feb 2024 13:39:07 -0500 Subject: [PATCH 102/308] Fixed links to point to QE (#6249) --- source/reference/command/create.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/reference/command/create.txt b/source/reference/command/create.txt index c53271c12a0..1fa3286b2e3 100644 --- a/source/reference/command/create.txt +++ b/source/reference/command/create.txt @@ -358,11 +358,11 @@ The ``create`` command has the following fields: * - ``encryptedFields`` - document - Optional. A document that configures :ref:`queryable encryption - ` for the collection being created. + ` for the collection being created. .. include:: /includes/fact-encryptedFieldsConfig-intro.rst - For details, see :ref:``. + For details, see :ref:``. * - ``comment`` - any From 43e0f613b254332afcb26be5654f1d22ef587d9c Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:15:31 -0600 Subject: [PATCH 103/308] DOCSP-36105 fsync Carification (#6255) * DOCSP-36105 fsync clarification * Replaces versionadded text with fsycn-mongos * Fixes method text * Adds facets --- source/includes/fsync-mongos.rst | 3 +++ source/reference/command/fsync.txt | 9 ++++++--- source/reference/command/fsyncUnlock.txt | 8 ++++++-- source/reference/method/db.fsyncLock.txt | 8 ++++++-- source/reference/method/db.fsyncUnlock.txt | 8 ++++++-- 5 files changed, 27 insertions(+), 9 deletions(-) create mode 100644 source/includes/fsync-mongos.rst diff --git a/source/includes/fsync-mongos.rst b/source/includes/fsync-mongos.rst new file mode 100644 index 00000000000..8c2f82447a1 --- /dev/null +++ b/source/includes/fsync-mongos.rst @@ -0,0 +1,3 @@ + +When the |fsync| runs on :program:`mongos`, it performs the fysnc operation on the +primary config server as well as the primary members of each shard in the cluster. diff --git a/source/reference/command/fsync.txt b/source/reference/command/fsync.txt index dc2c07976b6..3461ab59b57 100644 --- a/source/reference/command/fsync.txt +++ b/source/reference/command/fsync.txt @@ -4,6 +4,10 @@ fsync .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -26,9 +30,8 @@ Definition .. versionadded:: 7.1 - When the ``fsync`` command runs on :program:`mongos`, it performs the - fsync operation on each shard in the cluster. - + .. |fsync| replace:: ``fsync`` command + .. include:: /includes/fsync-mongos As applications write data, MongoDB records the data in the storage layer and then writes the data to disk within the diff --git a/source/reference/command/fsyncUnlock.txt b/source/reference/command/fsyncUnlock.txt index ea34ac43dfd..a90c26e073d 100644 --- a/source/reference/command/fsyncUnlock.txt +++ b/source/reference/command/fsyncUnlock.txt @@ -4,6 +4,10 @@ fsyncUnlock .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -25,8 +29,8 @@ Definition .. versionadded:: 7.1 - When the ``fsyncUnlock`` command runs on :program:`mongos`, it - reduces the lock count for each shard in the cluster. + .. |fsync| replace:: ``fsyncUnlock`` command + .. include:: /includes/fsync-mongos Use this command to unblock writes after you finish a backup operation. diff --git a/source/reference/method/db.fsyncLock.txt b/source/reference/method/db.fsyncLock.txt index 4b0603f7f6c..27ecf10879c 100644 --- a/source/reference/method/db.fsyncLock.txt +++ b/source/reference/method/db.fsyncLock.txt @@ -4,6 +4,10 @@ db.fsyncLock() .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -24,8 +28,8 @@ Definition .. versionadded:: 7.1 - When the ``db.fsyncLock`` method runs on :program:`mongos`, it applies an - fsync lock to each shard in the cluster. + .. |fsync| replace:: ``db.fsyncLock()`` method + .. include:: /includes/fsync-mongos .. |dbcommand| replace:: :dbcommand:`fsync` command .. include:: /includes/fact-mongosh-shell-method-alt.rst diff --git a/source/reference/method/db.fsyncUnlock.txt b/source/reference/method/db.fsyncUnlock.txt index d04c336e323..d9a0b2065dc 100644 --- a/source/reference/method/db.fsyncUnlock.txt +++ b/source/reference/method/db.fsyncUnlock.txt @@ -4,6 +4,10 @@ db.fsyncUnlock() .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -23,8 +27,8 @@ Definition .. versionadded:: 7.1 - When the ``db.fsyncUnlock()`` method runs on :program:`mongos`, it - reduces the lock count for each shard in the cluster. + .. |fsync| replace:: ``db.fsyncUnlock()`` method + .. include:: /includes/fsync-mongos .. |dbcommand| replace:: :dbcommand:`fsyncUnlock` command .. include:: /includes/fact-mongosh-shell-method-alt.rst From a320309b457bf4b50eeb441e86629806e7e0ddc5 Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:12:03 -0500 Subject: [PATCH 104/308] DOCSP-36323 Prod Notes links to DL Center (#6262) * DOCSP-36323 Prod Notes links to DL Center * internal review --- source/administration/production-notes.txt | 24 ++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/source/administration/production-notes.txt b/source/administration/production-notes.txt index d5e4e196df4..0b0d809e891 100644 --- a/source/administration/production-notes.txt +++ b/source/administration/production-notes.txt @@ -139,13 +139,25 @@ Use the Latest Stable Packages Be sure you have the latest stable release. -All MongoDB releases are available on the :dl:`MongoDB Download Center <>` -page. The :dl:`MongoDB Download Center <>` is a good place to verify the -current stable release, even if you are installing via a package -manager. +MongoDB releases are available on the MongoDB Download Center: -For other MongoDB products, refer either to the :dl:`MongoDB Download Center <>` -page or their `respective documentation `_. +- `MongoDB Enterprise Advanced + `_ +- `MongoDB Community Edition + `_ + +For details on upgrading to the most current minor release, see +:ref:`upgrade-to-latest-revision`. + +The following related packages are also available on the MongoDB +Download Center: + +- `Tools `_ +- `Atlas SQL Interface `_ +- `Mobile & Edge `_ + +For other MongoDB products, see their `respective documentation +`_. MongoDB ``dbPath`` ------------------ From 8eff9789e51e4c3f621adb7a0a390925999a4db1 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Wed, 7 Feb 2024 10:24:47 -0500 Subject: [PATCH 105/308] (DOCSP-36307): Fix inaccuracy for index on embedded field (#6263) * (DOCSP-36307): Fix inaccuracy for index on embedded field * tweak * spacing --- .../index-single/create-single-field-index.txt | 4 +--- .../indexes/embedded-object-need-entire-doc.rst | 3 +++ source/indexes.txt | 11 ++++++++--- 3 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 source/includes/indexes/embedded-object-need-entire-doc.rst diff --git a/source/core/indexes/index-types/index-single/create-single-field-index.txt b/source/core/indexes/index-types/index-single/create-single-field-index.txt index edeaf00c6ab..3b14149e1ac 100644 --- a/source/core/indexes/index-types/index-single/create-single-field-index.txt +++ b/source/core/indexes/index-types/index-single/create-single-field-index.txt @@ -122,9 +122,7 @@ The following query uses the index on the ``location`` field: Details ``````` -When you create an index on an embedded document, only queries that -specify the *entire* embedded document use the index. Queries on a -specific field within the document do not use the index. +.. include:: /includes/indexes/embedded-object-need-entire-doc.rst For example, the following queries *do not* use the index on the ``location`` field because they query on specific fields within the diff --git a/source/includes/indexes/embedded-object-need-entire-doc.rst b/source/includes/indexes/embedded-object-need-entire-doc.rst new file mode 100644 index 00000000000..c413f2022e0 --- /dev/null +++ b/source/includes/indexes/embedded-object-need-entire-doc.rst @@ -0,0 +1,3 @@ +When you create an index on an embedded document, only queries that +specify the entire embedded document use the index. Queries on a +specific field within the document do not use the index. diff --git a/source/indexes.txt b/source/indexes.txt index fe7bc627ab7..88e15beff97 100644 --- a/source/indexes.txt +++ b/source/indexes.txt @@ -52,10 +52,15 @@ example, consider the following scenarios: * - A salesperson often needs to look up client information by location. Location is stored in an embedded object with fields like ``state``, ``city``, and ``zipcode``. You can create an - index on the entire ``location`` object to improve performance - for queries on any field in that object. + index on the ``location`` object to improve performance for + queries on that object. - - :ref:`Single Field Index ` on an object + .. note:: + + .. include:: /includes/indexes/embedded-object-need-entire-doc.rst + + - :ref:`Single Field Index ` on an embedded + document * - A grocery store manager often needs to look up inventory items by name and quantity to determine which items are low stock. You can From 15d95b889ef033cfd7150f58b8a58b528395ff09 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 7 Feb 2024 10:19:27 -0600 Subject: [PATCH 106/308] DOCSP-35875 Atlas support for Diagnostic methods (#6240) Co-authored-by: pierwill --- source/reference/method/db.collection.dataSize.txt | 13 +++++++++++++ source/reference/method/db.collection.explain.txt | 13 +++++++++++++ source/reference/method/db.collection.validate.txt | 14 ++++++++++++++ source/reference/method/db.hostInfo.txt | 14 ++++++++++++++ source/reference/method/db.listCommands.txt | 14 ++++++++++++++ source/reference/method/db.serverBuildInfo.txt | 14 ++++++++++++++ source/reference/method/db.serverStatus.txt | 14 ++++++++++++++ source/reference/method/db.stats.txt | 14 ++++++++++++++ 8 files changed, 110 insertions(+) diff --git a/source/reference/method/db.collection.dataSize.txt b/source/reference/method/db.collection.dataSize.txt index 8ecac35b0d6..1111f8346ab 100644 --- a/source/reference/method/db.collection.dataSize.txt +++ b/source/reference/method/db.collection.dataSize.txt @@ -27,3 +27,16 @@ db.collection.dataSize() .. |operations| replace:: :dbcommand:`collStats` + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/method/db.collection.explain.txt b/source/reference/method/db.collection.explain.txt index ee8c9e1d764..003544e6a2b 100644 --- a/source/reference/method/db.collection.explain.txt +++ b/source/reference/method/db.collection.explain.txt @@ -88,6 +88,19 @@ Description +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + .. _explain-method-behavior: diff --git a/source/reference/method/db.collection.validate.txt b/source/reference/method/db.collection.validate.txt index b3cfa36d3b3..7161bc421a2 100644 --- a/source/reference/method/db.collection.validate.txt +++ b/source/reference/method/db.collection.validate.txt @@ -34,6 +34,20 @@ Description The :method:`db.collection.validate()` method is a wrapper around the :dbcommand:`validate` command. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/method/db.hostInfo.txt b/source/reference/method/db.hostInfo.txt index cc0a4a3501c..512c8296f5b 100644 --- a/source/reference/method/db.hostInfo.txt +++ b/source/reference/method/db.hostInfo.txt @@ -54,3 +54,17 @@ db.hostInfo() See :data:`hostInfo` for full documentation of the output of :method:`db.hostInfo()`. + + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/method/db.listCommands.txt b/source/reference/method/db.listCommands.txt index 79796232c0f..4f78b1b02c9 100644 --- a/source/reference/method/db.listCommands.txt +++ b/source/reference/method/db.listCommands.txt @@ -15,3 +15,17 @@ db.listCommands() Provides a list of all database commands. See the :doc:`/reference/command` document for a more extensive index of these options. + + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/method/db.serverBuildInfo.txt b/source/reference/method/db.serverBuildInfo.txt index 759326176a3..f3ade46b704 100644 --- a/source/reference/method/db.serverBuildInfo.txt +++ b/source/reference/method/db.serverBuildInfo.txt @@ -16,3 +16,17 @@ db.serverBuildInfo() command`. :dbcommand:`buildInfo` returns a document that contains an overview of parameters used to compile this :binary:`~bin.mongod` instance. + + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/method/db.serverStatus.txt b/source/reference/method/db.serverStatus.txt index 179e810119e..596e67f6468 100644 --- a/source/reference/method/db.serverStatus.txt +++ b/source/reference/method/db.serverStatus.txt @@ -18,6 +18,20 @@ db.serverStatus() This command provides a wrapper around the database command :dbcommand:`serverStatus`. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Behavior -------- diff --git a/source/reference/method/db.stats.txt b/source/reference/method/db.stats.txt index bfd332ac6e1..e85b16a9225 100644 --- a/source/reference/method/db.stats.txt +++ b/source/reference/method/db.stats.txt @@ -20,6 +20,20 @@ Description The :method:`db.stats()` method is a wrapper around the :dbcommand:`dbStats` database command. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-limited-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Parameters ~~~~~~~~~~ From 82d46298677f68dfc91f36708b71ccd6bde50d14 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 7 Feb 2024 10:36:08 -0600 Subject: [PATCH 107/308] DOCSP-35869 Atlas support for Replication methods (#6238) Co-authored-by: pierwill --- source/reference/method/db.hello.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/reference/method/db.hello.txt b/source/reference/method/db.hello.txt index 9b5aaf817c7..63d758be41e 100644 --- a/source/reference/method/db.hello.txt +++ b/source/reference/method/db.hello.txt @@ -26,3 +26,16 @@ db.hello() :dbcommand:`hello` for the complete documentation of the output of :method:`db.hello()`. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst From e9cd3a217ca89c8b714af33b2ac2b328eeade4a3 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 7 Feb 2024 10:46:42 -0600 Subject: [PATCH 108/308] DOCSP-35873 Atlas support for Sessions methods (#6239) --- source/reference/method/Mongo.startSession.txt | 13 +++++++++++++ .../reference/method/Session.abortTransaction.txt | 13 +++++++++++++ .../method/Session.commitTransaction.txt | 15 +++++++++++++++ .../reference/method/Session.withTransaction.txt | 12 ++++++++++++ 4 files changed, 53 insertions(+) diff --git a/source/reference/method/Mongo.startSession.txt b/source/reference/method/Mongo.startSession.txt index 47749ed2ac2..827b970e09e 100644 --- a/source/reference/method/Mongo.startSession.txt +++ b/source/reference/method/Mongo.startSession.txt @@ -93,6 +93,19 @@ Definition :method:`Session.getOptions().setWriteConcern() `. +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Examples -------- diff --git a/source/reference/method/Session.abortTransaction.txt b/source/reference/method/Session.abortTransaction.txt index 16b00d97262..1ffd923b9e1 100644 --- a/source/reference/method/Session.abortTransaction.txt +++ b/source/reference/method/Session.abortTransaction.txt @@ -29,6 +29,19 @@ Definition .. include:: /includes/fact-mongosh-shell-method-alt +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Behavior -------- diff --git a/source/reference/method/Session.commitTransaction.txt b/source/reference/method/Session.commitTransaction.txt index 79aa83efe6f..936e7485bf8 100644 --- a/source/reference/method/Session.commitTransaction.txt +++ b/source/reference/method/Session.commitTransaction.txt @@ -26,6 +26,21 @@ Definition .. include:: /includes/fact-mongosh-shell-method-alt + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Behavior -------- diff --git a/source/reference/method/Session.withTransaction.txt b/source/reference/method/Session.withTransaction.txt index bfb730f80a2..2b4e80cb4a9 100644 --- a/source/reference/method/Session.withTransaction.txt +++ b/source/reference/method/Session.withTransaction.txt @@ -34,6 +34,18 @@ Definition .. |dbcommand| replace:: :dbcommand:`commitTransaction` command .. include:: /includes/fact-mongosh-shell-method-alt +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst Behavior -------- From e1d280610fd111484c816df7fa4c67874b61112c Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:22:43 -0500 Subject: [PATCH 109/308] DOCS 16485 query time series meta fields (#5542) * DOCS-16485 time-series metafield query * DOCS-16485 updating example * DOCS-16485 updating example * DOCS-16485 updating example * DOCS-16485 updating title * DOCS-16485 copy edits * DOCS-16485 tech edits: * DOCS-16485 updating limitations page * DOCS-16485 moving example to limitations page * DOCS-16485 moving example to best practices page and off limitations page * DOCS-16485 fixing wording * DOCS-16485 copy edits * DOCS-16485 copy edits --- .../timeseries/timeseries-best-practices.txt | 52 ++++++++++++++++++- .../core/timeseries/timeseries-procedures.txt | 3 ++ 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/source/core/timeseries/timeseries-best-practices.txt b/source/core/timeseries/timeseries-best-practices.txt index 82c38a8dd2d..d69b698f58e 100644 --- a/source/core/timeseries/timeseries-best-practices.txt +++ b/source/core/timeseries/timeseries-best-practices.txt @@ -261,4 +261,54 @@ To improve query performance, :ref:`create one or more secondary indexes ` on your ``timeField`` and ``metaField`` to support common query patterns. In versions 6.3 and higher, MongoDB creates a secondary index on the ``timeField`` and -``metaField`` automatically. \ No newline at end of file +``metaField`` automatically. + +Query metaFields on Sub-Fields +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +MongoDB reorders the metaFields of time-series collections, which may +cause servers to store data in a different field order than +applications. If metaFields are objects, queries on entire metaFields +may produce inconsistent results because metaField order may vary +between servers and applications. To optimize queries on time-series +metaFields, query timeseries metaFields on scalar sub-fields rather than +entire metaFields. + +The following example creates a time series collection: + +.. code-block:: javascript + + db.weather.insertMany( [ + { + "metaField": { "sensorId": 5578, "type": "temperature" }, + "timestamp": ISODate( "2021-05-18T00:00:00.000Z" ), + "temp": 12 + }, + { + "metaField": { "sensorId": 5578, "type": "temperature" }, + "timestamp": ISODate( "2021-05-18T04:00:00.000Z" ), + "temp": 11 + } + ] ) + +The following query on the ``sensorId`` and ``type`` scalar sub-fields +returns the first document that matches the query criteria: + +.. code-block:: javascript + + db.weather.findOne( { + "metaField.sensorId": 5578, + "metaField.type": "temperature" + } ) + +Example output: + +.. code-block:: javascript + :copyable: false + + { + _id: ObjectId("6572371964eb5ad43054d572"), + metaField: { sensorId: 5578, type: 'temperature' }, + timestamp: ISODate( "2021-05-18T00:00:00.000Z" ), + temp: 12 + } diff --git a/source/core/timeseries/timeseries-procedures.txt b/source/core/timeseries/timeseries-procedures.txt index 6690c8aea1f..f1a29e75938 100644 --- a/source/core/timeseries/timeseries-procedures.txt +++ b/source/core/timeseries/timeseries-procedures.txt @@ -262,6 +262,9 @@ Example output: _id: ObjectId("62f11bbf1e52f124b84479ad") } +For more information on time series queries, see +:ref:`tsc-best-practice-optimize-query-performance`. + Run Aggregations on a Time Series Collection -------------------------------------------- From b7bcd78d26e6c2df057f5b968ba0c16de733e905 Mon Sep 17 00:00:00 2001 From: jocelyn-mendez1 <91144778+jocelyn-mendez1@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:23:02 -0500 Subject: [PATCH 110/308] DOCSP-34446 add linux binaries (#6256) --- snooty.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snooty.toml b/snooty.toml index 9989f7b6df0..3dc8a8e1d5a 100644 --- a/snooty.toml +++ b/snooty.toml @@ -393,7 +393,8 @@ targets = [ ] variant = "danger" value = """ - OpenID Connect is currently available in Public Preview. + OpenID Connect is currently available in Public Preview and is only supported + on Linux binaries. """ [bundle] manpages = "manpages.tar.gz" From e5111594d1f2d49aecc4fd8738df74acfb36b433 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Wed, 7 Feb 2024 09:53:28 -0800 Subject: [PATCH 111/308] DOCSP-36179-schema-validation-updates (#6156) * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates * DOCSP-36179-schema-validation-updates --------- Co-authored-by: jason-price-mongodb --- source/core/schema-validation.txt | 20 +++++++------------ .../specify-validation-level.txt | 14 +++++++------ .../use-json-schema-query-conditions.txt | 7 +++++-- 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/source/core/schema-validation.txt b/source/core/schema-validation.txt index ad82dd137d2..2f69e5fbd49 100644 --- a/source/core/schema-validation.txt +++ b/source/core/schema-validation.txt @@ -55,26 +55,20 @@ validation in the following scenarios: from accidentally misspelling an item name when entering sales data. - For a students collection, ensure that the ``gpa`` field is always a - positive number. This validation catches typos during data entry. + positive number. This validation prevents errors during data entry. When MongoDB Checks Validation ------------------------------ -When you create a new collection with schema validation, MongoDB checks -validation during updates and inserts in that collection. +After you add schema validation rules to a collection: -When you add validation to an existing, non-empty collection: - -- Newly inserted documents are checked for validation. - -- Documents already existing in your collection are not checked for - validation until they are modified. Specific behavior for existing - documents depends on your chosen validation level. To learn more, see +- All document inserts must match the rules. +- The schema validation level defines how the rules are applied to + existing documents and document updates. To learn more, see :ref:`schema-specify-validation-level`. -Adding validation to an existing collection does not enforce validation -on existing documents. To check a collection for invalid documents, use -the :dbcommand:`validate` command. +To find documents in a collection that don't match the schema validation +rules, see :ref:`use-json-schema-query-conditions-find-documents`. What Happens When a Document Fails Validation --------------------------------------------- diff --git a/source/core/schema-validation/specify-validation-level.txt b/source/core/schema-validation/specify-validation-level.txt index f563a3fe7bb..2293762008a 100644 --- a/source/core/schema-validation/specify-validation-level.txt +++ b/source/core/schema-validation/specify-validation-level.txt @@ -31,13 +31,15 @@ MongoDB applies validation rules: - Behavior * - ``strict`` - - (*Default*) MongoDB applies validation rules to all inserts and - updates. + - (*Default*) MongoDB applies the same validation rules to all + document inserts and updates. * - ``moderate`` - - MongoDB only applies validation rules to existing valid - documents. Updates to invalid documents which exist prior to the - validation being added are not checked for validity. + - MongoDB applies the same validation rules to document inserts + and updates to existing valid documents that match the + validation rules. Updates to existing documents in the + collection that don't match the validation rules aren't checked + for validity. Prerequisite ------------ @@ -260,7 +262,7 @@ documents. upsertedCount: 0 } - The output shows that: + The output shows: - The update fails for the document with ``_id: 1``. This document met the initial validation requirements, and MongoDB applies diff --git a/source/core/schema-validation/use-json-schema-query-conditions.txt b/source/core/schema-validation/use-json-schema-query-conditions.txt index 8f1b64de4c1..9f62e731fdf 100644 --- a/source/core/schema-validation/use-json-schema-query-conditions.txt +++ b/source/core/schema-validation/use-json-schema-query-conditions.txt @@ -102,11 +102,14 @@ Both commands return the same result: } ] +.. _use-json-schema-query-conditions-find-documents: + Find Documents that Don't Match the Schema ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To find all documents do not satisfy the schema:, use -:query:`$jsonSchema` with the :query:`$nor` operator: +To find documents in a collection that don't match the schema validation +rules, use :query:`$jsonSchema` with the :query:`$nor` operator. For +example: .. code-block:: javascript From b33ea306f2f1499d6163456459b63c91e3bf9095 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:26:34 -0600 Subject: [PATCH 112/308] DOCSP-35874 Atlas support for Administration methods (#6266) --- ...ollection.compactStructuredEncryptionData.txt | 14 ++++++++++++++ .../method/db.collection.createIndexes.txt | 14 ++++++++++++++ .../method/db.collection.dropIndexes.txt | 16 +++++++++++++++- .../reference/method/db.collection.reIndex.txt | 15 +++++++++++++++ .../method/db.collection.renameCollection.txt | 14 ++++++++++++++ source/reference/method/db.currentOp.txt | 15 +++++++++++++++ source/reference/method/db.dropDatabase.txt | 11 +++++++++-- source/reference/method/db.fsyncUnlock.txt | 15 +++++++++++++++ source/reference/method/db.killOp.txt | 13 +++++++++++++ .../reference/method/db.rotateCertificates.txt | 15 +++++++++++++++ 10 files changed, 139 insertions(+), 3 deletions(-) diff --git a/source/reference/method/db.collection.compactStructuredEncryptionData.txt b/source/reference/method/db.collection.compactStructuredEncryptionData.txt index 90e4158e91d..a6c719aa7db 100644 --- a/source/reference/method/db.collection.compactStructuredEncryptionData.txt +++ b/source/reference/method/db.collection.compactStructuredEncryptionData.txt @@ -25,3 +25,17 @@ db.collection.compactStructuredEncryptionData() only works on connections that have :ref:`automatic encryption ` enabled. + + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/method/db.collection.createIndexes.txt b/source/reference/method/db.collection.createIndexes.txt index a8187168217..cfd3bc264f5 100644 --- a/source/reference/method/db.collection.createIndexes.txt +++ b/source/reference/method/db.collection.createIndexes.txt @@ -95,6 +95,20 @@ Definition .. versionadded:: 4.4 + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + .. _createIndexes-method-options: Options diff --git a/source/reference/method/db.collection.dropIndexes.txt b/source/reference/method/db.collection.dropIndexes.txt index 2b65616a7e5..52f42f2ae5f 100644 --- a/source/reference/method/db.collection.dropIndexes.txt +++ b/source/reference/method/db.collection.dropIndexes.txt @@ -104,7 +104,21 @@ Definition **To drop multiple indexes** (Available starting in MongoDB 4.2), specify an array of the index names. - + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Behavior -------- diff --git a/source/reference/method/db.collection.reIndex.txt b/source/reference/method/db.collection.reIndex.txt index 3344a954a5c..d166a5be06a 100644 --- a/source/reference/method/db.collection.reIndex.txt +++ b/source/reference/method/db.collection.reIndex.txt @@ -35,6 +35,21 @@ Definition - For most users, the :method:`db.collection.reIndex()` command is unnecessary. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Behavior -------- diff --git a/source/reference/method/db.collection.renameCollection.txt b/source/reference/method/db.collection.renameCollection.txt index cd78faf04b9..c024aa6b017 100644 --- a/source/reference/method/db.collection.renameCollection.txt +++ b/source/reference/method/db.collection.renameCollection.txt @@ -50,6 +50,20 @@ Definition the collection. The default value is ``false``. +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Behavior -------- diff --git a/source/reference/method/db.currentOp.txt b/source/reference/method/db.currentOp.txt index dd7c10f2611..db5a4849ed8 100644 --- a/source/reference/method/db.currentOp.txt +++ b/source/reference/method/db.currentOp.txt @@ -29,6 +29,21 @@ Definition .. include:: /includes/5.0-fact-currentop.rst + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Syntax ~~~~~~ diff --git a/source/reference/method/db.dropDatabase.txt b/source/reference/method/db.dropDatabase.txt index bba3c4b4d6d..b4f53431d77 100644 --- a/source/reference/method/db.dropDatabase.txt +++ b/source/reference/method/db.dropDatabase.txt @@ -21,12 +21,19 @@ Definition Removes the current database, deleting the associated data files. + Compatibility ------------- -.. |operator-method| replace:: ``db.dropDatabase()`` +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst -.. include:: /includes/fact-compatibility.rst +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/method/db.fsyncUnlock.txt b/source/reference/method/db.fsyncUnlock.txt index d9a0b2065dc..b99abaa36d7 100644 --- a/source/reference/method/db.fsyncUnlock.txt +++ b/source/reference/method/db.fsyncUnlock.txt @@ -62,6 +62,21 @@ Definition The :method:`db.fsyncUnlock()` method wraps the :dbcommand:`fsyncUnlock` command. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Compatibility with WiredTiger ----------------------------- diff --git a/source/reference/method/db.killOp.txt b/source/reference/method/db.killOp.txt index 5bb3fb600b7..ba5cc7e7db7 100644 --- a/source/reference/method/db.killOp.txt +++ b/source/reference/method/db.killOp.txt @@ -46,6 +46,19 @@ Description .. include:: /includes/extracts/warning-terminating-ops-method.rst +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-limited-free-and-m10.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Sharded Cluster --------------- diff --git a/source/reference/method/db.rotateCertificates.txt b/source/reference/method/db.rotateCertificates.txt index e52161e96c2..63f1c31f1d8 100644 --- a/source/reference/method/db.rotateCertificates.txt +++ b/source/reference/method/db.rotateCertificates.txt @@ -50,6 +50,21 @@ Definition The :method:`db.rotateCertificates()` method wraps the :dbcommand:`rotateCertificates` command. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Output ------ From 4bcaedac06c5e2f1ab3082de08b186a6a3e89705 Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Wed, 7 Feb 2024 14:04:31 -0500 Subject: [PATCH 113/308] DOCSP-36126-reword-replica-set-data-sync-behavior (#6273) * DOCSP-36126-reword-replica-set-data-sync-behavior * Adding taxonomy tag --- source/core/replica-set-sync.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/core/replica-set-sync.txt b/source/core/replica-set-sync.txt index 22b3423433d..22bb893ce93 100644 --- a/source/core/replica-set-sync.txt +++ b/source/core/replica-set-sync.txt @@ -6,6 +6,10 @@ Replica Set Data Synchronization .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -99,9 +103,9 @@ at startup. Behavior ```````` -File copy based initial sync replaces the ``local`` database on the -member being *synced to* with the ``local`` database from the member -being *synced from*. +File copy based initial sync replaces the ``local`` database of the +target member with the ``local`` database of the source member when +syncing. Limitations ``````````` From a2b0e5634679aebf07199974a6134bfc5d0dd291 Mon Sep 17 00:00:00 2001 From: jocelyn-mendez1 <91144778+jocelyn-mendez1@users.noreply.github.com> Date: Wed, 7 Feb 2024 14:48:24 -0500 Subject: [PATCH 114/308] DOCSP-16511 correct time (#6299) --- source/reference/database-profiler.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/database-profiler.txt b/source/reference/database-profiler.txt index b0f554d4d70..140d781c930 100644 --- a/source/reference/database-profiler.txt +++ b/source/reference/database-profiler.txt @@ -441,7 +441,7 @@ operation. .. versionadded:: 6.2 - The time, in milliseconds, that the ``find`` or ``aggregate`` command + The time, in microseconds, that the ``find`` or ``aggregate`` command spent in :ref:`query planning `. .. data:: system.profile.planSummary From 7cb4570528dc57fb2f4a8d3233ecc7dcf7751ecc Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Wed, 7 Feb 2024 17:46:52 -0500 Subject: [PATCH 115/308] DOCSP-33843 drop hashed shard key index (#5746) * DOCSP-33843 drop hashed shard key index * typo * internal review * internal review * external review * replace cleanupOrphaned with shardedDataDistribution * starting in 6.0.3 --- .../sharded-cluster-administration.txt | 3 + source/core/hashed-sharding.txt | 4 + .../drop-hashed-shard-key-index-main.rst | 7 ++ .../includes/drop-hashed-shard-key-index.rst | 3 + ...shardedDataDistribution-output-example.rst | 24 +++++ .../aggregation/shardedDataDistribution.txt | 25 +---- source/release-notes/7.0.txt | 5 + .../drop-a-hashed-shard-key-index.txt | 94 +++++++++++++++++++ 8 files changed, 141 insertions(+), 24 deletions(-) create mode 100644 source/includes/drop-hashed-shard-key-index-main.rst create mode 100644 source/includes/drop-hashed-shard-key-index.rst create mode 100644 source/includes/shardedDataDistribution-output-example.rst create mode 100644 source/tutorial/drop-a-hashed-shard-key-index.txt diff --git a/source/administration/sharded-cluster-administration.txt b/source/administration/sharded-cluster-administration.txt index 9a641ff55a3..8613a60f5d5 100644 --- a/source/administration/sharded-cluster-administration.txt +++ b/source/administration/sharded-cluster-administration.txt @@ -28,6 +28,7 @@ Sharded Cluster Administration /tutorial/backup-sharded-cluster-metadata /tutorial/convert-sharded-cluster-to-replica-set /tutorial/convert-replica-set-to-replicated-shard-cluster + /tutorial/drop-a-hashed-shard-key-index :doc:`Config Server Administration ` This section contains articles and tutorials related to sharded @@ -67,3 +68,5 @@ Sharded Cluster Administration Convert a replica set to a sharded cluster in which each shard is its own replica set. +:doc:`/tutorial/drop-a-hashed-shard-key-index` + Drop a Hashed Shard Key Index. diff --git a/source/core/hashed-sharding.txt b/source/core/hashed-sharding.txt index 2c5d7acf20d..082dd3eaf3a 100644 --- a/source/core/hashed-sharding.txt +++ b/source/core/hashed-sharding.txt @@ -249,6 +249,10 @@ Sharding Empty Collection on Compound Hashed Shard Key with Non-Hashed Prefix :ref:`pre-define-zone-range-hashed-example`. +Drop a Hashed Shard Key Index +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/drop-hashed-shard-key-index.rst .. seealso:: diff --git a/source/includes/drop-hashed-shard-key-index-main.rst b/source/includes/drop-hashed-shard-key-index-main.rst new file mode 100644 index 00000000000..7cac62a24c9 --- /dev/null +++ b/source/includes/drop-hashed-shard-key-index-main.rst @@ -0,0 +1,7 @@ +Starting in MongoDB 7.0.3 (and 6.0.12 and 5.0.22), you can drop the +index for a hashed shard key. + +This can speed up data insertion for collections sharded with a hashed +shard key. It can also speed up data ingestion when using +``mongosync``. + diff --git a/source/includes/drop-hashed-shard-key-index.rst b/source/includes/drop-hashed-shard-key-index.rst new file mode 100644 index 00000000000..f1549f780e7 --- /dev/null +++ b/source/includes/drop-hashed-shard-key-index.rst @@ -0,0 +1,3 @@ +.. include:: /includes/drop-hashed-shard-key-index-main.rst + +For details, see :ref:`drop-a-hashed-shard-key-index`. diff --git a/source/includes/shardedDataDistribution-output-example.rst b/source/includes/shardedDataDistribution-output-example.rst new file mode 100644 index 00000000000..ba33bd2da41 --- /dev/null +++ b/source/includes/shardedDataDistribution-output-example.rst @@ -0,0 +1,24 @@ +.. code-block:: json + + [ + { + "ns": "test.names", + "shards": [ + { + "shardName": "shard-1", + "numOrphanedDocs": 0, + "numOwnedDocuments": 6, + "ownedSizeBytes": 366, + "orphanedSizeBytes": 0 + }, + { + "shardName": "shard-2", + "numOrphanedDocs": 0, + "numOwnedDocuments": 6, + "ownedSizeBytes": 366, + "orphanedSizeBytes": 0 + } + ] + } + ] + diff --git a/source/reference/operator/aggregation/shardedDataDistribution.txt b/source/reference/operator/aggregation/shardedDataDistribution.txt index f820818a01c..450ff6cca44 100644 --- a/source/reference/operator/aggregation/shardedDataDistribution.txt +++ b/source/reference/operator/aggregation/shardedDataDistribution.txt @@ -59,27 +59,4 @@ Examples Example output: -.. code-block:: json - - [ - { - "ns": "test.names", - "shards": [ - { - "shardName": "shard-1", - "numOrphanedDocs": 0, - "numOwnedDocuments": 6, - "ownedSizeBytes": 366, - "orphanedSizeBytes": 0 - }, - { - "shardName": "shard-2", - "numOrphanedDocs": 0, - "numOwnedDocuments": 6, - "ownedSizeBytes": 366, - "orphanedSizeBytes": 0 - } - ] - } - ] - +.. include:: /includes/shardedDataDistribution-output-example.rst diff --git a/source/release-notes/7.0.txt b/source/release-notes/7.0.txt index f56309e6afc..6d687cd613d 100644 --- a/source/release-notes/7.0.txt +++ b/source/release-notes/7.0.txt @@ -196,6 +196,11 @@ Aggregation Stages General Changes --------------- +Drop a Hashed Shard Key Index +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/drop-hashed-shard-key-index.rst + Cache Refresh Time Fields ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/tutorial/drop-a-hashed-shard-key-index.txt b/source/tutorial/drop-a-hashed-shard-key-index.txt new file mode 100644 index 00000000000..e4f1352d223 --- /dev/null +++ b/source/tutorial/drop-a-hashed-shard-key-index.txt @@ -0,0 +1,94 @@ +.. _drop-a-hashed-shard-key-index: + +============================= +Drop a Hashed Shard Key Index +============================= + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +.. include:: /includes/drop-hashed-shard-key-index-main.rst + +About this Task +--------------- + +Dropping an `unnecessary index +`_ +can speed up CRUD operations. Each CRUD operation has to update all the +indexes related to a document. Removing one index can increase the +speed of all CRUD operations. + +When you drop a hashed shard key index, the server disables balancing +for that collection and excludes the collection from future balancing +rounds. In order to include the collection in balancing rounds once +again, you must recreate the shard key index. + +Steps +----- + +.. procedure:: + :style: normal + + .. step:: Stop the balancer + + Run the following command to stop the balancer: + + .. code-block:: javascript + + sh.stopBalancer() + + You can only run ``sh.stopBalancer()`` on ``mongos``. + ``sh.stopBalancer()`` produces an error if run on ``mongod``. + + .. step:: Confirm there are no orphaned documents in your collection + + Starting in MongoDB 6.0.3, you can run an aggregation using the + :pipeline:`$shardedDataDistribution` stage to confirm no orphaned + documents remain: + + .. code-block:: javascript + + db.aggregate([ + { $shardedDataDistribution: {} }, + { $match: { "ns": "." } } + ]) + + ``$shardedDataDistribution`` has output similar to the following: + + .. include:: /includes/shardedDataDistribution-output-example.rst + + Ensure that ``"numOrphanedDocs"`` is ``0`` for each shard in the + cluster. + + .. step:: Drop the hashed shard key index + + Run the following command to drop the index: + + .. code-block:: javascript + + db.collection.dropIndex("") + + .. step:: Restart the balancer + + Run the following command to restart the balancer on the cluster: + + .. code-block:: javascript + + sh.startBalancer() + + +Learn More +---------- + +- :ref:`sharding-hashed` +- :ref:`sharding-balancing` +- :method:`db.collection.dropIndex()` +- :method:`sh.stopBalancer()` +- :method:`sh.startBalancer()` +- :method:`sh.getBalancerState()` + From 2134b7a1b4397f5622e8ad9ea64d927e46b62fa4 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Thu, 8 Feb 2024 12:09:54 -0500 Subject: [PATCH 116/308] DOCSP-36537 archive file benefits section (#6303) * DOCSP-36537 archive file benefits section * DOCSP-36537 archive file benefits section * DOCSP-36537 archive file benefits section * DOCSP-36537 clarifying backup and restore * DOCSP-36537 adding reference --- source/tutorial/backup-and-restore-tools.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/tutorial/backup-and-restore-tools.txt b/source/tutorial/backup-and-restore-tools.txt index c3a726b10c8..5aabad03250 100644 --- a/source/tutorial/backup-and-restore-tools.txt +++ b/source/tutorial/backup-and-restore-tools.txt @@ -49,7 +49,25 @@ Performance Impacts .. include:: /includes/extracts/tools-performance-considerations-dump-restore.rst +.. _considerations-output-format: +Output Format +~~~~~~~~~~~~~ + +:binary:`~bin.mongorestore` and :binary:`~bin.mongodump` can output data +to an archive file, which is a single-file alternative to multiple BSON +files. Archive files are special-purpose formats that support +non-contiguous file writes. They enable concurrent backups from MongoDB, +as well as restores to MongoDB. Using archive files optimizes disk I/O +while backup and restore operations execute. + +You can also output archive files to the standard output (``stdout``). +Writing to the standard output allows for data migration over networks, +reduced disk I/O footprint, and concurrency gains in both the MongoDB +tools and your storage engine. + +For more information on archive files, see the +:option:`--archive ` option. .. _backup-mongodump: .. _backup-and-restore-tools: From 10e9f6d5158b14dbb7acef194d1d18746b7dd91b Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:27:24 -0600 Subject: [PATCH 117/308] DOCSP-35872 Atlas support for Sharding methods (#6151) * DOCSP-35872 Atlas support for sharding methods * Fix build error * Add two more methods * fix typos --------- Co-authored-by: pierwill --- ...t-environments-atlas-support-no-free-or-m10.rst | 2 +- .../method/db.checkMetadataConsistency.txt | 12 ++++++++++++ .../method/db.collection.analyzeShardKey.txt | 14 ++++++++++++++ .../db.collection.checkMetadataConsistency.txt | 14 ++++++++++++++ .../db.collection.configureQueryAnalyzer.txt | 13 +++++++++++++ .../method/db.collection.getShardVersion.txt | 13 +++++++++++++ .../reference/method/sh.abortReshardCollection.txt | 12 ++++++++++++ source/reference/method/sh.addShard.txt | 13 +++++++++++++ source/reference/method/sh.addShardToZone.txt | 14 ++++++++++++++ .../method/sh.balancerCollectionStatus.txt | 14 ++++++++++++++ .../method/sh.checkMetadataConsistency.txt | 12 ++++++++++++ source/reference/method/sh.enableSharding.txt | 13 +++++++++++++ source/reference/method/sh.moveChunk.txt | 14 ++++++++++++++ source/reference/method/sh.removeShardFromZone.txt | 13 +++++++++++++ source/reference/method/sh.reshardCollection.txt | 14 ++++++++++++++ source/reference/method/sh.updateZoneKeyRange.txt | 14 ++++++++++++++ 16 files changed, 200 insertions(+), 1 deletion(-) diff --git a/source/includes/fact-environments-atlas-support-no-free-or-m10.rst b/source/includes/fact-environments-atlas-support-no-free-or-m10.rst index ffb00e55122..2764605c051 100644 --- a/source/includes/fact-environments-atlas-support-no-free-or-m10.rst +++ b/source/includes/fact-environments-atlas-support-no-free-or-m10.rst @@ -1,4 +1,4 @@ .. note:: - This |command| has *limited support* in M0, M2, M5, and M10 clusters. + This command has *limited support* in M0, M2, M5, and M10 clusters. For more information, see :atlas:`Unsupported Commands `. diff --git a/source/reference/method/db.checkMetadataConsistency.txt b/source/reference/method/db.checkMetadataConsistency.txt index 0c6e00e2794..85f9f7c6d31 100644 --- a/source/reference/method/db.checkMetadataConsistency.txt +++ b/source/reference/method/db.checkMetadataConsistency.txt @@ -39,6 +39,18 @@ Definition which contains a document for each inconsistency found in the sharding metadata. +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------- diff --git a/source/reference/method/db.collection.analyzeShardKey.txt b/source/reference/method/db.collection.analyzeShardKey.txt index a3dfe684f06..dc6202009f3 100644 --- a/source/reference/method/db.collection.analyzeShardKey.txt +++ b/source/reference/method/db.collection.analyzeShardKey.txt @@ -22,6 +22,20 @@ Definition can use :dbcommand:`configureQueryAnalyzer` to configure query sampling on a collection. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/method/db.collection.checkMetadataConsistency.txt b/source/reference/method/db.collection.checkMetadataConsistency.txt index ce09fd1dba0..6d301f73afd 100644 --- a/source/reference/method/db.collection.checkMetadataConsistency.txt +++ b/source/reference/method/db.collection.checkMetadataConsistency.txt @@ -35,6 +35,20 @@ Definition the sharding metadata. +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Syntax ------- diff --git a/source/reference/method/db.collection.configureQueryAnalyzer.txt b/source/reference/method/db.collection.configureQueryAnalyzer.txt index e0ec6038e52..dc3213309e7 100644 --- a/source/reference/method/db.collection.configureQueryAnalyzer.txt +++ b/source/reference/method/db.collection.configureQueryAnalyzer.txt @@ -29,6 +29,19 @@ Definition details, see :ref:``. +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/method/db.collection.getShardVersion.txt b/source/reference/method/db.collection.getShardVersion.txt index ad13d694986..8e9a913dee6 100644 --- a/source/reference/method/db.collection.getShardVersion.txt +++ b/source/reference/method/db.collection.getShardVersion.txt @@ -21,3 +21,16 @@ db.collection.getShardVersion() with a sharded cluster. For internal and diagnostic use only. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free-or-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst diff --git a/source/reference/method/sh.abortReshardCollection.txt b/source/reference/method/sh.abortReshardCollection.txt index 7df9c11fa6b..fd3313fdc18 100644 --- a/source/reference/method/sh.abortReshardCollection.txt +++ b/source/reference/method/sh.abortReshardCollection.txt @@ -32,6 +32,18 @@ Definition .. |dbcommand| replace:: :dbcommand:`abortReshardCollection` command .. include:: /includes/fact-mongosh-shell-method-alt.rst +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/method/sh.addShard.txt b/source/reference/method/sh.addShard.txt index 797b128ff49..7d867c88fb5 100644 --- a/source/reference/method/sh.addShard.txt +++ b/source/reference/method/sh.addShard.txt @@ -67,6 +67,19 @@ Definition .. include:: /includes/extracts/mongos-operations-wc-add-shard.rst +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Considerations -------------- diff --git a/source/reference/method/sh.addShardToZone.txt b/source/reference/method/sh.addShardToZone.txt index 0041a1acbb8..3130329cf18 100644 --- a/source/reference/method/sh.addShardToZone.txt +++ b/source/reference/method/sh.addShardToZone.txt @@ -57,6 +57,20 @@ Definition Only issue :method:`sh.addShardToZone()` when connected to a :binary:`~bin.mongos` instance. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Behavior -------- diff --git a/source/reference/method/sh.balancerCollectionStatus.txt b/source/reference/method/sh.balancerCollectionStatus.txt index f206bef0d39..ab5b9cc39a3 100644 --- a/source/reference/method/sh.balancerCollectionStatus.txt +++ b/source/reference/method/sh.balancerCollectionStatus.txt @@ -26,6 +26,20 @@ Definition .. |dbcommand| replace:: :dbcommand:`balancerCollectionStatus` command .. include:: /includes/fact-mongosh-shell-method-alt.rst + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/method/sh.checkMetadataConsistency.txt b/source/reference/method/sh.checkMetadataConsistency.txt index 9445cd7d22d..4f8c8873aff 100644 --- a/source/reference/method/sh.checkMetadataConsistency.txt +++ b/source/reference/method/sh.checkMetadataConsistency.txt @@ -36,6 +36,18 @@ Definition which contains a document for each inconsistency found in the sharding metadata. +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------- diff --git a/source/reference/method/sh.enableSharding.txt b/source/reference/method/sh.enableSharding.txt index dc09af7aa02..dc273305a48 100644 --- a/source/reference/method/sh.enableSharding.txt +++ b/source/reference/method/sh.enableSharding.txt @@ -31,6 +31,19 @@ Definition .. include:: /includes/fact-mongosh-shell-method-alt.rst +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ diff --git a/source/reference/method/sh.moveChunk.txt b/source/reference/method/sh.moveChunk.txt index cc6900b6717..38e5914da11 100644 --- a/source/reference/method/sh.moveChunk.txt +++ b/source/reference/method/sh.moveChunk.txt @@ -91,6 +91,20 @@ Definition - :doc:`/sharding`, and :ref:`chunk migration ` + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Example ------- diff --git a/source/reference/method/sh.removeShardFromZone.txt b/source/reference/method/sh.removeShardFromZone.txt index 8cf0b9db1bb..37472d0eea7 100644 --- a/source/reference/method/sh.removeShardFromZone.txt +++ b/source/reference/method/sh.removeShardFromZone.txt @@ -56,6 +56,19 @@ Definition Only issue :method:`sh.removeShardFromZone()` when connected to a :binary:`~bin.mongos` instance. +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Behavior -------- diff --git a/source/reference/method/sh.reshardCollection.txt b/source/reference/method/sh.reshardCollection.txt index 5836e332941..56fa7276ea6 100644 --- a/source/reference/method/sh.reshardCollection.txt +++ b/source/reference/method/sh.reshardCollection.txt @@ -111,6 +111,20 @@ The ``options`` field supports the following fields: ... ] + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-all.rst + +.. include:: /includes/fact-environments-onprem-only.rst + .. _resharding-process-details: Resharding Process diff --git a/source/reference/method/sh.updateZoneKeyRange.txt b/source/reference/method/sh.updateZoneKeyRange.txt index fa56c582da1..499db065474 100644 --- a/source/reference/method/sh.updateZoneKeyRange.txt +++ b/source/reference/method/sh.updateZoneKeyRange.txt @@ -88,6 +88,20 @@ Definition Only issue :method:`sh.updateZoneKeyRange()` when connected to a :binary:`~bin.mongos` instance. + +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-serverless.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Behavior -------- From 1371f57593b276611b9d3f2a24eb4faab4f5e6d3 Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Thu, 8 Feb 2024 17:24:55 -0500 Subject: [PATCH 118/308] DOCSP-36570 fixes Atlas mult-tenant 404s (#6313) --- source/includes/analyzeShardKey-limitations.rst | 2 +- source/includes/cqa-limitations.rst | 2 +- source/reference/operator/aggregation/listSampledQueries.txt | 2 +- source/release-notes/3.2-javascript.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/includes/analyzeShardKey-limitations.rst b/source/includes/analyzeShardKey-limitations.rst index eb90f24578d..cd28d1949fb 100644 --- a/source/includes/analyzeShardKey-limitations.rst +++ b/source/includes/analyzeShardKey-limitations.rst @@ -1,5 +1,5 @@ - You cannot run |analyzeShardKey| on Atlas - :atlas:`multi-tenant ` + :atlas:`multi-tenant ` configurations. - You cannot run |analyzeShardKey| on standalone deployments. - You cannot run |analyzeShardKey| directly against a diff --git a/source/includes/cqa-limitations.rst b/source/includes/cqa-limitations.rst index 2252b7d99a2..21f5816a751 100644 --- a/source/includes/cqa-limitations.rst +++ b/source/includes/cqa-limitations.rst @@ -1,5 +1,5 @@ - You cannot run |CQA| on Atlas - :atlas:`multi-tenant ` + :atlas:`multi-tenant ` configurations. - You cannot run |CQA| on standalone deployments. diff --git a/source/reference/operator/aggregation/listSampledQueries.txt b/source/reference/operator/aggregation/listSampledQueries.txt index 2e6e49b760e..3648ab4cff0 100644 --- a/source/reference/operator/aggregation/listSampledQueries.txt +++ b/source/reference/operator/aggregation/listSampledQueries.txt @@ -50,7 +50,7 @@ Limitations ----------- - You cannot use ``$listSampledQueries`` on Atlas - :atlas:`multitenant ` + :atlas:`multi-tenant ` configurations. - You cannot use ``$listSampledQueries`` on standalone deployments. - You cannot use ``$listSampledQueries`` directly against a diff --git a/source/release-notes/3.2-javascript.txt b/source/release-notes/3.2-javascript.txt index 1a33612a603..fd601e10d5c 100644 --- a/source/release-notes/3.2-javascript.txt +++ b/source/release-notes/3.2-javascript.txt @@ -19,7 +19,7 @@ JavaScript Changes in MongoDB 3.2 In MongoDB 3.2, the javascript engine used for both the ``mongo`` shell and for server-side javascript in :binary:`~bin.mongod` changed from V8 to -`SpiderMonkey `_. +`SpiderMonkey `_. To confirm which JavaScript engine you are using, you can use either ``interpreterVersion()`` method in the ``mongo`` shell and the From d386c607c4075fa99b55ed684d2ea8b3e1e4c124 Mon Sep 17 00:00:00 2001 From: Nora Reidy Date: Fri, 9 Feb 2024 12:26:08 -0500 Subject: [PATCH 119/308] DOCSP-29344: Fix empty table (#6322) * DOCSP-29344: Fix empty table * adjusting width --- source/reference/database-references.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/database-references.txt b/source/reference/database-references.txt index 8751d6be06b..a4c049e2683 100644 --- a/source/reference/database-references.txt +++ b/source/reference/database-references.txt @@ -267,7 +267,7 @@ Driver Support for DBRefs .. list-table:: :header-rows: 1 :stub-columns: 1 - :widths: 20 25 80 + :widths: 20 25 55 * - Driver - DBRef Support From 891c674ed1a905aba60eaea6e004416d2cd29918 Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Fri, 9 Feb 2024 11:26:34 -0600 Subject: [PATCH 120/308] DOCS-14325 jq refactor (#6307) --- source/reference/log-messages.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/reference/log-messages.txt b/source/reference/log-messages.txt index e9712f6cb20..4e42e24c31e 100644 --- a/source/reference/log-messages.txt +++ b/source/reference/log-messages.txt @@ -1264,7 +1264,7 @@ following returns only the slow operations that took above .. code-block:: bash - jq '. | select(.attr.durationMillis>=2000)' /var/log/mongodb/mongod.log + jq 'select(.attr.durationMillis>=2000)' /var/log/mongodb/mongod.log Consult the `jq documentation `_ for more information on the ``jq`` filters shown in this example. @@ -1285,14 +1285,14 @@ The following example prints only the log messages of .. code-block:: bash - jq '. | select(.c=="REPL")' /var/log/mongodb/mongod.log + jq 'select(.c=="REPL")' /var/log/mongodb/mongod.log The following example prints all log messages *except* those of :ref:`component ` type **REPL**: .. code-block:: bash - jq '. | select(.c!="REPL")' /var/log/mongodb/mongod.log + jq 'select(.c!="REPL")' /var/log/mongodb/mongod.log The following example print log messages of :ref:`component ` type **REPL** *or* @@ -1300,7 +1300,7 @@ The following example print log messages of .. code-block:: bash - jq '. | select( .c as $c | ["REPL", "STORAGE"] | index($c) )' /var/log/mongodb/mongod.log + jq 'select( .c as $c | ["REPL", "STORAGE"] | index($c) )' /var/log/mongodb/mongod.log Consult the `jq documentation `_ for more information on the ``jq`` filters shown in this example. @@ -1329,7 +1329,7 @@ following ``jq`` syntax: .. code-block:: bash - jq '. | select( .id as $id | [22943, 22944] | index($id) )' /var/log/mongodb/mongod.log + jq 'select( .id as $id | [22943, 22944] | index($id) )' /var/log/mongodb/mongod.log Consult the `jq documentation `_ for more information on the ``jq`` filters shown in this example. @@ -1345,7 +1345,7 @@ the following returns all log entries that occurred on April 15th, 2020: .. code-block:: bash - jq '. | select(.t["$date"] >= "2020-04-15T00:00:00.000" and .t["$date"] <= "2020-04-15T23:59:59.999")' /var/log/mongodb/mongod.log + jq 'select(.t["$date"] >= "2020-04-15T00:00:00.000" and .t["$date"] <= "2020-04-15T23:59:59.999")' /var/log/mongodb/mongod.log Note that this syntax includes the full timestamp, including milliseconds but excluding the timezone offset. @@ -1357,7 +1357,7 @@ limit results to the month of May, 2020: .. code-block:: bash - jq '. | select(.t["$date"] >= "2020-05-01T00:00:00.000" and .t["$date"] <= "2020-05-31T23:59:59.999" and .attr.remote)' /var/log/mongodb/mongod.log + jq 'select(.t["$date"] >= "2020-05-01T00:00:00.000" and .t["$date"] <= "2020-05-31T23:59:59.999" and .attr.remote)' /var/log/mongodb/mongod.log Consult the `jq documentation `_ for more information on the ``jq`` filters shown in this example. From 3c7422fa83119377f29aa72ff6d80efbc0392b70 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Fri, 9 Feb 2024 09:30:16 -0800 Subject: [PATCH 121/308] DOCSP-36325-change-stream-update (#6312) * DOCSP-36325-change-stream-update * DOCSP-36325-change-stream-update * DOCSP-36325-change-stream-update * DOCSP-36325-change-stream-update * DOCSP-36325-change-stream-update --------- Co-authored-by: jason-price-mongodb --- .../operator/aggregation/changeStreamSplitLargeEvent.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/reference/operator/aggregation/changeStreamSplitLargeEvent.txt b/source/reference/operator/aggregation/changeStreamSplitLargeEvent.txt index fa371de5bd5..c7fe2503c19 100644 --- a/source/reference/operator/aggregation/changeStreamSplitLargeEvent.txt +++ b/source/reference/operator/aggregation/changeStreamSplitLargeEvent.txt @@ -13,12 +13,12 @@ Definition .. pipeline:: $changeStreamSplitLargeEvent -.. versionadded:: 7.0 (*Also available in 6.0.9*) +*New in MongoDB 7.0 (and 6.0.9).* If a :ref:`change stream ` has large events that exceed 16 MB, a ``BSONObjectTooLarge`` exception is returned. Starting in -MongoDB 6.0.9, you can use a ``$changeStreamSplitLargeEvent`` stage to -split the events into smaller fragments. +MongoDB 7.0 (and 6.0.9), you can use a ``$changeStreamSplitLargeEvent`` +stage to split the events into smaller fragments. You should only use ``$changeStreamSplitLargeEvent`` when strictly necessary. For example, if your application requires full document pre- From 7fabc7dda5a00bdcdfd31fdbb9345958ad8ea981 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Fri, 9 Feb 2024 12:53:56 -0500 Subject: [PATCH 122/308] (DOCSP-34890): Add vector search index type for Atlas Search management commands (#5747) (#6328) * WIP * (DOCSP-34890): Add vector search index type for Atlas Search management commands * fix pluralization * add taxonomy info * tweak vector syntax * add Learn More section * formatting fix * fix formatting * remove comma * fix code block formatting * address review feedback * consistent wording * remove word * tweak example explanation --- .../field-definitions/type.rst | 6 ++ .../vector-search-index-definition-fields.rst | 17 +++++ .../reference/command/createSearchIndexes.txt | 66 ++++++++++++++++++- .../db.collection.createSearchIndex.txt | 62 +++++++++++++++-- 4 files changed, 144 insertions(+), 7 deletions(-) create mode 100644 source/includes/atlas-search-commands/field-definitions/type.rst create mode 100644 source/includes/atlas-search-commands/vector-search-index-definition-fields.rst diff --git a/source/includes/atlas-search-commands/field-definitions/type.rst b/source/includes/atlas-search-commands/field-definitions/type.rst new file mode 100644 index 00000000000..980cd2d84bf --- /dev/null +++ b/source/includes/atlas-search-commands/field-definitions/type.rst @@ -0,0 +1,6 @@ +Type of search index to create. You can specify either: + +- ``search`` +- ``vectorSearch`` + +If you omit the ``type`` field, the index type is ``search``. diff --git a/source/includes/atlas-search-commands/vector-search-index-definition-fields.rst b/source/includes/atlas-search-commands/vector-search-index-definition-fields.rst new file mode 100644 index 00000000000..82d564ebe46 --- /dev/null +++ b/source/includes/atlas-search-commands/vector-search-index-definition-fields.rst @@ -0,0 +1,17 @@ +The vector search index definition takes the following fields: + +.. code-block:: javascript + + { + "fields": [ + { + "type": "vector" | "filter", + "path": "", + "numDimensions": , + "similarity": "euclidean" | "cosine" | "dotProduct" + } + ] + } + +For explanations of vector search index definition fields, see +:ref:`avs-types-vector-search`. diff --git a/source/reference/command/createSearchIndexes.txt b/source/reference/command/createSearchIndexes.txt index 112152c5d74..9205095c839 100644 --- a/source/reference/command/createSearchIndexes.txt +++ b/source/reference/command/createSearchIndexes.txt @@ -4,6 +4,9 @@ createSearchIndexes .. default-domain:: mongodb +.. meta:: + :keywords: atlas search + .. contents:: On this page :local: :backlinks: none @@ -17,7 +20,7 @@ Definition .. versionadded:: 7.0 (*Also available starting in 6.0.7*) -.. |fts-indexes| replace:: :atlas:`{+fts+} indexes ` +.. |fts-indexes| replace:: :atlas:`{+fts+} indexes ` or :atlas:`Vector Search indexes ` .. include:: /includes/atlas-search-commands/command-descriptions/createSearchIndexes-description.rst @@ -39,6 +42,7 @@ Command syntax: indexes: [ { name: "", + type: "", definition: { /* search index definition fields */ } @@ -82,11 +86,20 @@ The ``createSearchIndexes`` command takes the following fields: If you do not specify a ``name``, the index is named ``default``. + * - ``indexes.type`` + - string + - Optional + - .. include:: /includes/atlas-search-commands/field-definitions/type.rst + * - ``indexes.definition`` - document - Required - - Document describing the index to create. For details on - ``definition`` syntax, see :ref:`search-index-definition-create`. + - Document describing the index to create. The ``definition`` syntax + depends on whether you create a standard search index or a Vector + Search index. For the ``definition`` syntax, see: + + - :ref:`search-index-definition-create` + - :ref:`vector-search-index-definition-create` .. _search-index-definition-create: @@ -95,6 +108,13 @@ Search Index Definition Syntax .. include:: /includes/atlas-search-commands/search-index-definition-fields.rst +.. _vector-search-index-definition-create: + +Vector Search Index Definition Syntax +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/atlas-search-commands/vector-search-index-definition-fields.rst + Behavior -------- @@ -241,3 +261,43 @@ or digits. ``searchIndex03`` uses a dynamic field mapping, meaning the index contains all fields in the collection that have :ref:`supported data types `. + +Create a Vector Search Index +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following example creates a vector search index named +``vectorSearchIndex01`` on the ``movies`` collection: + +.. code-block:: javascript + + db.runCommand( { + createSearchIndexes: "movies", + indexes: [ + { + name: "vectorSearchIndex01", + type: "vectorSearch", + definition: { + fields: [ + { + type: "vector", + numDimensions: 1, + path: "genre", + similarity: "cosine" + } + ] + } + } + ] + } ) + +The vector search index contains one dimension and indexes the +``genre`` field. + +Learn More +---------- + +- :pipeline:`$vectorSearch` aggregation stage + +- :ref:`Tutorial: Semantic Search ` + +- :atlas:`Atlas Vector Search Changelog ` diff --git a/source/reference/method/db.collection.createSearchIndex.txt b/source/reference/method/db.collection.createSearchIndex.txt index 3bb5b49cc7a..f38852b3ebd 100644 --- a/source/reference/method/db.collection.createSearchIndex.txt +++ b/source/reference/method/db.collection.createSearchIndex.txt @@ -4,6 +4,9 @@ db.collection.createSearchIndex() .. default-domain:: mongodb +.. meta:: + :keywords: atlas search + .. contents:: On this page :local: :backlinks: none @@ -17,7 +20,7 @@ Definition .. versionadded:: 7.0 (*Also available starting in 6.0.7*) -.. |fts-index| replace:: :atlas:`{+fts+} index ` +.. |fts-index| replace:: :atlas:`{+fts+} index ` or :atlas:`Vector Search index ` .. include:: /includes/atlas-search-commands/command-descriptions/createSearchIndex-method.rst @@ -36,6 +39,7 @@ Command syntax: db..createSearchIndex( , + , { } @@ -65,12 +69,20 @@ Command Fields If you do not specify a ``name``, the index is named ``default``. + * - ``type`` + - string + - Optional + - .. include:: /includes/atlas-search-commands/field-definitions/type.rst + * - ``definition`` - document - Required - - Document describing the index to create. For details on - ``definition`` syntax, see - :ref:`search-index-definition-create-mongosh`. + - Document describing the index to create. The ``definition`` syntax + depends on whether you create a standard search index or a Vector + Search index. For the ``definition`` syntax, see: + + - :ref:`search-index-definition-create-mongosh` + - :ref:`vector-search-index-definition-create-mongosh` .. _search-index-definition-create-mongosh: @@ -79,6 +91,13 @@ Search Index Definition Syntax .. include:: /includes/atlas-search-commands/search-index-definition-fields.rst +.. _vector-search-index-definition-create-mongosh: + +Vector Search Index Definition Syntax +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/atlas-search-commands/vector-search-index-definition-fields.rst + Behavior -------- @@ -166,3 +185,38 @@ with the name ``default`` on the ``food`` collection: } } ) + +Create a Vector Search Index +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following example creates a vector search index named +``vectorSearchIndex01`` on the ``movies`` collection: + +.. code-block:: javascript + + db.movies.createSearchIndex( + "vectorSearchIndex01", + "vectorSearch", + { + fields: [ + { + type: "vector", + numDimensions: 1, + path: "genre", + similarity: "cosine" + } + ] + } + ) + +The vector search index contains one dimension and indexes the ``genre`` +field. + +Learn More +---------- + +- :pipeline:`$vectorSearch` aggregation stage + +- :ref:`Tutorial: Semantic Search ` + +- :atlas:`Atlas Vector Search Changelog ` From 17dbf0283fe1608b51e03cd11c2150d5a5e1e2f7 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Mon, 12 Feb 2024 10:04:02 -0500 Subject: [PATCH 123/308] DOCSP-36045 Add SQL Comparison Learn More on Query Operator Pages (#6309) * DOCSP-36045 Add SQL comparison to Learn More on query operator pages * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * --- ...acts-inequality-operators-selectivity.yaml | 6 +- source/reference/operator/query/ne.txt | 188 ++++++++++-------- 2 files changed, 109 insertions(+), 85 deletions(-) diff --git a/source/includes/extracts-inequality-operators-selectivity.yaml b/source/includes/extracts-inequality-operators-selectivity.yaml index 939653b93ad..6735bdad1e3 100644 --- a/source/includes/extracts-inequality-operators-selectivity.yaml +++ b/source/includes/extracts-inequality-operators-selectivity.yaml @@ -18,9 +18,9 @@ content: | --- ref: ne_operators_selectivity content: | - The inequality operator :query:`$ne` is *not* very selective since + The inequality operator ``$ne`` is *not* very selective since it often matches a large portion of the index. As a result, in many - cases, a :query:`$ne` query with an index may perform no better - than a :query:`$ne` query that must scan all documents in a + cases, a ``$ne`` query with an index may perform no better + than a ``$ne`` query that must scan all documents in a collection. See also :ref:`read-operations-query-selectivity`. ... diff --git a/source/reference/operator/query/ne.txt b/source/reference/operator/query/ne.txt index a47a015b316..63e86c333b1 100644 --- a/source/reference/operator/query/ne.txt +++ b/source/reference/operator/query/ne.txt @@ -11,7 +11,7 @@ $ne .. contents:: On this page :local: :backlinks: none - :depth: 1 + :depth: 2 :class: singlecol Definition @@ -19,7 +19,7 @@ Definition .. query:: $ne - :query:`$ne` selects the documents where the value of the + ``$ne`` selects the documents where the value of the specified field is not equal to the specified value. This includes documents that do not contain the specified field. @@ -35,7 +35,7 @@ Compatibility Syntax ------ -The :query:`$ne` operator has the following form: +The ``$ne`` operator has the following form: .. code-block:: javascript @@ -44,91 +44,115 @@ The :query:`$ne` operator has the following form: Examples -------- -The following examples use the ``inventory`` collection. Create the -collection: +The following examples use the ``inventory`` collection. To create the +collection run the following :method:`insertMany() ` +command in :binary:`~bin.mongosh`: .. include:: /includes/examples-create-inventory.rst -Match Document Fields -~~~~~~~~~~~~~~~~~~~~~ +Match Document Fields That Are Not Equal +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Select all documents in the ``inventory`` collection where ``quantity`` -is not equal to ``20``: - -.. code-block:: javascript - - db.inventory.find( { quantity: { $ne: 20 } } ) - -The query will also select documents that do not have the ``quantity`` -field. - -Example output: - -.. code-block:: javascript - - { - _id: ObjectId("61ba667dfe687fce2f042420"), - item: 'nuts', - quantity: 30, - carrier: { name: 'Shipit', fee: 3 } - }, - { - _id: ObjectId("61ba667dfe687fce2f042421"), - item: 'bolts', - quantity: 50, - carrier: { name: 'Shipit', fee: 4 } - }, - { - _id: ObjectId("61ba667dfe687fce2f042422"), - item: 'washers', - quantity: 10, - carrier: { name: 'Shipit', fee: 1 } - } - -Perform an Update Based on Embedded Document Fields -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following example sets the ``price`` field based on a :query:`$ne` -comparison against a field in an embedded document. - -.. code-block:: javascript - - db.inventory.updateMany( { "carrier.fee": { $ne: 1 } }, { $set: { "price": 9.99 } } ) - -Example output: - -.. code-block:: javascript - - { - _id: ObjectId("61ba66e2fe687fce2f042423"), - item: 'nuts', - quantity: 30, - carrier: { name: 'Shipit', fee: 3 }, - price: 9.99 - }, - { - _id: ObjectId("61ba66e2fe687fce2f042424"), - item: 'bolts', - quantity: 50, - carrier: { name: 'Shipit', fee: 4 }, - price: 9.99 - }, - { - _id: ObjectId("61ba66e2fe687fce2f042425"), - item: 'washers', - quantity: 10, - carrier: { name: 'Shipit', fee: 1 } - } - -This :method:`~db.collection.updateMany()` operation searches for an -embedded document, ``carrier``, with a subfield named ``fee``. It sets -``{ price: 9.99 }`` in each document where ``fee`` has a value that -does not equal 1 or where the ``fee`` subfield does not exist. +is not equal to ``20``. This query also selects documents that do not +have the ``quantity`` field: + +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.inventory.find( { quantity: { $ne: 20 } } ) + + .. output:: + :language: javascript + :visible: false + + { + _id: ObjectId("61ba667dfe687fce2f042420"), + item: 'nuts', + quantity: 30, + carrier: { name: 'Shipit', fee: 3 } + }, + { + _id: ObjectId("61ba667dfe687fce2f042421"), + item: 'bolts', + quantity: 50, + carrier: { name: 'Shipit', fee: 4 } + }, + { + _id: ObjectId("61ba667dfe687fce2f042422"), + item: 'washers', + quantity: 10, + carrier: { name: 'Shipit', fee: 1 } + } + +The SQL equivalent to this query is: + +.. code-block:: sql + :copyable: false + + SELECT * FROM INVENTORY WHERE QUANTITIY != 20 + +Update Based on Not Equal Embedded Document Fields +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following example sets the ``price`` field based on a ``$ne`` +comparison against a field in an embedded document. The +:method:`~db.collection.updateMany()` operation searches for an +embedded document, ``carrier``, with a subfield named ``fee``. It uses +:update:`$set` to update the ``price`` field to ``9.99`` in each +document where ``fee`` has a value that does not equal ``1`` or +where the ``fee`` subfield does not exist: + +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.inventory.updateMany( + { "carrier.fee" : { $ne: 1 } }, + { $set: { "price": 9.99 } } + ) + + .. output:: + :language: javascript + :visible: false + + { + _id: ObjectId("61ba66e2fe687fce2f042423"), + item: 'nuts', + quantity: 30, + carrier: { name: 'Shipit', fee: 3 }, + price: 9.99 + }, + { + _id: ObjectId("61ba66e2fe687fce2f042424"), + item: 'bolts', + quantity: 50, + carrier: { name: 'Shipit', fee: 4 }, + price: 9.99 + }, + { + _id: ObjectId("61ba66e2fe687fce2f042425"), + item: 'washers', + quantity: 10, + carrier: { name: 'Shipit', fee: 1 } + } + +The SQL equivalent to this query is: + +.. code-block:: sql + :copyable: false + + UPDATE INVENTORY SET PRICE = '9.99' WHERE carrierfee != 1 .. include:: /includes/extracts/ne_operators_selectivity.rst -.. seealso:: - - - :method:`~db.collection.find()` - - :update:`$set` +Learn More +---------- +- :ref:`sql-to-mongodb-mapping` +- :ref:`read-operations-query-document` \ No newline at end of file From 0a9cc670560d5f438ae6cbec3650f0541b024967 Mon Sep 17 00:00:00 2001 From: Nick Villahermosa Date: Mon, 12 Feb 2024 15:51:22 -0500 Subject: [PATCH 124/308] DOCSP-31098 Contention factor doc fixes (#6323) * Moved include, fixed default value in Limitations topic * Added taxonomy tagging * Link title fix --- .../fundamentals/encrypt-and-query.txt | 12 +++++++++++- .../queryable-encryption/reference/limitations.txt | 8 +++++++- .../qe-csfle-contention.rst} | 3 ++- 3 files changed, 20 insertions(+), 3 deletions(-) rename source/includes/{fact-qe-csfle-contention.rst => queryable-encryption/qe-csfle-contention.rst} (95%) diff --git a/source/core/queryable-encryption/fundamentals/encrypt-and-query.txt b/source/core/queryable-encryption/fundamentals/encrypt-and-query.txt index f7e252a6fc6..e4a00fcfd1e 100644 --- a/source/core/queryable-encryption/fundamentals/encrypt-and-query.txt +++ b/source/core/queryable-encryption/fundamentals/encrypt-and-query.txt @@ -1,3 +1,13 @@ +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: code example, node.js + +.. meta:: + :keywords: queryable encryption, contention + .. _qe-fundamentals-encrypt-query: ================================= @@ -216,7 +226,7 @@ Configure Contention Factor Include the ``contention`` property on queryable fields to prefer either find performance, or write and update performance. -.. include:: /includes/fact-qe-csfle-contention.rst +.. include:: /includes/queryable-encryption/qe-csfle-contention.rst Example +++++++ diff --git a/source/core/queryable-encryption/reference/limitations.txt b/source/core/queryable-encryption/reference/limitations.txt index 8110417f0a6..a0c0ce039ba 100644 --- a/source/core/queryable-encryption/reference/limitations.txt +++ b/source/core/queryable-encryption/reference/limitations.txt @@ -1,3 +1,6 @@ +.. meta:: + :keywords: queryable encryption, contention, redaction + .. _qe-reference-encryption-limits: =========== @@ -37,7 +40,10 @@ number of concurrent connections. You can set the contention factor only when specifying a field for encryption. Once you specify a field for encryption, the contention factor is immutable. If -you don't specify the contention factor, it uses the default value of ``4``. +you don't specify the contention factor, it uses the default value of +``8``. + +For more information, see :ref:`Configuring contention factor `. Manual Metadata Collection Compaction ------------------------------------- diff --git a/source/includes/fact-qe-csfle-contention.rst b/source/includes/queryable-encryption/qe-csfle-contention.rst similarity index 95% rename from source/includes/fact-qe-csfle-contention.rst rename to source/includes/queryable-encryption/qe-csfle-contention.rst index 87e187c51ad..04f71c76c76 100644 --- a/source/includes/fact-qe-csfle-contention.rst +++ b/source/includes/queryable-encryption/qe-csfle-contention.rst @@ -11,7 +11,8 @@ at index 0. ``contention = 4`` creates an array with 5 elements at indexes 0-4. MongoDB increments a random array element during insert. If unset, ``contention`` defaults to 8. -High contention improves the performance of insert and update operations on low cardinality fields, but decreases find performance. +High contention improves the performance of insert and update operations +on low cardinality fields, but decreases find performance. Consider increasing ``contention`` above the default value of 8 only if: From d1caef8a6641dad90e54d1ef01bc36cbdec1c7be Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:47:06 -0500 Subject: [PATCH 125/308] DOCSP-35385 $shardedDataDistribution preferred over cleanupOrphaned; (#6310) --- .../shardedDataDistribution-orphaned-docs.rst | 17 ++++++++ source/reference/command/cleanupOrphaned.txt | 7 +++ .../aggregation/shardedDataDistribution.txt | 43 ++++++++++++++++++- 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 source/includes/shardedDataDistribution-orphaned-docs.rst diff --git a/source/includes/shardedDataDistribution-orphaned-docs.rst b/source/includes/shardedDataDistribution-orphaned-docs.rst new file mode 100644 index 00000000000..c96329cab5c --- /dev/null +++ b/source/includes/shardedDataDistribution-orphaned-docs.rst @@ -0,0 +1,17 @@ +Starting in MongoDB 6.0.3, you can run an aggregation using the +:pipeline:`$shardedDataDistribution` stage to confirm no orphaned +documents remain: + +.. code-block:: javascript + + db.aggregate([ + { $shardedDataDistribution: { } }, + { $match: { "ns": "." } } + ]) + +``$shardedDataDistribution`` has output similar to the following: + +.. include:: /includes/shardedDataDistribution-output-example.rst + +Ensure that ``"numOrphanedDocs"`` is ``0`` for each shard in the +cluster. diff --git a/source/reference/command/cleanupOrphaned.txt b/source/reference/command/cleanupOrphaned.txt index 62a8d0683ff..566afd4413e 100644 --- a/source/reference/command/cleanupOrphaned.txt +++ b/source/reference/command/cleanupOrphaned.txt @@ -10,6 +10,13 @@ cleanupOrphaned :depth: 1 :class: singlecol +.. important:: + + Starting in MongoDB 6.0.3, you should run an aggregation using the + :pipeline:`$shardedDataDistribution` stage to confirm no orphaned + documents remain. For details, + see :ref:`shardedDataDistribution-no-orphaned-docs`. + Definition ---------- diff --git a/source/reference/operator/aggregation/shardedDataDistribution.txt b/source/reference/operator/aggregation/shardedDataDistribution.txt index 450ff6cca44..63a249be322 100644 --- a/source/reference/operator/aggregation/shardedDataDistribution.txt +++ b/source/reference/operator/aggregation/shardedDataDistribution.txt @@ -51,12 +51,51 @@ following fields: Examples -------- +Return All Sharded Data Distibution Metrics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To return all sharded data distribution metrics, run the following: + .. code-block:: javascript - db.aggregate( [ + db.aggregate([ { $shardedDataDistribution: { } } - ] ) + ]) Example output: .. include:: /includes/shardedDataDistribution-output-example.rst + +Return Metrics for a Specific Shard +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To return sharded data distribution metrics for a specific shard, +run the following: + +.. code-block:: javascript + + db.aggregate([ + { $shardedDataDistribution: { } }, + { $match: { "shards.shardName": "" } } + ]) + +Return Metrics for a Namespace +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To return sharded data distribution data for a namespace, run the +following: + +.. code-block:: javascript + + db.aggregate([ + { $shardedDataDistribution: { } }, + { $match: { "ns": "." } } + ]) + +.. _shardedDataDistribution-no-orphaned-docs: + +Confirm No Orphaned Documents Remain +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/shardedDataDistribution-orphaned-docs.rst + From 72bf96f789e9297388ab7ab9076603b22a413773 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Tue, 13 Feb 2024 14:03:20 -0500 Subject: [PATCH 126/308] remove patch release redirect (#6362) --- config/redirects | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/config/redirects b/config/redirects index 62716802442..23c462f3013 100644 --- a/config/redirects +++ b/config/redirects @@ -2532,9 +2532,6 @@ raw: ${prefix}/${version}/applications/drivers -> ${base}/drivers/ [v4.2-*]: ${prefix}/${version}support/ -> ${base}/${version}/support [v4.2-*]: ${prefix}/${version}tutorial/resync-replica-set-member/ -> ${base}/${version}/tutorial/resync-replica-set-member/ -# DOCSP-32198 Redirect removed page -[v7.0-*]: ${prefix}/${version}/tutorial/upgrade-revision -> ${base}/${version}/release-notes/ - # DOCSP-31908 Removing free monitoring pages after decomission [*]: ${prefix}/${version}/reference/method/db.enableFreeMonitoring -> ${base}/${version}/administration/free-monitoring/ [*]: ${prefix}/${version}/reference/method/db.disableFreeMonitoring -> ${base}/${version}/administration/free-monitoring/ @@ -2572,4 +2569,4 @@ raw: https://mongodb.github.io/mongo-java-driver/ -> ${base}/drivers/java/sync/c [v7.0-*]: ${prefix}/${version}/core/data-model-design -> ${base}/${version}/data-modeling/embedding-vs-references # DOCSP-35889 -(v6.1-*]: ${prefix}/${version}/reference/operator/aggregation/first-array-element -> ${base}/${version}/reference/operator/aggregation/first/ \ No newline at end of file +(v6.1-*]: ${prefix}/${version}/reference/operator/aggregation/first-array-element -> ${base}/${version}/reference/operator/aggregation/first/ From c671b265a2452d6db5dc209580b7c88b84890d6f Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 14 Feb 2024 10:28:11 -0500 Subject: [PATCH 127/308] DOCSP-36704 findAndModify Nit Edit (#6356) * DOCSP-36704 findAndModify Nit Edit * include mongosh def * JM feedback --- .../extracts-fact-findandmodify-return.yaml | 2 +- source/reference/command/findAndModify.txt | 26 +++++++++---------- .../method/db.collection.findAndModify.txt | 18 ++++++------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/source/includes/extracts-fact-findandmodify-return.yaml b/source/includes/extracts-fact-findandmodify-return.yaml index 88747a44775..6c1677daa80 100644 --- a/source/includes/extracts-fact-findandmodify-return.yaml +++ b/source/includes/extracts-fact-findandmodify-return.yaml @@ -8,7 +8,7 @@ content: | - If ``new`` is ``true``: - - the modified document if the query returns a match; + - the updated document if the query returns a match; - the inserted document if ``upsert: true`` and no document matches the query; diff --git a/source/reference/command/findAndModify.txt b/source/reference/command/findAndModify.txt index bb70a624760..afa29c59506 100644 --- a/source/reference/command/findAndModify.txt +++ b/source/reference/command/findAndModify.txt @@ -21,7 +21,7 @@ Definition .. dbcommand:: findAndModify - The :dbcommand:`findAndModify` command modifies and returns a single + The :dbcommand:`findAndModify` command updates and returns a single document. By default, the returned document does not include the modifications made on the update. To return the document with the modifications made on the update, use the ``new`` option. @@ -92,7 +92,7 @@ The command takes the following fields: employs the same :ref:`query selectors ` as used in the :method:`db.collection.find()` method. Although the query may match multiple documents, |operation| - **will only select one document to modify**. + **will only select one document to update**. If unspecified, defaults to an empty document. @@ -104,9 +104,9 @@ The command takes the following fields: ``sort`` - document - - Optional. Determines which document the operation modifies if the query selects - multiple documents. |operation| modifies - the first document in the sort order specified by this argument. + - Optional. Determines which document the operation updates if the query + selects multiple documents. |operation| updates the first document in the + sort order specified by this argument. Starting in MongoDB 4.2 (and 4.0.12+, 3.6.14+, and 3.4.23+), the operation errors if the sort argument is not a document. @@ -135,14 +135,14 @@ The command takes the following fields: - Starting in MongoDB 4.2, if passed an :ref:`aggregation pipeline ` ``[ , , ... ]``, - |operation| modifies the document per the pipeline. The pipeline + |operation| updates the document per the pipeline. The pipeline can consist of the following stages: .. include:: /includes/list-update-agg-stages.rst * - ``new`` - boolean - - Optional. When ``true``, returns the modified document rather than the original. + - Optional. When ``true``, returns the updated document rather than the original. The default is ``false``. * - ``fields`` @@ -294,7 +294,7 @@ The ``lastErrorObject`` embedded document contains the following fields: - Contains ``true`` if an ``update`` operation: - - Modified an existing document. + - Updated an existing document. - Found the document, but it was already in the desired destination state so no update actually occurred. @@ -355,7 +355,7 @@ Shard Key Modification .. include:: /includes/shard-key-modification-warning.rst -To modify the **existing** shard key value with +To update the **existing** shard key value with :dbcommand:`findAndModify`: - You :red:`must` run on a :binary:`~bin.mongos`. Do :red:`not` @@ -499,7 +499,7 @@ This command performs the following actions: "ok" : 1 } -To return the modified document in the ``value`` field, add the +To return the updated document in the ``value`` field, add the ``new:true`` option to the command. If no document match the ``query`` condition, the command @@ -525,7 +525,7 @@ following form: However, the :method:`~db.collection.findAndModify()` shell helper method returns only the unmodified document, or if ``new`` is -``true``, the modified document. +``true``, the updated document. .. code-block:: javascript @@ -745,7 +745,7 @@ Create a collection ``students`` with the following documents: { "_id" : 3, "grades" : [ 95, 110, 100 ] } ] ) -To modify all elements that are greater than or equal to ``100`` in the +To update all elements that are greater than or equal to ``100`` in the ``grades`` array, use the positional :update:`$[\]` operator with the ``arrayFilters`` option: @@ -802,7 +802,7 @@ Create a collection ``students2`` with the following documents: The following operation finds a document where the ``_id`` field equals ``1`` and uses the filtered positional operator :update:`$[\]` with -the ``arrayFilters`` to modify the ``mean`` for all elements in the +the ``arrayFilters`` to update the ``mean`` for all elements in the ``grades`` array where the grade is greater than or equal to ``85``. .. code-block:: javascript diff --git a/source/reference/method/db.collection.findAndModify.txt b/source/reference/method/db.collection.findAndModify.txt index cd27cf81185..fde4406b0d8 100644 --- a/source/reference/method/db.collection.findAndModify.txt +++ b/source/reference/method/db.collection.findAndModify.txt @@ -26,7 +26,7 @@ Definition .. |dbcommand| replace:: :dbcommand:`findAndModify` command .. include:: /includes/fact-mongosh-shell-method-alt.rst - Modifies and returns a single document. By default, the returned + Updates and returns a single document. By default, the returned document does not include the modifications made on the update. To return the document with the modifications made on the update, use the ``new`` option. @@ -101,8 +101,8 @@ parameter with the following embedded document fields: ``sort`` - document - - Optional. Determines which document the operation modifies if the query selects - multiple documents. |operation| modifies + - Optional. Determines which document the operation updates if the query + selects multiple documents. |operation| updates the first document in the sort order specified by this argument. Starting in MongoDB 4.2 (and 4.0.12+, 3.6.14+, and 3.4.23+), the operation @@ -132,14 +132,14 @@ parameter with the following embedded document fields: - Starting in MongoDB 4.2, if passed an :ref:`aggregation pipeline ` ``[ , , ... ]``, - |operation| modifies the document per the pipeline. The pipeline + |operation| updates the document per the pipeline. The pipeline can consist of the following stages: .. include:: /includes/list-update-agg-stages.rst * - ``new`` - boolean - - Optional. When ``true``, returns the modified document rather than the original. + - Optional. When ``true``, returns the updated document rather than the original. The default is ``false``. * - ``fields`` @@ -287,7 +287,7 @@ Shard Key Modification .. include:: /includes/shard-key-modification-warning.rst -To modify the **existing** shard key value with +To update the **existing** shard key value with :method:`db.collection.findAndModify()`: - You :red:`must` run on a :binary:`~bin.mongos`. Do :red:`not` @@ -405,7 +405,7 @@ This method performs the following actions: "score" : 5 } - To return the modified document, add the ``new:true`` option to + To return the updated document, add the ``new:true`` option to the method. If no document matched the ``query`` condition, the method @@ -574,7 +574,7 @@ Create a collection ``students`` with the following documents: { "_id" : 3, "grades" : [ 95, 110, 100 ] } ] ) -To modify all elements that are greater than or equal to ``100`` in the +To update all elements that are greater than or equal to ``100`` in the ``grades`` array, use the filtered positional operator :update:`$[\]` with the ``arrayFilters`` option in the :method:`db.collection.findAndModify` method: @@ -630,7 +630,7 @@ Create a collection ``students2`` with the following documents: The following operation finds a document where the ``_id`` field equals ``1`` and uses the filtered positional operator :update:`$[\]` with -the ``arrayFilters`` to modify the ``mean`` for all elements in the +the ``arrayFilters`` to update the ``mean`` for all elements in the ``grades`` array where the grade is greater than or equal to ``85``. .. code-block:: javascript From 925e2cbf69c0aff67ef53404c590eaa1a9a55f97 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Wed, 14 Feb 2024 11:09:20 -0500 Subject: [PATCH 128/308] DOCSP-22789 add indexes behavior for rename (#6216) * add indexes behavior for rename * wording * wording * remove 'you must' * review feedback * more edits * wording * wording * updates * edits * formatting * formatting * review feedback --- source/reference/operator/update/rename.txt | 101 +++++++++++++------- source/tutorial/manage-indexes.txt | 2 + 2 files changed, 68 insertions(+), 35 deletions(-) diff --git a/source/reference/operator/update/rename.txt b/source/reference/operator/update/rename.txt index 20d777af415..7a5cbf009fe 100644 --- a/source/reference/operator/update/rename.txt +++ b/source/reference/operator/update/rename.txt @@ -15,52 +15,79 @@ Definition .. update:: $rename - The :update:`$rename` operator updates the name of a field and has the following form: + The :update:`$rename` operator updates the name of a field. + +Syntax +------ - .. code-block:: javascript +.. code-block:: javascript - {$rename: { : , : , ... } } + { $rename: { : , : , ... } } - The new field name must differ from the existing field name. To - specify a ```` in an embedded document, use :term:`dot - notation`. +The new field name must differ from the existing field name. To +specify a ```` in an embedded document, use :term:`dot +notation`. - Consider the following example: +Consider the following example: - .. code-block:: javascript +.. code-block:: javascript - db.students.updateOne( - { _id: 1 }, - { $rename: { 'nickname': 'alias', 'cell': 'mobile' } } - ) + db.students.updateOne( + { _id: 1 }, { $rename: { 'nickname': 'alias', 'cell': 'mobile' } } + ) - This operation renames the field ``nickname`` to ``alias``, and the - field ``cell`` to ``mobile``. +The preceding operation renames the ``nickname`` field to ``alias`` and +the ``cell`` field to ``mobile`` in a document where ``_id`` is 1. Behavior -------- +When you run a ``$rename`` operation, MongoDB performs the following +actions: + +- Delete the old ```` and field with ```` from the + document (using :update:`$unset`). + +- Perform a :update:`$set` operation with ````, using the value + from ````. + +Atomicity +~~~~~~~~~ + +Each document matched by an update command is updated in an individual +operation. Update operations (like ``$rename``) only guarantee atomicity +on a single-document level. + +Field Order +~~~~~~~~~~~ + +The ``$rename`` operation might not preserve the order of the fields in +the document. + +Update Processing Order +~~~~~~~~~~~~~~~~~~~~~~~ + .. include:: /includes/fact-update-operator-processing-order.rst -The :update:`$rename` operator logically performs an :update:`$unset` -of both the old name and the new name, and then performs a -:update:`$set` operation with the new name. As such, the operation may -not preserve the order of the fields in the document; i.e. the renamed -field may move within the document. +Rename Embedded Document Fields +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The ``$rename`` operator can move fields into and out of embedded +documents. -If the document already has a field with the ````, the -:update:`$rename` operator removes that field and renames the specified -```` to ````. +``$rename`` does not work on embedded documents in arrays. -If the field to rename does not exist in a document, :update:`$rename` -does nothing (i.e. no operation). +Other Considerations +~~~~~~~~~~~~~~~~~~~~ -For fields in embedded documents, the :update:`$rename` operator can -rename these fields as well as move the fields in and out of embedded -documents. :update:`$rename` does not work if these fields are in array -elements. +- If the document already has a field with the ````, the + :update:`$rename` operator removes that field and renames the + specified ```` to ````. -.. include:: /includes/extracts/update-operation-empty-operand-expressions-rename.rst +- If the field to rename does not exist in a document, :update:`$rename` + does nothing. + +- .. include:: /includes/extracts/update-operation-empty-operand-expressions-rename.rst Examples -------- @@ -102,10 +129,13 @@ name of the field and the new name: .. code-block:: javascript - db.students.updateMany( {}, { $rename: { "nmae": "name" } } ) + db.students.updateMany( + { "nmae": { $ne: null } }, + { $rename: { "nmae": "name" } } + ) -This operation renames the field ``nmae`` to ``name`` for all documents -in the collection: +This operation checks for documents where the ``nmae`` field is not null +and updates those documents to rename the ``nmae`` field to ``name``: .. code-block:: javascript @@ -123,10 +153,12 @@ in the collection: "name" : { "first" : "abigail", "last" : "adams" } } - { "_id" : 3, + { + "_id" : 3, "alias" : [ "Amazing grace" ], "mobile" : "111-111-1111", - "name" : { "first" : "grace", "last" : "hopper" } } + "name" : { "first" : "grace", "last" : "hopper" } + } .. _rename-field-in-embedded-document: @@ -170,4 +202,3 @@ This operation does nothing because there is no field named ``wife``. - :method:`db.collection.updateMany()` - :method:`db.collection.findAndModify()` - diff --git a/source/tutorial/manage-indexes.txt b/source/tutorial/manage-indexes.txt index 37652323b05..01cd83027b8 100644 --- a/source/tutorial/manage-indexes.txt +++ b/source/tutorial/manage-indexes.txt @@ -45,6 +45,8 @@ To learn how to remove an index in |compass|, see :compass:`Manage Indexes in Co .. .. include:: /includes/driver-remove-indexes-tabs.rst +.. _manage-indexes-modify: + Modify an Index --------------- From 0f073b2df56c9830261b69ba87a1c9e152f84499 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Wed, 14 Feb 2024 11:48:59 -0500 Subject: [PATCH 129/308] DOCSP-36611 Add aggregation example to project page (#6351) * formatting * remove copy/paste info * formatting * formatting * formatting * add shell note * wording * wording --- .../project-fields-from-query-results.txt | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/source/tutorial/project-fields-from-query-results.txt b/source/tutorial/project-fields-from-query-results.txt index 95c32a5e694..88b224435b0 100644 --- a/source/tutorial/project-fields-from-query-results.txt +++ b/source/tutorial/project-fields-from-query-results.txt @@ -412,6 +412,96 @@ Project Specific Array Elements in the Returned Array ``include("instock.0")`` projection will *not* project the array with the first element. +Project Fields with Aggregation Expressions +------------------------------------------- + +You can specify :ref:`aggregation expressions ` +in a query projection. Aggregation expressions let you project new +fields and modify the values of existing fields. + +For example, the following operation uses aggregation expressions to +override the value of the ``status`` field, and project new fields +``area`` and ``reportNumber``. + +.. note:: + + The following example uses MongoDB Shell syntax. For driver examples + of projection with aggregation, see your :driver:`driver + documentation `. + +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.inventory.find( + { }, + { + _id: 0, + item: 1, + status: { + $switch: { + branches: [ + { + case: { $eq: [ "$status", "A" ] }, + then: "Available" + }, + { + case: { $eq: [ "$status", "D" ] }, + then: "Discontinued" + }, + ], + default: "No status found" + } + }, + area: { + $concat: [ + { $toString: { $multiply: [ "$size.h", "$size.w" ] } }, + " ", + "$size.uom" + ] + }, + reportNumber: { $literal: 1 } + } + ) + + .. output:: + :language: javascript + + [ + { + item: 'journal', + status: 'Available', + area: '294 cm', + reportNumber: 1 + }, + { + item: 'planner', + status: 'Discontinued', + area: '685.5 cm', + reportNumber: 1 + }, + { + item: 'notebook', + status: 'Available', + area: '93.5 in', + reportNumber: 1 + }, + { + item: 'paper', + status: 'Discontinued', + area: '93.5 in', + reportNumber: 1 + }, + { + item: 'postcard', + status: 'Available', + area: '152.5 cm', + reportNumber: 1 + } + ] + .. _project-fields-atlas-ui: Project Fields to Return from a Query with {+atlas+} From 5dca1f40ecb7b33ed2136d61161ee31708cd783c Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Wed, 14 Feb 2024 09:25:52 -0800 Subject: [PATCH 130/308] DOCSP-35157 dos lastErrorObject field n in findAndModify command output (#6364) --- source/reference/command/findAndModify.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/reference/command/findAndModify.txt b/source/reference/command/findAndModify.txt index afa29c59506..93f59034104 100644 --- a/source/reference/command/findAndModify.txt +++ b/source/reference/command/findAndModify.txt @@ -288,6 +288,12 @@ The ``lastErrorObject`` embedded document contains the following fields: - Description + * - ``n`` + - integer + - Contains the number of documents that matched the update + predicate or the number of documents that the command inserted or + deleted. + * - ``updatedExisting`` - boolean From bb5298e904da5f8dbee2ef585a88c11cbe58f88d Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:27:10 -0600 Subject: [PATCH 131/308] removes versionadded as operatorCounters.match now exists in all supported releases (#6354) --- source/reference/command/serverStatus.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index 83346bd13ff..4100e17c94c 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -1906,8 +1906,6 @@ metrics The counter for ``$expr`` increments when the query runs. The counter for ``$gt`` does not. - .. versionadded:: 5.1 - .. serverstatus:: metrics.changeStreams.largeEventsSplit The number of change stream events larger than 16 MB that were split From e04077d81be72f7c071304c0aa86f16b638e854a Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 14 Feb 2024 16:46:39 -0500 Subject: [PATCH 132/308] DOCSP-36759 Write Concern Replica Set Emphasis (#6383) * DOCSP-36759 Write Concern Replica Set Emphasis * build errors --- source/reference/read-concern.txt | 8 ++++---- source/reference/write-concern.txt | 4 ++-- source/release-notes/4.0.txt | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/reference/read-concern.txt b/source/reference/read-concern.txt index a12ea5399e9..33500066a74 100644 --- a/source/reference/read-concern.txt +++ b/source/reference/read-concern.txt @@ -13,11 +13,11 @@ Read Concern :class: singlecol The ``readConcern`` option allows you to control the consistency and -isolation properties of the data read from replica sets and replica set -shards. +isolation properties of the data read from :ref:`replica sets ` +and :ref:`sharded clusters `. -Through the effective use of :doc:`write concerns -` and read concerns, you can adjust the level +Through the effective use of :ref:`write concerns ` +and read concerns, you can adjust the level of consistency and availability guarantees as appropriate, such as waiting for stronger consistency guarantees, or loosening consistency requirements to provide higher availability. diff --git a/source/reference/write-concern.txt b/source/reference/write-concern.txt index 275c270dac0..1848acbb28f 100644 --- a/source/reference/write-concern.txt +++ b/source/reference/write-concern.txt @@ -17,8 +17,8 @@ Write Concern Write concern describes the level of acknowledgment requested from -MongoDB for write operations to a standalone :binary:`~bin.mongod` or -to :ref:`Replica sets ` or to :ref:`sharded clusters +MongoDB for write operations to a standalone :binary:`~bin.mongod`, +:ref:`replica sets `, or :ref:`sharded clusters `. In sharded clusters, :binary:`~bin.mongos` instances will pass the write concern on to the shards. diff --git a/source/release-notes/4.0.txt b/source/release-notes/4.0.txt index 88d3fcd3fce..c7b89687d98 100644 --- a/source/release-notes/4.0.txt +++ b/source/release-notes/4.0.txt @@ -1537,11 +1537,11 @@ Network Layer Improvements - :parameter:`connPoolMaxInUseConnsPerHost` - - :parameter:`connPoolMaxShardedInUseConnsPerHost` + - ``connPoolMaxShardedInUseConnsPerHost`` - :parameter:`globalConnPoolIdleTimeoutMinutes` - - :parameter:`shardedConnPoolIdleTimeoutMinutes` + - ``shardedConnPoolIdleTimeoutMinutes`` Configuration Options ~~~~~~~~~~~~~~~~~~~~~ From 111520669068e2c83235e016acd29cd742e333e2 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Thu, 15 Feb 2024 10:28:25 -0500 Subject: [PATCH 133/308] DOCSP-36589 6.0.14 Release Notes (#6363) * DOCSP-36589 6.0.14 Release Notes * * * * * * * * --- .../includes/changelogs/releases/6.0.14.rst | 159 ++++++++++++++++++ source/release-notes/6.0-changelog.txt | 2 + source/release-notes/6.0.txt | 19 +++ 3 files changed, 180 insertions(+) create mode 100644 source/includes/changelogs/releases/6.0.14.rst diff --git a/source/includes/changelogs/releases/6.0.14.rst b/source/includes/changelogs/releases/6.0.14.rst new file mode 100644 index 00000000000..d7b674f405f --- /dev/null +++ b/source/includes/changelogs/releases/6.0.14.rst @@ -0,0 +1,159 @@ +.. _6.0.14-changelog: + +6.0.14 Changelog +---------------- + +Sharding +~~~~~~~~ + +:issue:`SERVER-81508` Potential double-execution of write statements +when ShardCannotRefreshDueToLocksHeld is thrown + +Aggregation +~~~~~~~~~~~ + +:issue:`SERVER-82929` $listSearchIndexes requires find privilege action +rather than listSearchIndexes privilege action as it intended + +Storage +~~~~~~~ + + +WiredTiger +`````````` + +- :issue:`WT-12316` Fix timing stress options in test/format for 6.0 and + older branches + +Build and Packaging +~~~~~~~~~~~~~~~~~~~ + +:issue:`SERVER-62957` Add reshardCollection change stream event + +Internals +~~~~~~~~~ + +- :issue:`SERVER-64444` listIndexes fails on invalid pre-5.0 index spec + after upgrade +- :issue:`SERVER-65908` Update fields for reshardCollection noop message +- :issue:`SERVER-66503` ObjectIsBusy thrown in unindex +- :issue:`SERVER-68674` Vendor an immutable/persistent data structure + library +- :issue:`SERVER-69413` Documentation Updates +- :issue:`SERVER-72839` Server skips peer certificate validation if + neither CAFile nor clusterCAFile is provided +- :issue:`SERVER-74874` Add typedef for immutable unordered map and set +- :issue:`SERVER-74875` Implement immutable ordered map and set +- :issue:`SERVER-74876` Evaluate which immer memory policy to use +- :issue:`SERVER-74946` Convert containers in CollectionCatalog for + collection lookup to immutable +- :issue:`SERVER-74947` Convert containers in CollectionCatalog for view + lookup to immutable +- :issue:`SERVER-74951` Convert containers in CollectionCatalog for + profile settings to immutable +- :issue:`SERVER-75263` Add immer benchmarks +- :issue:`SERVER-75497` Convert ordered containers in CollectionCatalog + to immutable +- :issue:`SERVER-75613` Add GDB pretty printers for immutable data + structures +- :issue:`SERVER-75851` Add typedef for immutable vector +- :issue:`SERVER-76789` Add immer to README.third_party.md +- :issue:`SERVER-77694` cannot compile immer header with --opt=off +- :issue:`SERVER-78311` mongos does not report writeConcernError in + presence of writeErrors for insert command +- :issue:`SERVER-78662` Deadlock with index build, step down, prepared + transaction, and MODE_IS coll lock +- :issue:`SERVER-78911` Always suppress "Different user name was + supplied to saslSupportedMechs" log during X.509 intracluster auth +- :issue:`SERVER-79150` Reduce ScopedSetShardRole scope to setup stage + of index build +- :issue:`SERVER-79202` PinnedConnectionTaskExecutor can hang when + shutting down +- :issue:`SERVER-80150` Log negotiated network compressor with client + metadata +- :issue:`SERVER-80177` validate() should not return valid:false for + non-compliant documents +- :issue:`SERVER-80279` Commit on non-existing transaction then proceed + to continue can trigger an invariant +- :issue:`SERVER-80978` Fix potential deadlock between + TTLMonitor::onStepUp and prepared transaction +- :issue:`SERVER-82353` Multi-document transactions can miss documents + when movePrimary runs concurrently +- :issue:`SERVER-82627` ReshardingDataReplication does not join the + ReshardingOplogFetcher thread pool causing invariant failure. +- :issue:`SERVER-82815` Expose server’s index key creation via + aggregation +- :issue:`SERVER-83050` Create a deployment of mongodb on + AL2-openssl-1.1.1 +- :issue:`SERVER-83119` Secondary replica crashes on clustered + collection if notablescan is enabled +- :issue:`SERVER-83145` Shared buffer fragment incorrectly tracks memory + usage in freeUnused() +- :issue:`SERVER-83337` Re-enable wt_size_storer_cleanup_replica_set.js + on macOS +- :issue:`SERVER-83369` Index creation does not enforce type of + bucketSize field +- :issue:`SERVER-83564` Make sure the process field is indexed in + config.locks +- :issue:`SERVER-83610` Consider reducing privileges required for + $documents +- :issue:`SERVER-83955` Fix wrong warning messages in ReplSetGetStatus + command +- :issue:`SERVER-84063` Remove BlackDuck from Security Daily Cron +- :issue:`SERVER-84233` Support BSON MinKey and MaxKey in BSONColumn +- :issue:`SERVER-84336` Timeseries inserts can leave dangling BSONObj in + WriteBatches in certain cases +- :issue:`SERVER-84722` Create undocumented server parameter to skip + document validation on insert code path for internal usage +- :issue:`SERVER-84747` Deploy enterprise module consolidation to branch + v6.0 +- :issue:`SERVER-84749` Remove + sharding_update_v1_oplog_jscore_passthrough from macOS variants +- :issue:`SERVER-84772` Delete stitch-related tasks in enterprise + variant +- :issue:`SERVER-85167` Size storer can be flushed concurrently with + being destructed for rollback +- :issue:`SERVER-85171` split unittest tasks up +- :issue:`SERVER-85206` Improve performance of full_range.js and + explicit_range.js +- :issue:`SERVER-85245` FailedToParse error during setParamater of + wiredTigerConcurrentReadTransactions +- :issue:`SERVER-85263` Report escaped client application name +- :issue:`SERVER-85306` Update sys-perf config to use HTTPs github links + rather than SSH +- :issue:`SERVER-85364` [6.0] Convert resource map in CollectionCatalog + to immutable +- :issue:`SERVER-85365` [6.0] Convert shadow catalog in + CollectionCatalog to immutable +- :issue:`SERVER-85386` [v6.0] Adjust configuration to ensure + 'enterprise' module does not appear in version manifest +- :issue:`SERVER-85419` Balancer pollutes logs in case no suitable + recipient is found during draining +- :issue:`SERVER-85530` Refresh Test Certificates +- :issue:`SERVER-85631` Remove jstests/noPassthrough/ttl_expire_nan.js +- :issue:`SERVER-85652` Update DSI atlas azure tasks to use an AL2 + compile artifact. +- :issue:`SERVER-85693` Fix potential access violation in + User::validateRestrictions +- :issue:`SERVER-85707` [v6.0] Adding $changeStreamSplitLargeEvent stage + fails on v6.0 mongoS +- :issue:`SERVER-85771` Make $bucketAuto more robust in the case of an + empty string for the groupBy field +- :issue:`SERVER-85848` $redact inhibits change stream optimization +- :issue:`SERVER-86027` Tag + insert_docs_larger_than_max_user_size_standalone.js with + requires_persistence and requires_replication +- :issue:`SERVER-86081` Sys-perf missing required parameters due to + Evergreen Redaction +- :issue:`SERVER-86177` Remove extra lines added during backport +- :issue:`SERVER-86363` Make container registry login silent +- :issue:`SERVER-86388` Remove fle_drivers_integration.js test from 6.0 +- :issue:`WT-9057` Null address read in compact walk +- :issue:`WT-9824` Add testing to file manager WT connection + configurations in test/format +- :issue:`WT-12077` Incorrect hardware checksum calculation on zSeries + for buffers on stack +- :issue:`WT-12211` Fix PATH env variable in hang analyzer to generate + python core dump (7.0) +- :issue:`WT-12272` Remove unnecessary module in evergreen.yml + diff --git a/source/release-notes/6.0-changelog.txt b/source/release-notes/6.0-changelog.txt index cb4a41ad039..78d4317e686 100644 --- a/source/release-notes/6.0-changelog.txt +++ b/source/release-notes/6.0-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/6.0.14.rst + .. include:: /includes/changelogs/releases/6.0.13.rst .. include:: /includes/changelogs/releases/6.0.12.txt diff --git a/source/release-notes/6.0.txt b/source/release-notes/6.0.txt index f55bdea46b6..689e312fbc6 100644 --- a/source/release-notes/6.0.txt +++ b/source/release-notes/6.0.txt @@ -50,6 +50,25 @@ see :ref:`release-version-numbers`. Patch Releases -------------- +.. _6.0.14-release-notes: + +6.0.14 - Upcoming +~~~~~~~~~~~~~~~~~ + +- :issue:`SERVER-82353` Multi-document transactions can miss documents + when movePrimary runs concurrently +- :issue:`SERVER-83119` Secondary replica crashes on clustered + collection if notablescan is enabled +- :issue:`SERVER-83145` Shared buffer fragment incorrectly tracks + memory usage in freeUnused() +- :issue:`SERVER-83564` Make sure the process field is indexed in + config.locks +- :issue:`WT-12077` Incorrect hardware checksum calculation on zSeries + for buffers on stack +- `All Jira issues closed in 6.0.14 + `__ +- :ref:`6.0.14-changelog` + .. _6.0.13-release-notes: 6.0.13 - Jan 18, 2024 From 2cc24b7605a336a1499c6095617879990038b1a7 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Fri, 16 Feb 2024 09:44:58 -0500 Subject: [PATCH 134/308] DOCSP-36617 7.0.6 Release Notes (#6367) * DOCSP-36617 7.0.6 Release Notes * * * Empty-Commit * * --- config/changelog_conf.yaml | 1 + source/includes/changelogs/releases/7.0.6.rst | 257 ++++++++++++++++++ source/release-notes/7.0-changelog.txt | 2 + source/release-notes/7.0.txt | 19 ++ 4 files changed, 279 insertions(+) create mode 100644 source/includes/changelogs/releases/7.0.6.rst diff --git a/config/changelog_conf.yaml b/config/changelog_conf.yaml index 7ad730c3445..9d327c7cd9f 100644 --- a/config/changelog_conf.yaml +++ b/config/changelog_conf.yaml @@ -37,6 +37,7 @@ groups: - MMAPv1 "Storage": - Storage + - Btree "Catalog": - Catalog "TTL": diff --git a/source/includes/changelogs/releases/7.0.6.rst b/source/includes/changelogs/releases/7.0.6.rst new file mode 100644 index 00000000000..a11c3ae1c3f --- /dev/null +++ b/source/includes/changelogs/releases/7.0.6.rst @@ -0,0 +1,257 @@ +.. _7.0.6-changelog: + +7.0.6 Changelog +--------------- + +Sharding +~~~~~~~~ + +- :issue:`SERVER-75537` Handle direct operations against shards +- :issue:`SERVER-76337` Add a server status metric to track unauthorized + direct connections to shards +- :issue:`SERVER-76984` Remove check for !_isInternalClient() in service + entry point +- :issue:`SERVER-77027` Only check for direct shard connections if + sharding is enabled +- :issue:`SERVER-81508` Potential double-execution of write statements + when ShardCannotRefreshDueToLocksHeld is thrown +- :issue:`SERVER-83146` Bulk write operation might fail with + NamespaceNotFound +- :issue:`SERVER-83775` Do not balance data between shards owning more + than the ideal data size + +Replication +~~~~~~~~~~~ + +:issue:`SERVER-79191` continuous_initial_sync.py Can Be in Rollback +During FSM Teardown + +Query +~~~~~ + +:issue:`SERVER-84595` Delete invalid test +jstests/noPassthrough/out_majority_read_replset.js + +Aggregation +~~~~~~~~~~~ + +:issue:`SERVER-82929` $listSearchIndexes requires find privilege action +rather than listSearchIndexes privilege action as it intended + +Storage +~~~~~~~ + +:issue:`WT-11062` Safe free the ref addr to allow concurrent access + +WiredTiger +`````````` + +- :issue:`WT-11845` Fix transaction visibility issue with truncate + +Build and Packaging +~~~~~~~~~~~~~~~~~~~ + +:issue:`SERVER-62957` Add reshardCollection change stream event + +Internals +~~~~~~~~~ + +- :issue:`SERVER-69413` Documentation Updates +- :issue:`SERVER-72703` Downgrade $out's db lock to MODE_IX +- :issue:`SERVER-72839` Server skips peer certificate validation if + neither CAFile nor clusterCAFile is provided +- :issue:`SERVER-74875` Implement immutable ordered map and set +- :issue:`SERVER-75497` Convert ordered containers in CollectionCatalog + to immutable +- :issue:`SERVER-75613` Add GDB pretty printers for immutable data + structures +- :issue:`SERVER-75851` Add typedef for immutable vector +- :issue:`SERVER-76463` Ensure Sharding DDL locks acquired outside a + coordinator wait for DDL recovery +- :issue:`SERVER-77801` Remove + sharded_collections_jscore_passthrough_with_config_shard from the + macOS hosts +- :issue:`SERVER-78311` mongos does not report writeConcernError in + presence of writeErrors for insert command +- :issue:`SERVER-78662` Deadlock with index build, step down, prepared + transaction, and MODE_IS coll lock +- :issue:`SERVER-78911` Always suppress "Different user name was + supplied to saslSupportedMechs" log during X.509 intracluster auth +- :issue:`SERVER-79150` Reduce ScopedSetShardRole scope to setup stage + of index build +- :issue:`SERVER-79192` Fix migration_coordinator_commit_failover.js to + use awaitReplicationBeforeStepUp: false +- :issue:`SERVER-79202` PinnedConnectionTaskExecutor can hang when + shutting down +- :issue:`SERVER-79214` Orphaned documents cause failures in indexu.js +- :issue:`SERVER-79286` Create a query knob +- :issue:`SERVER-79400` Implement number of documents tie breaking + heuristics +- :issue:`SERVER-79972` Investigate making core dump archival faster +- :issue:`SERVER-80150` Log negotiated network compressor with client + metadata +- :issue:`SERVER-80177` validate() should not return valid:false for + non-compliant documents +- :issue:`SERVER-80233` Implement index prefix heuristic +- :issue:`SERVER-80275` Add log line for detailed plan scoring +- :issue:`SERVER-80310` Update sysperf to allow running individual genny + tasks on waterfall +- :issue:`SERVER-80645` Amazon 2023 community packages fail to install +- :issue:`SERVER-80978` Fix potential deadlock between + TTLMonitor::onStepUp and prepared transaction +- :issue:`SERVER-81021` Improve index prefix heuristic by taking into + account closed intervals +- :issue:`SERVER-81181` Enable featureFlagCheckForDirectShardOperations +- :issue:`SERVER-81246` FLE WriteConcernError behavior unclear +- :issue:`SERVER-81534` DDL locks musn't be acquired during step down or + shutdown +- :issue:`SERVER-82053` Use index hint for time series bucket reopening + query +- :issue:`SERVER-82221` listCollections and listIndexes should include + commit-pending namespaces +- :issue:`SERVER-82261` setup_spawnhost_coredump script may miss core + dump from crashed process on Windows +- :issue:`SERVER-82353` Multi-document transactions can miss documents + when movePrimary runs concurrently +- :issue:`SERVER-82365` Optimize the construction of the balancer's + collection distribution status histogram (2nd attempt) +- :issue:`SERVER-82450` MongoServerError: batched writes must generate a + single applyOps entry +- :issue:`SERVER-82627` ReshardingDataReplication does not join the + ReshardingOplogFetcher thread pool causing invariant failure. +- :issue:`SERVER-82640` Upload mongod --version output to S3 during + server compilation in Evergreen +- :issue:`SERVER-82815` Expose server’s index key creation via + aggregation +- :issue:`SERVER-83050` Create a deployment of mongodb on + AL2-openssl-1.1.1 +- :issue:`SERVER-83119` Secondary replica crashes on clustered + collection if notablescan is enabled +- :issue:`SERVER-83145` Shared buffer fragment incorrectly tracks memory + usage in freeUnused() +- :issue:`SERVER-83192` Always include zero cpuNanos in profiler +- :issue:`SERVER-83296` Remove column data from BSON fuzzer +- :issue:`SERVER-83337` Re-enable wt_size_storer_cleanup_replica_set.js + on macOS +- :issue:`SERVER-83369` Index creation does not enforce type of + bucketSize field +- :issue:`SERVER-83454` Range Deleter Service registration and + de-registration should not rely on onCommit ordering guarantees +- :issue:`SERVER-83492` Remove limit and skip values from SBE plan cache + key if possible +- :issue:`SERVER-83508` Race between watchdog and FCBIS deleting old + storage files +- :issue:`SERVER-83567` Push in classic stores missing values. +- :issue:`SERVER-83610` Consider reducing privileges required for + $documents +- :issue:`SERVER-83639` Add exception for fuzzer for BSONColumn + validation +- :issue:`SERVER-83738` db-contrib-tool fails to get release json + sometimes +- :issue:`SERVER-83825` increase log verbosity for write conflict + retries in index_build_operation_metrics.js: +- :issue:`SERVER-83874` Move primary operation doesn't drop + db.system.views on the donor +- :issue:`SERVER-83955` Fix wrong warning messages in ReplSetGetStatus + command +- :issue:`SERVER-83959` When preparing SBE plan, correctly pass + preparingFromCache argument +- :issue:`SERVER-84063` Remove BlackDuck from Security Daily Cron +- :issue:`SERVER-84130` Incorrect bucket-level filter optimization when + some events in the bucket are missing the field +- :issue:`SERVER-84147` Update vscode workspace from true to explicit +- :issue:`SERVER-84186` Add benchmark that runs math operations in + Timeseries to sys perf +- :issue:`SERVER-84233` Support BSON MinKey and MaxKey in BSONColumn +- :issue:`SERVER-84240` Make replSetReconfig retry network errors +- :issue:`SERVER-84313` Exclude + coordinate_txn_recover_on_stepup_with_tickets_exhausted.js from + sharding multiversion suites on 7.0 +- :issue:`SERVER-84336` Timeseries inserts can leave dangling BSONObj in + WriteBatches in certain cases +- :issue:`SERVER-84337` Backport new variants added to perf.yml over to + sys-perf-7.0 and sys-perf-4.4 +- :issue:`SERVER-84338` Top level $or queries may lead to invalid SBE + plan cache entry which returns wrong results +- :issue:`SERVER-84353` The test for stepDown deadlock with read ticket + exhaustion is flaky +- :issue:`SERVER-84410` Do an initial refresh of the other mongos in + txn_with_several_routers.js +- :issue:`SERVER-84436` Handle skip + limit sum overflowing int64_t in + SBE +- :issue:`SERVER-84468` Fix deadlock when running + runTransactionOnShardingCatalog() +- :issue:`SERVER-84534` [7.0] Blocklist plan_cache_sbe.js from + replica_sets_initsync_jscore_passthrough +- :issue:`SERVER-84567` writeQueryStats should log an error rather than + uassert when the feature flag is disabled +- :issue:`SERVER-84722` Create undocumented server parameter to skip + document validation on insert code path for internal usage +- :issue:`SERVER-84723` Sharded multi-document transactions can observe + partial effects of concurrent DDL operations +- :issue:`SERVER-84732` Fix typo in mongo-perf standalone inMemory ARM + AWS test +- :issue:`SERVER-84806` Ignore reshardCollection change event after + v6.0->v7.0 upgrade in test +- :issue:`SERVER-85167` Size storer can be flushed concurrently with + being destructed for rollback +- :issue:`SERVER-85171` split unittest tasks up +- :issue:`SERVER-85206` Improve performance of full_range.js and + explicit_range.js +- :issue:`SERVER-85260` SBE $mergeObjects crashes server with undefined + input +- :issue:`SERVER-85263` Report escaped client application name +- :issue:`SERVER-85306` Update sys-perf config to use HTTPs github links + rather than SSH +- :issue:`SERVER-85419` Balancer pollutes logs in case no suitable + recipient is found during draining +- :issue:`SERVER-85453` ExternalDataSourceScopeGuard should not be + compatible with multiple plan executors +- :issue:`SERVER-85530` Refresh Test Certificates +- :issue:`SERVER-85534` Checkpoint the vector clock after committing + shard collection +- :issue:`SERVER-85633` Add lock around res_ninit call +- :issue:`SERVER-85652` Update DSI atlas azure tasks to use an AL2 + compile artifact. +- :issue:`SERVER-85690` Wait for stepdown to finish before continuing + index build in index_build_unregisters_after_stepdown.js +- :issue:`SERVER-85693` Fix potential access violation in + User::validateRestrictions +- :issue:`SERVER-85714` BSONColumn validator need to treat MinKey and + MaxKey as uncompressed +- :issue:`SERVER-85771` Make $bucketAuto more robust in the case of an + empty string for the groupBy field +- :issue:`SERVER-85848` $redact inhibits change stream optimization +- :issue:`SERVER-85869` Exhaustive find on config shard can return stale + data +- :issue:`SERVER-85956` Query Stats 7.0 Backport Batch #1 +- :issue:`SERVER-86027` Tag + insert_docs_larger_than_max_user_size_standalone.js with + requires_persistence and requires_replication +- :issue:`SERVER-86081` Sys-perf missing required parameters due to + Evergreen Redaction +- :issue:`SERVER-86096` Add queryable encryption workloads to 7.0 + project on Evergreen +- :issue:`SERVER-86116` CreateCollectionCoordinator may fail to create + the chunk metadata on commit time. +- :issue:`SERVER-86118` Backport Query Stats to 7.0 Batch #2 +- :issue:`SERVER-86158` change fail point used in TTL operation metrics + tests +- :issue:`SERVER-86298` Query Stats 7.0 Backport Batch #3 +- :issue:`SERVER-86363` Make container registry login silent +- :issue:`SERVER-86432` Backport Query Stats to 7.0 Batch #4 +- :issue:`SERVER-86481` Jepsen set, register, and read concern majority + tests are not running in Evergreen +- :issue:`SERVER-86523` Backport Query Stats to 7.0 Batch #5 +- :issue:`WT-11777` Fix units of __wt_timer_evaluate() calls: logging + and progress period +- :issue:`WT-11987` Table's version number dropped to + version=(major=1,minor=0) +- :issue:`WT-12043` Remove obsolete HAVE_DIAGNOSTIC ifdefs to avoid + memory leak +- :issue:`WT-12077` Incorrect hardware checksum calculation on zSeries + for buffers on stack +- :issue:`WT-12147` Temporarily disable clang-analyzer +- :issue:`WT-12211` Fix PATH env variable in hang analyzer to generate + python core dump (7.0) + diff --git a/source/release-notes/7.0-changelog.txt b/source/release-notes/7.0-changelog.txt index 9b8575f1fba..d7d7f6ec8df 100644 --- a/source/release-notes/7.0-changelog.txt +++ b/source/release-notes/7.0-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/7.0.6.rst + .. include:: /includes/changelogs/releases/7.0.5.rst .. include:: /includes/changelogs/releases/7.0.4.rst diff --git a/source/release-notes/7.0.txt b/source/release-notes/7.0.txt index 6d687cd613d..fd4fefd6092 100644 --- a/source/release-notes/7.0.txt +++ b/source/release-notes/7.0.txt @@ -40,6 +40,25 @@ see :ref:`release-version-numbers`. Patch Releases -------------- +.. _7.0.6-release-notes: + +7.0.6 - Upcoming +~~~~~~~~~~~~~~~~ + +Issues fixed: + +- :issue:`SERVER-72703` Downgrade $out's db lock to MODE_IX +- :issue:`SERVER-82353` Multi-document transactions can miss documents + when movePrimary runs concurrently +- :issue:`SERVER-84338` Top level $or queries may lead to invalid SBE + plan cache entry which returns wrong results +- :issue:`SERVER-84723` Sharded multi-document transactions can observe + partial effects of concurrent DDL operations +- :issue:`WT-11062` Safe free the ref addr to allow concurrent access +- `All Jira issues closed in 7.0.6 + `__ +- :ref:`7.0.6-changelog` + .. _7.0.5-release-notes: 7.0.5 - Jan 5, 2024 From ea34d66bdc7a96241af542b73f2a42a09bd76760 Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Fri, 16 Feb 2024 08:46:29 -0600 Subject: [PATCH 135/308] DOCSP-35922 Corrects British spelling of acknowledgment to American (#6390) --- source/applications/replication.txt | 2 +- source/core/bulk-write-operations.txt | 2 +- source/core/causal-consistency-read-write-concerns.txt | 2 +- source/core/read-isolation-consistency-recency.txt | 2 +- source/core/replica-set-architectures.txt | 2 +- source/core/replica-set-rollbacks.txt | 4 ++-- source/core/replica-set-write-concern.txt | 2 +- source/core/sharding-balancer-administration.txt | 4 ++-- source/core/transactions.txt | 4 ++-- source/images/crud-write-concern-ack.rst | 2 +- source/images/crud-write-concern-journal.rst | 2 +- source/images/crud-write-concern-unack.rst | 2 +- source/includes/fact-read-concern-write-timeline.rst | 2 +- source/includes/fact-read-own-writes.rst | 2 +- source/includes/indexes/commit-quorum-vs-write-concern.rst | 2 +- source/includes/introduction-write-concern.rst | 2 +- source/reference/command/dropDatabase.txt | 6 +++--- source/reference/command/serverStatus.txt | 2 +- source/reference/connection-string.txt | 4 ++-- source/reference/method/Mongo.getWriteConcern.txt | 2 +- source/reference/method/Mongo.setWriteConcern.txt | 4 ++-- source/reference/method/db.collection.deleteMany.txt | 2 +- source/reference/method/db.collection.deleteOne.txt | 2 +- source/reference/method/db.collection.insertOne.txt | 2 +- source/reference/method/db.collection.replaceOne.txt | 2 +- source/reference/method/db.collection.updateMany.txt | 2 +- source/reference/method/db.collection.updateOne.txt | 2 +- source/reference/method/db.dropDatabase.txt | 6 +++--- source/release-notes/3.4.txt | 2 +- source/release-notes/drivers-write-concern.txt | 2 +- source/tutorial/insert-documents.txt | 2 +- source/tutorial/manage-journaling.txt | 2 +- source/tutorial/manage-sharded-cluster-balancer.txt | 4 ++-- source/tutorial/remove-documents.txt | 2 +- source/tutorial/sharding-high-availability-writes.txt | 4 ++-- source/tutorial/troubleshoot-replica-sets.txt | 2 +- source/tutorial/update-documents.txt | 2 +- 37 files changed, 48 insertions(+), 48 deletions(-) diff --git a/source/applications/replication.txt b/source/applications/replication.txt index ecc914c5efd..43cc0668b38 100644 --- a/source/applications/replication.txt +++ b/source/applications/replication.txt @@ -24,7 +24,7 @@ additional read and write configurations for replica sets. write and read operations. :doc:`/core/replica-set-write-concern` - Write concern describes the level of acknowledgement requested + Write concern describes the level of acknowledgment requested from MongoDB for write operations. :doc:`/core/read-preference` diff --git a/source/core/bulk-write-operations.txt b/source/core/bulk-write-operations.txt index 825699becdf..12eb48c5a63 100644 --- a/source/core/bulk-write-operations.txt +++ b/source/core/bulk-write-operations.txt @@ -18,7 +18,7 @@ Overview MongoDB provides clients the ability to perform write operations in bulk. Bulk write operations affect a *single* collection. MongoDB allows applications to determine the acceptable level of -acknowledgement required for bulk write operations. +acknowledgment required for bulk write operations. The :method:`db.collection.bulkWrite()` method provides the ability to perform bulk insert, update, and delete operations. diff --git a/source/core/causal-consistency-read-write-concerns.txt b/source/core/causal-consistency-read-write-concerns.txt index a0cb05c679c..b012559d6e5 100644 --- a/source/core/causal-consistency-read-write-concerns.txt +++ b/source/core/causal-consistency-read-write-concerns.txt @@ -64,7 +64,7 @@ guarantee causal consistency for: acknowledged by a majority of the replica set members and is durable. - Write operations with :writeconcern:`"majority"` write concern; - in other words, the write operations that request acknowledgement + in other words, the write operations that request acknowledgment that the operation has been applied to a majority of the replica set's voting members. diff --git a/source/core/read-isolation-consistency-recency.txt b/source/core/read-isolation-consistency-recency.txt index 4b9c20f1258..18203fb6544 100644 --- a/source/core/read-isolation-consistency-recency.txt +++ b/source/core/read-isolation-consistency-recency.txt @@ -117,7 +117,7 @@ For causally related operations: members and is durable. - Write operations with :writeconcern:`"majority"` write concern; - i.e. the write operations that request acknowledgement that the + i.e. the write operations that request acknowledgment that the operation has been applied to a majority of the replica set's voting members. diff --git a/source/core/replica-set-architectures.txt b/source/core/replica-set-architectures.txt index 785c20ea846..671f26326a4 100644 --- a/source/core/replica-set-architectures.txt +++ b/source/core/replica-set-architectures.txt @@ -169,7 +169,7 @@ Target Operations with Tag Sets Use :ref:`replica set tag sets ` to target read operations to specific members or to customize write -concern to request acknowledgement from specific members. +concern to request acknowledgment from specific members. .. seealso:: diff --git a/source/core/replica-set-rollbacks.txt b/source/core/replica-set-rollbacks.txt index 0af65884676..5f117ea53a5 100644 --- a/source/core/replica-set-rollbacks.txt +++ b/source/core/replica-set-rollbacks.txt @@ -159,7 +159,7 @@ Avoid Replica Set Rollbacks --------------------------- For replica sets, the :ref:`write concern ` -:writeconcern:`{ w: 1 } <\>` only provides acknowledgement of write +:writeconcern:`{ w: 1 } <\>` only provides acknowledgment of write operations on the primary. Data may be rolled back if the primary steps down before the write operations have replicated to any of the secondaries. This includes data written in :doc:`multi-document @@ -173,7 +173,7 @@ To prevent rollbacks of data that have been acknowledged to the client, run all voting members with journaling enabled and use :ref:`{ w: "majority" } write concern ` to guarantee that the write operations propagate to a majority of the replica set nodes before returning with -acknowledgement to the issuing client. +acknowledgment to the issuing client. Starting in MongoDB 5.0, ``{ w: "majority" }`` is the default write concern for *most* MongoDB deployments. See :ref:`wc-default-behavior`. diff --git a/source/core/replica-set-write-concern.txt b/source/core/replica-set-write-concern.txt index 1d259a4ee8c..fbb38c73ea2 100644 --- a/source/core/replica-set-write-concern.txt +++ b/source/core/replica-set-write-concern.txt @@ -22,7 +22,7 @@ successfully. For replica sets: - A write concern of :writeconcern:`w: "majority" <"majority">` requires - acknowledgement that the write operations have been durably committed to a + acknowledgment that the write operations have been durably committed to a :ref:`calculated majority ` of the data-bearing voting members. For most replica set configurations, :writeconcern:`w: "majority" <"majority">` is the :ref:`default write concern diff --git a/source/core/sharding-balancer-administration.txt b/source/core/sharding-balancer-administration.txt index 8f1ac104362..9f638db153f 100644 --- a/source/core/sharding-balancer-administration.txt +++ b/source/core/sharding-balancer-administration.txt @@ -237,12 +237,12 @@ In the :data:`config.settings` collection: - If the ``_secondaryThrottle`` setting for the balancer is set to a write concern, each document move during range migration must receive - the requested acknowledgement before proceeding with the next + the requested acknowledgment before proceeding with the next document. - If the ``_secondaryThrottle`` setting for the balancer is set to ``true``, each document move during range migration must receive - acknowledgement from at least one secondary before the migration + acknowledgment from at least one secondary before the migration proceeds with the next document in the range. This is equivalent to a write concern of :writeconcern:`{ w: 2 } <\>`. diff --git a/source/core/transactions.txt b/source/core/transactions.txt index 99383b89b32..48ef153974b 100644 --- a/source/core/transactions.txt +++ b/source/core/transactions.txt @@ -601,7 +601,7 @@ values, including: ```````` - Write concern :writeconcern:`w: 1 <\>` returns - acknowledgement after the commit has been applied to the primary. + acknowledgment after the commit has been applied to the primary. .. important:: @@ -623,7 +623,7 @@ values, including: ````````````````` - Write concern :writeconcern:`w: "majority" <"majority">` returns - acknowledgement after the commit has been applied to a majority of + acknowledgment after the commit has been applied to a majority of voting members. - When you commit with :writeconcern:`w: "majority" <"majority">` diff --git a/source/images/crud-write-concern-ack.rst b/source/images/crud-write-concern-ack.rst index 8731e0a927c..3737c51562d 100644 --- a/source/images/crud-write-concern-ack.rst +++ b/source/images/crud-write-concern-ack.rst @@ -1,3 +1,3 @@ .. figure:: /images/crud-write-concern-ack.bakedsvg.svg - :alt: Write operation to a ``mongod`` instance with write concern of ``acknowledged``. The client waits for acknowledgement of success or exception. + :alt: Write operation to a ``mongod`` instance with write concern of ``acknowledged``. The client waits for acknowledgment of success or exception. :figwidth: 460px diff --git a/source/images/crud-write-concern-journal.rst b/source/images/crud-write-concern-journal.rst index 2ec2fbbd67c..7f614b9cb74 100644 --- a/source/images/crud-write-concern-journal.rst +++ b/source/images/crud-write-concern-journal.rst @@ -1,3 +1,3 @@ .. figure:: /images/crud-write-concern-journal.bakedsvg.svg - :alt: Write operation to a ``mongod`` instance with write concern of ``journaled``. The ``mongod`` sends acknowledgement after it commits the write operation to the journal. + :alt: Write operation to a ``mongod`` instance with write concern of ``journaled``. The ``mongod`` sends acknowledgment after it commits the write operation to the journal. :figwidth: 600px diff --git a/source/images/crud-write-concern-unack.rst b/source/images/crud-write-concern-unack.rst index 9b5a506d0db..c8e80275728 100644 --- a/source/images/crud-write-concern-unack.rst +++ b/source/images/crud-write-concern-unack.rst @@ -1,3 +1,3 @@ .. figure:: /images/crud-write-concern-unack.bakedsvg.svg - :alt: Write operation to a ``mongod`` instance with write concern of ``unacknowledged``. The client does not wait for any acknowledgement. + :alt: Write operation to a ``mongod`` instance with write concern of ``unacknowledged``. The client does not wait for any acknowledgment. :figwidth: 460px diff --git a/source/includes/fact-read-concern-write-timeline.rst b/source/includes/fact-read-concern-write-timeline.rst index a73c549f4e9..53dfdb46bd7 100644 --- a/source/includes/fact-read-concern-write-timeline.rst +++ b/source/includes/fact-read-concern-write-timeline.rst @@ -62,7 +62,7 @@ a three member replica set: | **Secondary**\ :sub:`2`: Write\ :sub:`prev` * - t\ :sub:`3` - - Primary is aware of successful replication to Secondary\ :sub:`1` and sends acknowledgement to client + - Primary is aware of successful replication to Secondary\ :sub:`1` and sends acknowledgment to client - | **Primary**: Write\ :sub:`0` | **Secondary**\ :sub:`1`: Write\ :sub:`0` | **Secondary**\ :sub:`2`: Write\ :sub:`0` diff --git a/source/includes/fact-read-own-writes.rst b/source/includes/fact-read-own-writes.rst index 400db1b2da2..a1948b9ecbb 100644 --- a/source/includes/fact-read-own-writes.rst +++ b/source/includes/fact-read-own-writes.rst @@ -1,6 +1,6 @@ Starting in MongoDB 3.6, you can use :ref:`causally consistent sessions ` to read your own writes, if the writes request -acknowledgement. +acknowledgment. Prior to MongoDB 3.6, in order to read your own writes you must issue your write operation with :writeconcern:`{ w: "majority" } <"majority">` diff --git a/source/includes/indexes/commit-quorum-vs-write-concern.rst b/source/includes/indexes/commit-quorum-vs-write-concern.rst index 49b752e1f0c..2139043042d 100644 --- a/source/includes/indexes/commit-quorum-vs-write-concern.rst +++ b/source/includes/indexes/commit-quorum-vs-write-concern.rst @@ -12,7 +12,7 @@ which voting members, including the primary, must be prepared to commit a :ref:`simultaneous index build `. before the primary will execute the commit. -The **write concern** is the level of acknowledgement that the write has +The **write concern** is the level of acknowledgment that the write has propagated to the specified number of instances. The **commit quorum** specifies how many nodes must be *ready* to finish diff --git a/source/includes/introduction-write-concern.rst b/source/includes/introduction-write-concern.rst index 0684487bcfd..7114f51e80e 100644 --- a/source/includes/introduction-write-concern.rst +++ b/source/includes/introduction-write-concern.rst @@ -1,5 +1,5 @@ :ref:`Write Concern ` describes the level of -acknowledgement requested from MongoDB for write operations. The level +acknowledgment requested from MongoDB for write operations. The level of the write concerns affects how quickly the write operation returns. When write operations have a *weak* write concern, they return quickly. With *stronger* write concerns, clients must wait after sending a write diff --git a/source/reference/command/dropDatabase.txt b/source/reference/command/dropDatabase.txt index c2fcb3aff5e..83088c7ec31 100644 --- a/source/reference/command/dropDatabase.txt +++ b/source/reference/command/dropDatabase.txt @@ -70,7 +70,7 @@ The command takes the following optional fields: :writeconcern:`"majority"`. When issued on a replica set, if the specified write concern - results in fewer member acknowledgements than write concern + results in fewer member acknowledgments than write concern :writeconcern:`"majority"`, the operation uses :writeconcern:`"majority"`. Otherwise, the specified write concern is used. @@ -124,11 +124,11 @@ Replica Sets drops in the database have propagated to a majority of the replica set members (i.e. uses the write concern :writeconcern:`"majority"`). - If you specify a write concern that requires acknowledgement from + If you specify a write concern that requires acknowledgment from fewer than the majority, the command uses write concern :writeconcern:`"majority"`. - If you specify a write concern that requires acknowledgement from + If you specify a write concern that requires acknowledgment from more than the majority, the command uses the specified write concern. Sharded Clusters diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index 4100e17c94c..7679b61f384 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -2653,7 +2653,7 @@ metrics .. serverstatus:: metrics.repl.waiters.replication The number of threads waiting for replicated or journaled :ref:`write concern - acknowledgements `. + acknowledgments `. .. versionadded:: 7.3 diff --git a/source/reference/connection-string.txt b/source/reference/connection-string.txt index 41551973d49..ac5d87ac3fc 100644 --- a/source/reference/connection-string.txt +++ b/source/reference/connection-string.txt @@ -778,7 +778,7 @@ timeout using the :urioption:`wtimeoutMS` write concern parameter: * - .. urioption:: w - Corresponds to the write concern :ref:`wc-w`. The ``w`` option - requests acknowledgement that the write operation has propagated + requests acknowledgment that the write operation has propagated to a specified number of :binary:`~bin.mongod` instances or to :binary:`~bin.mongod` instances with specified tags. @@ -800,7 +800,7 @@ timeout using the :urioption:`wtimeoutMS` write concern parameter: * - .. urioption:: journal - Corresponds to the write concern :ref:`wc-j` option. The - :urioption:`journal` option requests acknowledgement from + :urioption:`journal` option requests acknowledgment from MongoDB that the write operation has been written to the :ref:`journal `. For details, see :ref:`wc-j`. diff --git a/source/reference/method/Mongo.getWriteConcern.txt b/source/reference/method/Mongo.getWriteConcern.txt index 39a2cdf038b..4365fedfc99 100644 --- a/source/reference/method/Mongo.getWriteConcern.txt +++ b/source/reference/method/Mongo.getWriteConcern.txt @@ -64,7 +64,7 @@ The fields are: `. * - ``wtimeout`` - - The number of milliseconds to wait for acknowledgement of the + - The number of milliseconds to wait for acknowledgment of the write concern. ``wtimeout`` is only applicable when ``w`` has a value greater than ``1``. diff --git a/source/reference/method/Mongo.setWriteConcern.txt b/source/reference/method/Mongo.setWriteConcern.txt index 9d136e5d8dc..d2f4a3c4060 100644 --- a/source/reference/method/Mongo.setWriteConcern.txt +++ b/source/reference/method/Mongo.setWriteConcern.txt @@ -57,7 +57,7 @@ The fields are: `. * - ``wtimeout`` - - The number of milliseconds to wait for acknowledgement of the + - The number of milliseconds to wait for acknowledgment of the write concern. ``wtimeout`` is only applicable when ``w`` has a value greater than ``1``. @@ -68,7 +68,7 @@ In the following example: - Two :binary:`~bin.mongod` or :binary:`~bin.mongod` instances must acknowledge writes. -- There is a ``1`` second timeout to wait for write acknowledgements. +- There is a ``1`` second timeout to wait for write acknowledgments. .. code-block:: javascript diff --git a/source/reference/method/db.collection.deleteMany.txt b/source/reference/method/db.collection.deleteMany.txt index 87a31b28031..1fe39cf06ed 100644 --- a/source/reference/method/db.collection.deleteMany.txt +++ b/source/reference/method/db.collection.deleteMany.txt @@ -241,7 +241,7 @@ Given a three member replica set, the following operation specifies a print (e); } -If the acknowledgement takes longer than the ``wtimeout`` limit, the following +If the acknowledgment takes longer than the ``wtimeout`` limit, the following exception is thrown: .. code-block:: javascript diff --git a/source/reference/method/db.collection.deleteOne.txt b/source/reference/method/db.collection.deleteOne.txt index 8df3059f7b6..4567dc75963 100644 --- a/source/reference/method/db.collection.deleteOne.txt +++ b/source/reference/method/db.collection.deleteOne.txt @@ -221,7 +221,7 @@ Given a three member replica set, the following operation specifies a print (e); } -If the acknowledgement takes longer than the ``wtimeout`` limit, the following +If the acknowledgment takes longer than the ``wtimeout`` limit, the following exception is thrown: .. code-block:: javascript diff --git a/source/reference/method/db.collection.insertOne.txt b/source/reference/method/db.collection.insertOne.txt index c66b543b8f0..7fc0ec49e81 100644 --- a/source/reference/method/db.collection.insertOne.txt +++ b/source/reference/method/db.collection.insertOne.txt @@ -234,7 +234,7 @@ Given a three member replica set, the following operation specifies a print (e); } -If the acknowledgement takes longer than the ``wtimeout`` limit, the following +If the acknowledgment takes longer than the ``wtimeout`` limit, the following exception is thrown: .. code-block:: javascript diff --git a/source/reference/method/db.collection.replaceOne.txt b/source/reference/method/db.collection.replaceOne.txt index 47b8a77952d..1a18d3b5a8f 100644 --- a/source/reference/method/db.collection.replaceOne.txt +++ b/source/reference/method/db.collection.replaceOne.txt @@ -396,7 +396,7 @@ Given a three member replica set, the following operation specifies a print(e); } -If the acknowledgement takes longer than the ``wtimeout`` limit, the following +If the acknowledgment takes longer than the ``wtimeout`` limit, the following exception is thrown: .. versionchanged:: 4.4 diff --git a/source/reference/method/db.collection.updateMany.txt b/source/reference/method/db.collection.updateMany.txt index 4de88ca0cab..5382c592e20 100644 --- a/source/reference/method/db.collection.updateMany.txt +++ b/source/reference/method/db.collection.updateMany.txt @@ -630,7 +630,7 @@ Given a three member replica set, the following operation specifies a print(e); } -If the acknowledgement takes longer than the ``wtimeout`` limit, the following +If the acknowledgment takes longer than the ``wtimeout`` limit, the following exception is thrown: .. versionchanged:: 4.4 diff --git a/source/reference/method/db.collection.updateOne.txt b/source/reference/method/db.collection.updateOne.txt index f0fdbbddb97..e73ee7739af 100644 --- a/source/reference/method/db.collection.updateOne.txt +++ b/source/reference/method/db.collection.updateOne.txt @@ -744,7 +744,7 @@ within 100 milliseconds, it returns: { "acknowledged" : true, "matchedCount" : 1, "modifiedCount" : 1 } -If the acknowledgement takes longer than the ``wtimeout`` limit, the following +If the acknowledgment takes longer than the ``wtimeout`` limit, the following exception is thrown: .. versionchanged:: 4.4 diff --git a/source/reference/method/db.dropDatabase.txt b/source/reference/method/db.dropDatabase.txt index b4f53431d77..7c1abe6940b 100644 --- a/source/reference/method/db.dropDatabase.txt +++ b/source/reference/method/db.dropDatabase.txt @@ -61,7 +61,7 @@ The :method:`db.dropDatabase()` method takes an optional parameter: :writeconcern:`"majority"`. When issued on a replica set, if the specified write concern - results in fewer member acknowledgements than write concern + results in fewer member acknowledgments than write concern :writeconcern:`"majority"`, the operation uses :writeconcern:`"majority"`. Otherwise, the specified write concern is used. @@ -112,11 +112,11 @@ Replica Sets members (i.e. uses the write concern :writeconcern:`"majority"`). Starting in MongoDB 4.2, you can specify a write concern to the - method. If you specify a write concern that requires acknowledgement + method. If you specify a write concern that requires acknowledgment from fewer than the majority, the method uses write concern :writeconcern:`"majority"`. - If you specify a write concern that requires acknowledgement from + If you specify a write concern that requires acknowledgment from more than the majority, the method uses the specified write concern. Sharded Clusters diff --git a/source/release-notes/3.4.txt b/source/release-notes/3.4.txt index 3b551ffcdba..524f727b376 100644 --- a/source/release-notes/3.4.txt +++ b/source/release-notes/3.4.txt @@ -666,7 +666,7 @@ Default Journaling Behavior of ``majority`` Write Concern A new replica set configuration setting :rsconf:`writeConcernMajorityJournalDefault` determines whether an -acknowledgement for a write concern of :writeconcern:`majority +acknowledgment for a write concern of :writeconcern:`majority <"majority">` returns after the majority of the voting members apply the write in memory or to the on-disk journal *if* the :ref:`j ` option is unspecified in the write concern. diff --git a/source/release-notes/drivers-write-concern.txt b/source/release-notes/drivers-write-concern.txt index d422b8061ff..b08a0a0c8f2 100644 --- a/source/release-notes/drivers-write-concern.txt +++ b/source/release-notes/drivers-write-concern.txt @@ -40,7 +40,7 @@ drivers: #. The default write concern on the new ``MongoClient`` class will be to acknowledge all write operations [#without-arguments]_. This - will allow your application to receive acknowledgement of all write + will allow your application to receive acknowledgment of all write operations. See the documentation of :ref:`Write Concern ` for diff --git a/source/tutorial/insert-documents.txt b/source/tutorial/insert-documents.txt index 289c40d4094..9bad6c2ce8b 100644 --- a/source/tutorial/insert-documents.txt +++ b/source/tutorial/insert-documents.txt @@ -733,7 +733,7 @@ document. For more information on MongoDB and atomicity, see Write Acknowledgement ~~~~~~~~~~~~~~~~~~~~~ -With write concerns, you can specify the level of acknowledgement +With write concerns, you can specify the level of acknowledgment requested from MongoDB for write operations. For details, see :doc:`/reference/write-concern`. diff --git a/source/tutorial/manage-journaling.txt b/source/tutorial/manage-journaling.txt index 31420ea3e51..d151f005fbe 100644 --- a/source/tutorial/manage-journaling.txt +++ b/source/tutorial/manage-journaling.txt @@ -36,7 +36,7 @@ Procedures Get Commit Acknowledgement ~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can get commit acknowledgement with the :ref:`write-concern` and +You can get commit acknowledgment with the :ref:`write-concern` and the :writeconcern:`j` option. For details, see :ref:`write-concern-operation`. diff --git a/source/tutorial/manage-sharded-cluster-balancer.txt b/source/tutorial/manage-sharded-cluster-balancer.txt index 9b31eaa62a2..d162ae34bb5 100644 --- a/source/tutorial/manage-sharded-cluster-balancer.txt +++ b/source/tutorial/manage-sharded-cluster-balancer.txt @@ -323,12 +323,12 @@ In the :data:`config.settings` collection: - If the ``_secondaryThrottle`` setting for the balancer is set to a write concern, each document move during chunk migration must receive - the requested acknowledgement before proceeding with the next + the requested acknowledgment before proceeding with the next document. - If the ``_secondaryThrottle`` setting for the balancer is set to ``true``, each document move during chunk migration must receive - acknowledgement from at least one secondary before the migration + acknowledgment from at least one secondary before the migration proceeds with the next document in the chunk. This is equivalent to a write concern of :writeconcern:`{ w: 2 } <\>`. diff --git a/source/tutorial/remove-documents.txt b/source/tutorial/remove-documents.txt index a21c674207b..44279bf7d87 100644 --- a/source/tutorial/remove-documents.txt +++ b/source/tutorial/remove-documents.txt @@ -741,7 +741,7 @@ document. For more information on MongoDB and atomicity, see Write Acknowledgement ~~~~~~~~~~~~~~~~~~~~~ -With write concerns, you can specify the level of acknowledgement +With write concerns, you can specify the level of acknowledgment requested from MongoDB for write operations. For details, see :doc:`/reference/write-concern`. diff --git a/source/tutorial/sharding-high-availability-writes.txt b/source/tutorial/sharding-high-availability-writes.txt index c202fe2f31a..3347899cfbc 100644 --- a/source/tutorial/sharding-high-availability-writes.txt +++ b/source/tutorial/sharding-high-availability-writes.txt @@ -271,7 +271,7 @@ For example, the application attempts to write the following document to the } If the application receives an error on attempted write, or if the write -acknowledgement takes too long, the application logs the datacenter as +acknowledgment takes too long, the application logs the datacenter as unavailable and alters the ``datacenter`` field to point to the ``bravo`` datacenter. @@ -318,7 +318,7 @@ include the ``datacenter`` field, and therefore does not perform a The results show that the document with ``message_id`` of ``329620`` has been inserted into MongoDB twice, probably as a result of a delayed write -acknowledgement. +acknowledgment. .. code-block:: javascript diff --git a/source/tutorial/troubleshoot-replica-sets.txt b/source/tutorial/troubleshoot-replica-sets.txt index b1dba32e4bd..4b564ffc989 100644 --- a/source/tutorial/troubleshoot-replica-sets.txt +++ b/source/tutorial/troubleshoot-replica-sets.txt @@ -129,7 +129,7 @@ Possible causes of replication lag include: <\>`, the secondaries will not be able to read the oplog fast enough to keep up with changes. - To prevent this, request :doc:`write acknowledgement + To prevent this, request :doc:`write acknowledgment write concern ` after every 100, 1,000, or another interval to provide an opportunity for secondaries to catch up with the primary. diff --git a/source/tutorial/update-documents.txt b/source/tutorial/update-documents.txt index 0224ed3fe8e..f988360d3c9 100644 --- a/source/tutorial/update-documents.txt +++ b/source/tutorial/update-documents.txt @@ -1153,7 +1153,7 @@ Upsert Option Write Acknowledgement ~~~~~~~~~~~~~~~~~~~~~ -With write concerns, you can specify the level of acknowledgement +With write concerns, you can specify the level of acknowledgment requested from MongoDB for write operations. For details, see :doc:`/reference/write-concern`. From 919a8158348962d4e7cbf9635665ed57def71d89 Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Fri, 16 Feb 2024 09:53:38 -0500 Subject: [PATCH 136/308] DOCS-14184 updates sharded cluster hashed distribution image (#6399) --- source/images/sharded-cluster-hashed-distribution.bakedsvg.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/images/sharded-cluster-hashed-distribution.bakedsvg.svg b/source/images/sharded-cluster-hashed-distribution.bakedsvg.svg index 9241c623a8e..f3ac25d70bb 100644 --- a/source/images/sharded-cluster-hashed-distribution.bakedsvg.svg +++ b/source/images/sharded-cluster-hashed-distribution.bakedsvg.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From 76249604c1c0363db47f47e28c489c30cc164220 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:29:35 -0500 Subject: [PATCH 137/308] DOCSP-36706 Add unionWith to List of Unsupported Stages (#6389) * DOCSP-36706 Add unionWith to List of Unsupported Stages * missed page --- source/includes/table-transactions-operations.rst | 1 + source/reference/command/aggregate.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/source/includes/table-transactions-operations.rst b/source/includes/table-transactions-operations.rst index c1dc52cb80b..e54425ee0e4 100644 --- a/source/includes/table-transactions-operations.rst +++ b/source/includes/table-transactions-operations.rst @@ -18,6 +18,7 @@ - :pipeline:`$merge` - :pipeline:`$out` - :pipeline:`$planCacheStats` + - :pipeline:`$unionWith` * - :method:`db.collection.countDocuments()` - diff --git a/source/reference/command/aggregate.txt b/source/reference/command/aggregate.txt index e536166e4f0..d912405b9fb 100644 --- a/source/reference/command/aggregate.txt +++ b/source/reference/command/aggregate.txt @@ -290,6 +290,7 @@ However, the following stages are not allowed within transactions: - :pipeline:`$merge` - :pipeline:`$out` - :pipeline:`$planCacheStats` +- :pipeline:`$unionWith` You also cannot specify the ``explain`` option. From 84a586f590f61d4a5a729d3c6e6a5c803a5e2fbc Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:37:33 -0500 Subject: [PATCH 138/308] DOCS-16624 a node in a replica set cannot be a member of another replica set (#6154) --- source/includes/replica-set-nodes-cannot-be-shared.rst | 4 ++++ source/replication.txt | 2 ++ source/tutorial/expand-replica-set.txt | 2 ++ 3 files changed, 8 insertions(+) create mode 100644 source/includes/replica-set-nodes-cannot-be-shared.rst diff --git a/source/includes/replica-set-nodes-cannot-be-shared.rst b/source/includes/replica-set-nodes-cannot-be-shared.rst new file mode 100644 index 00000000000..c85d4de1d9d --- /dev/null +++ b/source/includes/replica-set-nodes-cannot-be-shared.rst @@ -0,0 +1,4 @@ +.. warning:: + + Each replica set node must belong to one, and only one, replica + set. Replica set nodes cannot belong to more than one replica set. diff --git a/source/replication.txt b/source/replication.txt index 8e25818bb1f..de0fda3fff9 100644 --- a/source/replication.txt +++ b/source/replication.txt @@ -61,6 +61,8 @@ and optionally one arbiter node. Of the data bearing nodes, one and only one member is deemed the primary node, while the other nodes are deemed secondary nodes. +.. include:: /includes/replica-set-nodes-cannot-be-shared.rst + The :doc:`primary node ` receives all write operations. A replica set can have only one primary capable of confirming writes with :writeconcern:`{ w: "majority" } <"majority">` diff --git a/source/tutorial/expand-replica-set.txt b/source/tutorial/expand-replica-set.txt index b28680306ff..a74acaf7735 100644 --- a/source/tutorial/expand-replica-set.txt +++ b/source/tutorial/expand-replica-set.txt @@ -40,6 +40,8 @@ Existing Members You can use these procedures to add new members to an existing replica set. +.. include:: /includes/replica-set-nodes-cannot-be-shared.rst + Restore Former Members ~~~~~~~~~~~~~~~~~~~~~~ From 0f23a078947cc4d120243329250fa62f81145a66 Mon Sep 17 00:00:00 2001 From: Sarah Olson <98367156+sarah-olson-mongodb@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:31:00 -0800 Subject: [PATCH 139/308] Docsp 33604 -- Deletes 3.0 Release Note files from our repo (#6423) * DOCSP-33604: Remove changelogs * DOCSP-33604: Delete file * DOCSP-33604: Deletes file * DOCSP-33604: Deletes file * DOCSP-33604: Deletes files * DOCSP-33604: Build error fix * DOCSP-33604: Fix build errors * DOCSP-33604: Fix build errors --- source/core/replica-set-members.txt | 3 +- source/faq/replica-sets.txt | 2 +- .../includes/extracts-4.0-upgrade-prereq.yaml | 3 +- .../includes/fact-mongodb-cr-deprecated.rst | 3 +- source/reference/operator/query/near.txt | 4 - .../reference/operator/query/nearSphere.txt | 4 - source/release-notes/3.0-changelog.txt | 670 --------------- source/release-notes/3.0-compatibility.txt | 596 -------------- source/release-notes/3.0-downgrade.txt | 214 ----- source/release-notes/3.0-scram.txt | 146 ---- source/release-notes/3.0-upgrade.txt | 234 ------ source/release-notes/3.0.txt | 777 ------------------ source/release-notes/4.0-compatibility.txt | 3 +- source/release-notes/4.0.txt | 3 +- 14 files changed, 6 insertions(+), 2656 deletions(-) delete mode 100644 source/release-notes/3.0-changelog.txt delete mode 100644 source/release-notes/3.0-compatibility.txt delete mode 100644 source/release-notes/3.0-downgrade.txt delete mode 100644 source/release-notes/3.0-scram.txt delete mode 100644 source/release-notes/3.0-upgrade.txt delete mode 100644 source/release-notes/3.0.txt diff --git a/source/core/replica-set-members.txt b/source/core/replica-set-members.txt index 1250c0186fb..539a2328bab 100644 --- a/source/core/replica-set-members.txt +++ b/source/core/replica-set-members.txt @@ -36,8 +36,7 @@ adding another secondary), you may choose to include an :ref:`arbiter ` but does not hold data (i.e. does not provide data redundancy). -A replica set can have up to :ref:`50 members -<3.0-replica-sets-max-members>` but only 7 voting members. +A replica set can have up to 50 members but only 7 voting members. .. seealso:: diff --git a/source/faq/replica-sets.txt b/source/faq/replica-sets.txt index 66da24dc760..3826d8f2671 100644 --- a/source/faq/replica-sets.txt +++ b/source/faq/replica-sets.txt @@ -27,7 +27,7 @@ What kind of replication does MongoDB support? ---------------------------------------------- MongoDB supports :ref:`Replica sets `, which can have up -to :ref:`50 nodes <3.0-replica-sets-max-members>`. +to 50 nodes. Does replication work over the Internet and WAN connections? ------------------------------------------------------------ diff --git a/source/includes/extracts-4.0-upgrade-prereq.yaml b/source/includes/extracts-4.0-upgrade-prereq.yaml index 8e4b318f443..8e7f893ee9b 100644 --- a/source/includes/extracts-4.0-upgrade-prereq.yaml +++ b/source/includes/extracts-4.0-upgrade-prereq.yaml @@ -3,8 +3,7 @@ content: | If your deployment has user credentials stored in ``MONGODB-CR`` schema, you must upgrade to :ref:`Salted Challenge Response Authentication Mechanism (SCRAM) ` **before** you - upgrade to version 4.0. For information on upgrading to ``SCRAM``, see - :doc:`/release-notes/3.0-scram`. + upgrade to version 4.0. --- ref: 4.0-upgrade-prereq-isolated content: | diff --git a/source/includes/fact-mongodb-cr-deprecated.rst b/source/includes/fact-mongodb-cr-deprecated.rst index aed97bf6ca8..39cd0f094c1 100644 --- a/source/includes/fact-mongodb-cr-deprecated.rst +++ b/source/includes/fact-mongodb-cr-deprecated.rst @@ -1,3 +1,2 @@ As of MongoDB 3.6, ``MONGODB-CR`` authentication mechanism is -deprecated. If you have not upgraded your ``MONGODB-CR`` authentication -schema to SCRAM, see :doc:`/release-notes/3.0-scram`. +deprecated. diff --git a/source/reference/operator/query/near.txt b/source/reference/operator/query/near.txt index 44682596a01..38c44685031 100644 --- a/source/reference/operator/query/near.txt +++ b/source/reference/operator/query/near.txt @@ -94,10 +94,6 @@ Sort Operation .. |geo-operation| replace:: :query:`$near` -.. seealso:: - - :ref:`3.0-geo-near-compatibility` - Examples -------- diff --git a/source/reference/operator/query/nearSphere.txt b/source/reference/operator/query/nearSphere.txt index 2db031a9f70..6e89aeeb937 100644 --- a/source/reference/operator/query/nearSphere.txt +++ b/source/reference/operator/query/nearSphere.txt @@ -75,10 +75,6 @@ Definition If you use longitude and latitude for legacy coordinates, specify the longitude first, then latitude. - .. seealso:: - - :ref:`3.0-geo-near-compatibility` - Behavior -------- diff --git a/source/release-notes/3.0-changelog.txt b/source/release-notes/3.0-changelog.txt deleted file mode 100644 index dc1b39f27c6..00000000000 --- a/source/release-notes/3.0-changelog.txt +++ /dev/null @@ -1,670 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -============= -3.0 Changelog -============= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: twocols - - -.. include:: /includes/changelogs/releases/3.0.15.rst - -.. include:: /includes/changelogs/releases/3.0.14.rst - -.. include:: /includes/changelogs/releases/3.0.13.rst - -.. include:: /includes/changelogs/releases/3.0.12.rst - -.. include:: /includes/changelogs/releases/3.0.11.rst - -.. include:: /includes/changelogs/releases/3.0.10.rst - -.. include:: /includes/changelogs/releases/3.0.9.rst - -.. include:: /includes/changelogs/releases/3.0.8.rst - -.. include:: /includes/changelogs/releases/3.0.7.rst - -.. _3.0.6-changelog: - -3.0.6 Changelog ---------------- - -Security -~~~~~~~~ - -:issue:`SERVER-19538` Segfault when calling dbexit in SSLManager with auditing enabled - -Querying -~~~~~~~~ - -- :issue:`SERVER-19553` Mongod shouldn't use sayPiggyBack to send KillCursor messages - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-19719` Failure to rollback noPadding should not cause fatal error -- :issue:`SERVER-19644` Seg Fault on cloneCollection (specifically gridfs) - -WiredTiger -~~~~~~~~~~ - -- :issue:`SERVER-19673` Excessive memory allocated by WiredTiger journal -- :issue:`SERVER-19987` Limit the size of the per-session cursor cache -- :issue:`SERVER-19751` WiredTiger panic halt in eviction-server -- :issue:`SERVER-19744` WiredTiger changes for MongoDB 3.0.6 -- :issue:`SERVER-19573` MongoDb crash due to segfault -- :issue:`SERVER-19522` Capped collection insert rate declines over time under WiredTiger - -MMAPv1 -~~~~~~ - -:issue:`SERVER-19805` MMap memory mapped file address allocation code cannot handle addresses non-aligned to memory mapped granularity size - -Networking -~~~~~~~~~~ - -- :issue:`SERVER-19389` Remove wire level endianness check - -Aggregation Framework -~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-19553` Mongod shouldn't use sayPiggyBack to send KillCursor messages -- :issue:`SERVER-19464` $sort stage in aggregation doesn't call scoped connections done () - -Build and Testing -~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-19650` update YML files to tag system/test command types -- :issue:`SERVER-19236` clang-format the v3.0 branch -- :issue:`SERVER-19540` Add perf.yml file to 3.0 branch for mongo-perf regressions - -Internal Code -~~~~~~~~~~~~~ - -- :issue:`SERVER-19856` Register for PRESHUTDOWN notifications on Windows Vista+ - -Tools -~~~~~ - -``mongoexport`` and ``bsondump`` -```````````````````````````````` - -- :issue:`TOOLS-848` Can't handle some regexes - -mongoimport -``````````` - -- :issue:`TOOLS-874` \ :binary:`~bin.mongoimport` ``$date`` close to epoch not working - -mongotop -```````` - -- :issue:`TOOLS-864` \ :binary:`~bin.mongotop` "i/o timeout error" - -.. _3.0.5-changelog: - -3.0.5 Changelog ---------------- - -Querying -~~~~~~~~ - -- :issue:`SERVER-19489` Assertion failure and segfault in WorkingSet::free in 3.0.5-rc0 -- :issue:`SERVER-18461` Range predicates comparing against a BinData value should be covered, but are not in 2.6 -- :issue:`SERVER-17815` Plan ranking tie breaker is computed incorrectly -- :issue:`SERVER-17259` Coverity analysis defect 56350: Dereference null return value -- :issue:`SERVER-18926` Full text search extremely slow and uses a lot of memory under WiredTiger - - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-19375` choosing syncsource should compare against last fetched optime rather than last applied -- :issue:`SERVER-19298` Use userCreateNS w/options consistently in cloner -- :issue:`SERVER-18994` producer thread can continue producing after a node becomes primary -- :issue:`SERVER-18455` master/slave keepalives are not silent on slaves -- :issue:`SERVER-18280` ReplicaSetMonitor should use electionId to avoid talking to old primaries -- :issue:`SERVER-17689` Server crash during initial replication sync - -Sharding -~~~~~~~~ - -:issue:`SERVER-18955` mongoS doesn't set batch size (and keeps the old one, 0) on getMore if performed on first _cursor->more() - -Storage -~~~~~~~ - -- :issue:`SERVER-19283` WiredTiger changes for MongoDB 3.0.5 -- :issue:`SERVER-18874` Backport changes to RocksDB from mongo-partners repo -- :issue:`SERVER-18838` DB fails to recover creates and drops after system crash -- :issue:`SERVER-17370` Clean up storage engine-specific index and collection options -- :issue:`SERVER-15901` Cleanup unused locks on the lock manager - -WiredTiger -~~~~~~~~~~ - -- :issue:`SERVER-19513` Truncating a capped collection may not unindex deleted documents in WiredTiger -- :issue:`SERVER-19283` WiredTiger changes for MongoDB 3.0.5 -- :issue:`SERVER-19189` Improve performance under high number of threads with WT -- :issue:`SERVER-19178` In WiredTiger capped collection truncates, avoid walking lists of deleted items -- :issue:`SERVER-19052` Remove sizeStorer recalculations at startup with WiredTiger -- :issue:`SERVER-18926` Full text search extremely slow and uses a lot of memory under WiredTiger -- :issue:`SERVER-18902` Retrieval of large documents slower on WiredTiger than MMAPv1 -- :issue:`SERVER-18875` Oplog performance on WT degrades over time after accumulation of deleted items -- :issue:`SERVER-18838` DB fails to recover creates and drops after system crash -- :issue:`SERVER-18829` Cache usage exceeds configured maximum during index builds under WiredTiger -- :issue:`SERVER-18321` Speed up background index build with WiredTiger LSM -- :issue:`SERVER-17689` Server crash during initial replication sync -- :issue:`SERVER-17386` Cursor cache causes excessive memory utilization in WiredTiger -- :issue:`SERVER-17254` WT: drop collection while concurrent oplog tailing may greatly reduce throughput -- :issue:`SERVER-17078` show databases taking extraordinarily long with wiredTiger - -Networking -~~~~~~~~~~ - -- :issue:`SERVER-19255` Listener::waitUntilListening may return before listening has started - - -Build and Packaging -~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-18911` Update source tarball push -- :issue:`SERVER-18910` Path in distribution does not contain version -- :issue:`SERVER-18371` Add SSL library config detection -- :issue:`SERVER-17782` Generate source tarballs with pre-interpolated version metadata files from SCons -- :issue:`SERVER-17568` Report most-vexing parse warnings as errors on MSVC -- :issue:`SERVER-17329` Improve management of server version in build system -- :issue:`SERVER-18977` Initscript does not stop a running mongod daemon -- :issue:`SERVER-18911` Update source tarball push - -Shell -~~~~~ - -- :issue:`SERVER-18795` db.printSlaveReplicationInfo()/rs.printSlaveReplicationInfo() can not work with ARBITER role - -Logging and Diagnostics -~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-19054` Don't be too chatty about periodic tasks taking a few ms -- :issue:`SERVER-18979` Duplicate uassert & fassert codes -- :issue:`SERVER-19382` mongod enterprise crash running as snmp sub-agent - -Internal Code and Testing -~~~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-19353` Compilation failure with GCC 5.1 -- :issue:`SERVER-19298` Use userCreateNS w/options consistently in cloner -- :issue:`SERVER-19255` Listener::waitUntilListening may return before listening has started -- :issue:`SERVER-17728` typeid(glvalue) warns on clang 3.6 -- :issue:`SERVER-17567` Unconditional export of parseNumberFromStringWithBase -- :issue:`SERVER-19540` Add perf.yml file to 3.0 branch for mongo-perf regressions -- :issue:`SERVER-18068` Coverity analysis defect 72413: Resource leak -- :issue:`SERVER-17259` Coverity analysis defect 56350: Dereference null return value -- :issue:`SERVER-15017` benchRun might return incorrect stats values -- :issue:`SERVER-19525` use of wrong type for size count of rolling back insert - -.. _3.0.4-changelog: - -3.0.4 Changelog ---------------- - -Security -~~~~~~~~ - -- :issue:`SERVER-18475` \ ``authSchemaUpgrade`` fails when the :data:`system.users ` contains non ``MONGODB-CR`` users -- :issue:`SERVER-18312` Upgrade PCRE to latest - -Querying -~~~~~~~~ - -- :issue:`SERVER-18364` Ensure non-negation predicates get chosen over negation predicates for multikey index bounds construction -- :issue:`SERVER-16265` Add query details to getmore entry in profiler and :method:`db.currentOp()` -- :issue:`SERVER-15225` ``CachedPlanStage`` should execute for trial period and re-plan if query performs poorly -- :issue:`SERVER-13875` \ :method:`~db.collection.ensureIndex()` of ``2dsphere`` index breaks after upgrading to 2.6 (with the new ``createIndex`` command) - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-18566` Primary member can trip fatal assertion if stepping down while running findAndModify op resulting in an upsert -- :issue:`SERVER-18511` Report upstream progress when initial sync completes -- :issue:`SERVER-18409` Retry failed heartbeats before marking a node as DOWN -- :issue:`SERVER-18326` Rollback attempted during initial sync is fatal -- :issue:`SERVER-17923` Creating/dropping multiple background indexes on the same collection can cause fatal error on secondaries -- :issue:`SERVER-17913` New primary should log voters at default log level -- :issue:`SERVER-17807` drain ops before restarting initial sync -- :issue:`SERVER-15252` Write unit tests of ScatterGatherRunner -- :issue:`SERVER-15192` Make all logOp listeners rollback-safe -- :issue:`SERVER-18190` Secondary reads block replication - -Sharding -~~~~~~~~ - -- :issue:`SERVER-18822` Sharded clusters with WiredTiger primaries may lose writes during chunk migration -- :issue:`SERVER-18246` getmore on secondary in recovery mode can crash :binary:`~bin.mongos` - -Storage -~~~~~~~ - -:issue:`SERVER-18442` better error message when attempting to change storage engine metadata options - -WiredTiger -~~~~~~~~~~ - -- :issue:`SERVER-18647` WiredTiger changes for MongoDB 3.0.4 -- :issue:`SERVER-18646` Avoid WiredTiger checkpointing dead handles -- :issue:`SERVER-18629` WiredTiger journal system syncs wrong directory -- :issue:`SERVER-18460` Segfault during eviction under load -- :issue:`SERVER-18316` Database with WT engine fails to recover after system crash -- :issue:`SERVER-18315` Throughput drop during transaction pinned phase of checkpoints under WiredTiger -- :issue:`SERVER-18213` Lots of ``WriteConflict`` during multi-upsert with WiredTiger storage engine -- :issue:`SERVER-18079` Large performance drop with documents > 16k on Windows -- :issue:`SERVER-17944` ``WiredTigerRecordStore::truncate`` spends a lot of time sleeping - -HTTP Console -~~~~~~~~~~~~ - -:issue:`SERVER-18117` Bring back the _replSet page in the html interface - -Build and Packaging -~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-18894` OSX SSL builds should use unique filename -- :issue:`SERVER-18421` Create SSL Builder for OS X -- :issue:`SERVER-18312` Upgrade PCRE to latest -- :issue:`SERVER-13596` Support --prefix rpm installation - -Internal Code -~~~~~~~~~~~~~ - -:issue:`SERVER-6826` Potential memory leak in ``ConnectionString::connect`` - -Testing -~~~~~~~ - -- :issue:`SERVER-18318` Disable ``jsCore_small_oplog`` suite in Windows -- :issue:`SERVER-17336` fix ``core/compact_keeps_indexes.js`` in a master/slave test configuration -- :issue:`SERVER-13237` ``benchRun`` should use a thread-safe random number generator -- :issue:`SERVER-18097` Remove ``mongosTest_auth`` and ``mongosTest_WT`` tasks from evergreen.yml - -.. _3.0.3-changelog: - -3.0.3 Changelog ---------------- - -Security -~~~~~~~~ - -- :issue:`SERVER-18290` Adding a read role for a user doesn't seem to propagate to secondary until restart -- :issue:`SERVER-18239` ``dumpauth.js`` uses ambiguous ``--db``/\ ``--collection`` args -- :issue:`SERVER-18169` Regression: Auth enabled arbiter cannot be shutdown using command -- :issue:`SERVER-18140` Allow :dbcommand:`getParameter` to be executed locally against an arbiter in an authenticated replica set -- :issue:`SERVER-18051` OpenSSL internal error when using SCRAM-SHA1 authentication in FIPS mode -- :issue:`SERVER-18021` Allow :dbcommand:`serverStatus` to be executed locally against an arbiter in an authenticated replica set -- :issue:`SERVER-17908` Allow :dbcommand:`getCmdLineOpts` to be executed locally against an arbiter in an authenticated replica set -- :issue:`SERVER-17832` Memory leak when :binary:`~bin.mongod` configured with SSL required and handle insecure connection -- :issue:`SERVER-17812` LockPinger has audit-related GLE failure -- :issue:`SERVER-17591` Add SSL flag to select supported protocols -- :issue:`SERVER-16073` Allow disabling SSL Ciphers via hidden flag: ``sslCipherConfig`` -- :issue:`SERVER-12235` Don't require a database read on every new localhost connection when auth is on - -Querying -~~~~~~~~ - -- :issue:`SERVER-18304` duplicates on FindAndModify with remove option -- :issue:`SERVER-17815` Plan ranking tie breaker is computed incorrectly - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-18211` MongoDB fails to correctly roll back collection creation -- :issue:`SERVER-17273` Add support for ``secondaryCatchupPeriodSecs`` to :method:`rs.stepDown()` shell helper - -Sharding -~~~~~~~~ - -- :issue:`SERVER-17812` LockPinger has audit-related GLE failure -- :issue:`SERVER-17749` :dbcommand:`collMod` ``usePowerOf2Sizes`` fails on :binary:`~bin.mongos` -- :issue:`SERVER-16987` ``sh.getRecentMigrations`` shows aborted migration as success - -Storage -~~~~~~~ - -- :issue:`SERVER-18211` MongoDB fails to correctly roll back collection creation -- :issue:`SERVER-18111` mongod allows user inserts into system.profile collection -- :issue:`SERVER-17939` Backport mongo-rocks updates to v3.0 branch -- :issue:`SERVER-17745` Improve dirty page estimation in mmapv1 on Windows - -WiredTiger -~~~~~~~~~~ - -- :issue:`SERVER-18205` WiredTiger changes for MongoDB 3.0.3 -- :issue:`SERVER-18192` Crash running WiredTiger with "cache_resident=true" -- :issue:`SERVER-18014` Dropping a collection can block creating a new collection for an extended time under WiredTiger -- :issue:`SERVER-17907` B-tree eviction blocks access to collection for extended period under WiredTiger -- :issue:`SERVER-17892` Explicitly turn checksum on for all collections/indexes in WiredTiger by default - -Indexing -~~~~~~~~ - -- :issue:`SERVER-18087` index_retry.js and index_no_retry.js not checking for presence of "progress" field in currentOp() result -- :issue:`SERVER-17882` Update with key too large to index crashes WiredTiger/RockDB secondary - -Write Ops -~~~~~~~~~ - -- :issue:`SERVER-18111` mongod allows user inserts into system.profile collection - -Networking -~~~~~~~~~~ - -- :issue:`SERVER-17832` Memory leak when MongoD configured with SSL required and handle insecure connection -- :issue:`SERVER-17591` Add SSL flag to select supported protocols -- :issue:`SERVER-16073` Allow disabling SSL Ciphers via hidden flag: sslCipherConfig - -Concurrency -~~~~~~~~~~~ - -- :issue:`SERVER-18304` duplicates on FindAndModify with remove option -- :issue:`SERVER-16636` Deadlock detection should check cycles for stability or should be disabled - -Geo -~~~ - -- :issue:`SERVER-17835` Aggregation geoNear deprecated uniqueDocs warning -- :issue:`SERVER-9220` allow more than two values in the coordinate-array when using 2dsphere index - -Aggregation Framework -~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-17835` Aggregation geoNear deprecated uniqueDocs warning - -MapReduce -~~~~~~~~~ - -- :issue:`SERVER-17889` Using eval command to run mapReduce with non-inline "out" option triggers fatal assertion failure - -Admin -~~~~~ - -- :issue:`SERVER-18290` Adding a read role for a user doesn't seem to propagate to secondary until restart -- :issue:`SERVER-18169` Regression: Auth enabled arbiter cannot be shutdown using command -- :issue:`SERVER-17820` Windows service stop can lead to mongod abrupt termination due to long shutdown time - -Build and Packaging -~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-18344` logs should be sent to updated logkeeper server -- :issue:`SERVER-18299` Use ld wrapper for compiling Enterprise GO tools in RHEL 5 -- :issue:`SERVER-18082` Change ``smoke.py`` buildlogger command line options to environment variables -- :issue:`SERVER-17730` Parsing of Variables on Windows doesn't respect windows conventions -- :issue:`SERVER-17694` support ``RPATH=value`` in top-level ``SConstruct`` -- :issue:`SERVER-17465` ``--use-system-tcmalloc`` does not support ``tcmalloc`` :dbcommand:`setParameter` and extension -- :issue:`SERVER-17961` ``THIRD-PARTY-NOTICES.windows`` needs to be updated -- :issue:`SERVER-17780` Init script sets process ulimit to different value compared to documentation - -JavaScript -~~~~~~~~~~ - -- :issue:`SERVER-17453` warn that db.eval() / eval command is deprecated - -Shell -~~~~~ - -- :issue:`SERVER-17951` db.currentOp() fails with read preference set -- :issue:`SERVER-17273` Add support for secondaryCatchupPeriodSecs to rs.stepdown shell helper -- :issue:`SERVER-16987` ``sh.getRecentMigrations`` shows aborted migration as success - -Testing -~~~~~~~ - -- :issue:`SERVER-18302` remove test buildlogger instance -- :issue:`SERVER-18262` setup_multiversion_mongodb should retry links download on timeouts -- :issue:`SERVER-18239` dumpauth.js uses ambiguous --db/--collection args -- :issue:`SERVER-18229` Smoke.py with PyMongo 3.0.1 fails to run certain tests -- :issue:`SERVER-18073` Fix smoke.py to work with pymongo 3.0 -- :issue:`SERVER-17998` Ignore socket exceptions in initial_sync_unsupported_auth_schema.js test -- :issue:`SERVER-18293` ASAN tests should run on larger instance size -- :issue:`SERVER-17761` RestAdminAccess/NoAdminAccess objects leak at shutdown - -.. _3.0.2-changelog: - -3.0.2 Changelog ---------------- - -Security -~~~~~~~~ - -- :issue:`SERVER-17719` ``mongo`` Shell crashes if -p is missing and user matches -- :issue:`SERVER-17705` Fix credentials field inconsistency in HTTP interface -- :issue:`SERVER-17671` Refuse to complete initial sync from nodes with 2.4-style auth data -- :issue:`SERVER-17669` Remove auth prompt in webserver when auth is not enabled -- :issue:`SERVER-17647` Compute BinData length in v8 -- :issue:`SERVER-17529` Can't list collections when :binary:`~bin.mongos` is running 3.0 and config servers are running 2.6 and auth is on - -Query and Indexing -~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-8188` Configurable idle cursor timeout -- :issue:`SERVER-17469` ``2d`` nearSphere queries scan entire collection -- :issue:`SERVER-17642` ``WriteConfictException`` during background index create - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-17677` Replica Set member backtraces sometimes when removed from replica set -- :issue:`SERVER-17672` :dbcommand:`serverStatus` command with ``{oplog: 1}`` option can trigger segmentation fault in :binary:`~bin.mongod` -- :issue:`SERVER-17822` ``OpDebug::writeConflicts`` should be a 64-bit type - -Sharding -~~~~~~~~ - -:issue:`SERVER-17805` ``logOp`` / ``OperationObserver`` should always check shardversion - -Storage -~~~~~~~ - -:issue:`SERVER-17613` Unable to start :binary:`~bin.mongod` after unclean shutdown - -WiredTiger -`````````` - -- :issue:`SERVER-17713` WiredTiger using zlib compression can create invalid compressed stream -- :issue:`SERVER-17642` WriteConfictException during background index create -- :issue:`SERVER-17587` Node crash scenario results in unrecoverable error on subsequent startup under WiredTiger -- :issue:`SERVER-17562` Invariant failure: ``s->commit_transaction(s, NULL)`` resulted in status ``BadValue 22`` -- :issue:`SERVER-17551` mongod fatal assertion after "hazard pointer table full" message -- :issue:`SERVER-17532` Duplicate key error message does not contain index name anymore -- :issue:`SERVER-17471` WiredTiger Mutex on Windows can block the server -- :issue:`SERVER-17382` rc10/wiredTiger multi collection/DB bulk insert slow than rc8 in initial insertion phase -- :issue:`SERVER-16804` :option:`mongod --repair` fails because ``verify()`` returns EBUSY under WiredTiger - -MMAPv1 -`````` - -- :issue:`SERVER-17616` Removing or inserting documents with large indexed arrays consumes excessive memory -- :issue:`SERVER-17313` Segfault in ``BtreeLogic::_insert`` when inserting into previously-dropped namespace - -RocksDB -``````` - -:issue:`SERVER-17706` Sync new mongo+rocks changes to v3.0 branch - -HTTP Console -~~~~~~~~~~~~ - -- :issue:`SERVER-17729` Cannot start :binary:`~bin.mongod` \ ``httpinterface``: sockets higher than 1023 not supported -- :issue:`SERVER-17705` Fix credentials field inconsistency in HTTP interface -- :issue:`SERVER-17669` Remove auth prompt in webserver when auth is not enabled - -Admin -~~~~~ - -- :issue:`SERVER-17570` MongoDB 3.0 NT Service shutdown race condition with :method:`db.shutdownServer()` -- :issue:`SERVER-17699` "locks" section empty in diagnostic log and profiler output for some operations -- :issue:`SERVER-17337` RPM Init script breaks with quotes in ``yaml`` config file -- :issue:`SERVER-16731` Remove unused DBPATH init script variable - -Networking -~~~~~~~~~~ - -:issue:`SERVER-17652` Cannot start mongod due to "sockets higher than 1023 not being supported" - -Testing -~~~~~~~ - -- :issue:`SERVER-17826` Ignore ismaster exceptions in ```initial_sync_unsupported_auth_schema.js`` test -- :issue:`SERVER-17808` Ensure availability in ``initial_sync_unsupported_auth_schema.js`` test -- :issue:`SERVER-17433` ASAN leak in small oplog suite ``write_result.js`` - -.. _3.0.1-changelog: - -3.0.1 Changelog ---------------- - -Security -~~~~~~~~ - -- :issue:`SERVER-17507` MongoDB3 enterprise AuditLog -- :issue:`SERVER-17379` Change "or" to "and" in webserver localhost exception check -- :issue:`SERVER-16944` dbAdminAnyDatabase should have full parity with dbAdmin for a given database -- :issue:`SERVER-16849` On mongos we always invalidate the user cache once, even if no user definitions are changing -- :issue:`SERVER-16452` Failed login attempts should log source IP address - -Querying -~~~~~~~~ - -- :issue:`SERVER-17395` Add FSM tests to stress yielding -- :issue:`SERVER-17387` invalid projection for findAndModify triggers fassert() failure -- :issue:`SERVER-14723` Crash during query planning for geoNear with multiple 2dsphere indices -- :issue:`SERVER-17486` Crash when parsing invalid polygon coordinates - -Replication -~~~~~~~~~~~ - -- :issue:`SERVER-17515` copyDatabase fails to replicate indexes to secondary -- :issue:`SERVER-17499` Using eval command to run getMore on aggregation cursor trips fatal assertion -- :issue:`SERVER-17487` cloner dropDups removes _id entries belonging to other records -- :issue:`SERVER-17302` consider blacklist in shouldChangeSyncSource - -Sharding -~~~~~~~~ - -- :issue:`SERVER-17398` Deadlock in MigrateStatus::startCommit -- :issue:`SERVER-17300` Balancer tries to create config.tags index multiple times -- :issue:`SERVER-16849` On mongos we always invalidate the user cache once, even if no user definitions are changing -- :issue:`SERVER-5004` balancer should check for stopped between chunk moves in current round - -Indexing -~~~~~~~~ - -- :issue:`SERVER-17521` improve createIndex validation of empty name -- :issue:`SERVER-17436` MultiIndexBlock may access deleted collection after recovering from yield - -Aggregation Framework -~~~~~~~~~~~~~~~~~~~~~ - -:issue:`SERVER-17224` Aggregation pipeline with 64MB document can terminate server - -Write Ops -~~~~~~~~~ - -- :issue:`SERVER-17489` in bulk ops, only mark last operation with commit=synchronous -- :issue:`SERVER-17276` WriteConflictException retry loops needed for collection creation on upsert - -Concurrency -~~~~~~~~~~~ - -- :issue:`SERVER-17501` Increase journalling capacity limits -- :issue:`SERVER-17416` Deadlock between MMAP V1 journal lock and oplog collection lock -- :issue:`SERVER-17395` Add FSM tests to stress yielding - -Storage -~~~~~~~ - -- :issue:`SERVER-17515` copyDatabase fails to replicate indexes to secondary -- :issue:`SERVER-17436` MultiIndexBlock may access deleted collection after recovering from yield -- :issue:`SERVER-17416` Deadlock between MMAP V1 journal lock and oplog collection lock -- :issue:`SERVER-17381` Rename rocksExperiment to RocksDB -- :issue:`SERVER-17369` [Rocks] Fix the calculation of nextPrefix -- :issue:`SERVER-17345` WiredTiger -> session.truncate: the start cursor position is after the stop cursor position -- :issue:`SERVER-17331` RocksDB configuring and monitoring -- :issue:`SERVER-17323` MMAPV1Journal lock counts are changing during WT run -- :issue:`SERVER-17319` invariant at shutdown rc9, rc10, rc11 with wiredTiger -- :issue:`SERVER-17293` Server crash setting wiredTigerEngineRuntimeConfig:"eviction=(threads_max=8)" - -WiredTiger -`````````` - -- :issue:`SERVER-17510` "Didn't find RecordId in WiredTigerRecordStore" on collections after an idle period -- :issue:`SERVER-17506` Race between inserts and checkpoints can lose records under WiredTiger -- :issue:`SERVER-17487` cloner dropDups removes _id entries belonging to other records -- :issue:`SERVER-17481` WiredTigerRecordStore::validate should call WT_SESSION::verify -- :issue:`SERVER-17451` WiredTiger unable to start if crash leaves 0-length journal file -- :issue:`SERVER-17378` WiredTiger's compact code can return 'Operation timed out' error (invariant failure) -- :issue:`SERVER-17345` WiredTiger -> session.truncate: the start cursor position is after the stop cursor position -- :issue:`SERVER-17319` invariant at shutdown rc9, rc10, rc11 with wiredTiger - -MMAPv1 -`````` - -- :issue:`SERVER-17501` Increase journalling capacity limits -- :issue:`SERVER-17416` Deadlock between MMAP V1 journal lock and oplog collection lock -- :issue:`SERVER-17388` Invariant failure in MMAPv1 when disk full - -RocksDB -``````` - -- :issue:`SERVER-17381` Rename rocksExperiment to RocksDB -- :issue:`SERVER-17369` [Rocks] Fix the calculation of nextPrefix -- :issue:`SERVER-17331` RocksDB configuring and monitoring - -Shell and Administration -~~~~~~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-17226` 'top' command with 64MB result document can terminate server -- :issue:`SERVER-17405` getLog command masserts when given number -- :issue:`SERVER-17347` .explain() should be included in the shell's DBCollection help - -Build and Packaging -~~~~~~~~~~~~~~~~~~~ - -- :issue:`SERVER-17484` Migrate server MCI config into server repo -- :issue:`SERVER-17463` Python error when specifying absolute path to scons cacheDir -- :issue:`SERVER-17460` LIBDEPS_v8_SYSLIBDEP typo -- :issue:`SERVER-14166` Semantics of the --osx-version-min flag should be improved -- :issue:`SERVER-17517` mongodb-org rpm packages no longer "provide" mongo-10gen-server - -Logging -~~~~~~~ - -:issue:`SERVER-16452` Failed login attempts should log source IP address - -Platform -~~~~~~~~ - -- :issue:`SERVER-17252` Upgrade PCRE Version from 8.30 to Latest -- :issue:`SERVER-14166` Semantics of the --osx-version-min flag should be improved - -Internal Code -~~~~~~~~~~~~~ - -:issue:`SERVER-17338` NULL pointer crash when running copydb against stepped-down 2.6 primary - -Testing -~~~~~~~ - -- :issue:`SERVER-17443` get_replication_info_helper.js should assert.soon rather than assert for log messages -- :issue:`SERVER-17442` increase tolerance for shutdown timeout in stepdown.js to fix windows build break -- :issue:`SERVER-17395` Add FSM tests to stress yielding diff --git a/source/release-notes/3.0-compatibility.txt b/source/release-notes/3.0-compatibility.txt deleted file mode 100644 index 3cf2c4ecdca..00000000000 --- a/source/release-notes/3.0-compatibility.txt +++ /dev/null @@ -1,596 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -==================================== -Compatibility Changes in MongoDB 3.0 -==================================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: twocols - -The following 3.0 changes can affect the compatibility with older -versions of MongoDB. See :doc:`/release-notes/3.0` for the full list of -the 3.0 changes. - -.. _3.0-compatibility-storage-engine: - -Storage Engine --------------- - -.. _3.0-compatibility-configuration-file: - -Configuration File Options Changes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -With the introduction of additional storage engines in 3.0, some -:doc:`configuration file options ` -have changed: - -.. list-table:: - :header-rows: 1 - - * - Previous Setting - - New Setting - - * - ``storage.journal.commitIntervalMs`` - - :v3.0:`storage.mmapv1.journal.commitIntervalMs ` - - * - ``storage.journal.debugFlags`` - - :v3.0:`storage.mmapv1.journal.debugFlags ` - - * - ``storage.nsSize`` - - :v3.0:`storage.mmapv1.nsSize ` - - * - ``storage.preallocDataFiles`` - - :v3.0:`storage.mmapv1.preallocDataFiles ` - - * - ``storage.quota.enforced`` - - :v3.0:`storage.mmapv1.quota.enforced ` - - * - ``storage.quota.maxFilesPerDB`` - - :v3.0:`storage.mmapv1.quota.maxFilesPerDB ` - - * - ``storage.smallFiles`` - - :v3.0:`storage.mmapv1.smallFiles ` - -3.0 :binary:`~bin.mongod` instances are backward compatible with existing -configuration files, but will issue warnings when if you attempt to -use the old settings. - -.. _3.0-compatibility-data-file: - -Data Files Must Correspond to Configured Storage Engine -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The files in the :setting:`~storage.dbPath` directory must correspond -to the configured storage engine (i.e. ``--storageEngine``). -:binary:`~bin.mongod` will not start if :setting:`~storage.dbPath` contains -data files created by a storage engine other than the one specified by -``--storageEngine``. - -.. seealso:: - - Change Storage Engine to WiredTiger sections in - :doc:`/release-notes/3.0-upgrade` - -.. _3.0-compatibility-drivers-wired-tiger: - -WiredTiger and Driver Version Compatibility -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For MongoDB 3.0 deployments that use the WiredTiger storage engine, the -following operations return no output when issued in previous versions -of the ``mongo`` shell or drivers: - -- :method:`db.getCollectionNames()` -- :method:`db.collection.getIndexes()` -- ``show collections`` -- ``show tables`` - -Use the 3.0 ``mongo`` shell or the :ref:`3.0 compatible version -` of the official drivers when -connecting to 3.0 :binary:`~bin.mongod` instances that use WiredTiger. The -2.6.8 ``mongo`` shell is also compatible with 3.0 -:binary:`~bin.mongod` instances that use WiredTiger. - -``db.fsyncLock()`` is not Compatible with WiredTiger -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -With WiredTiger the :method:`db.fsyncLock()` and -:method:`db.fsyncUnlock()` operations *cannot* guarantee that the data -files do not change. As a result, do not use these methods to ensure -consistency for the purposes of creating backups. - -.. _3.0-compatibility-touch: - -Support for ``touch`` Command -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If a storage engine does not support the ``touch``, then the -``touch`` command will return an error. - -- The MMAPv1 storage engine supports ``touch``. - -- The WiredTiger storage engine *does not* support - ``touch``. - -.. _3.0-compatiblity-record-alloc: - -Dynamic Record Allocation -~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 no longer supports dynamic record allocation and deprecates -:v3.0:`paddingFactor `. - -MongoDB 3.0 deprecates the ``newCollectionsUsePowerOf2Sizes`` -parameter such that you can no longer use the parameter to disable the -power of 2 sizes allocation for a collection. Instead, use the -:v3.0:`collMod ` with the ``noPadding`` -flag or the :v3.0:`db.createCollection() -` method with the ``noPadding`` -option. Only set ``noPadding`` for collections with workloads that -consist only of inserts or in-place updates (such as incrementing -counters). - -.. warning:: - - Only set ``noPadding`` to ``true`` for collections whose - workloads have *no* update operations that cause documents to grow, - such as for collections with workloads that are insert-only. For - more information, see :v3.0:`No Padding Allocation Strategy - `. - -For more information, see :ref:`3.0-mmapv1-padding`. - -.. _3.0-compatibility-rs: - -Replication Changes -------------------- - -.. _3.0-oplog-format-change: - -Replica Set Oplog Format Change -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 is not compatible with oplog entries generated by versions -of MongoDB before 2.2.1. If you upgrade from one of these versions, -you must wait for new oplog entries to overwrite *all* old oplog -entries generated by one of these versions before upgrading to 3.0.0 -or earlier. - -Secondaries may abort if they replay a pre-2.6 oplog with an index -build operation that would fail on a 2.6 or later primary. - -.. _3.0-compatibility-repl-set-config: - -Replica Set Configuration Validation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 provides a stricter validation of :doc:`replica set -configuration settings ` and replica -sets invalid replica set configurations. - -Stricter validations include: - -- Arbiters can only have ``1`` vote. Previously, arbiters could also - have a value of ``0`` for - :rsconf:`members[n].votes`. If an arbiter has any - value other than ``1`` for - :rsconf:`members[n].votes`, you must fix the - setting. - -- Non-arbiter members can **only** have value of ``0`` or ``1`` for - :rsconf:`members[n].votes`. If a non-arbiter - member has any other value for - :rsconf:`members[n].votes`, you must fix the - setting. - -- :rsconf:`_id` in the - :doc:`/reference/replica-configuration` must specify the same name as - that specified by ``--replSet`` or - :setting:`replication.replSetName`. Otherwise, you must fix the - setting. - -- Disallows ``0`` for - :rsconf:`settings.getLastErrorDefaults` value. If - :rsconf:`settings.getLastErrorDefaults` value is - ``0``, you must fix the setting. - -- :rsconf:`settings` can only contain the recognized - settings. Previously, MongoDB ignored unrecognized settings. If - :rsconf:`settings` contains unrecognized settings, - you must remove the unrecognized settings. - -To fix the settings before upgrading to MongoDB 3.0, connect to the -primary and :method:`reconfigure ` your replica set to -valid configuration settings. - -If you have already upgraded to MongoDB 3.0, you must :doc:`downgrade -to MongoDB 2.6 ` first and then fix the -settings. Once you have :method:`reconfigured ` the -replica set, you can re-upgrade to MongoDB 3.0. - -Change of ``w: majority`` Semantics -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -A write concern with a :ref:`w: majority ` value is satisfied -when a majority of the *voting* members replicates a write -operation. In previous versions, *majority* referred a majority of all -voting and non-voting members of the set. - -Remove ``local.slaves`` Collection -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 removes the ``local.slaves`` collection that tracked the -secondaries' replication progress. To track the replication progress, -use the :method:`rs.status()` method. - -Replica Set State Change -~~~~~~~~~~~~~~~~~~~~~~~~ - -The ``FATAL`` replica set state does not exist as of 3.0.0. - -HTTP Interface -~~~~~~~~~~~~~~ - -The HTTP Interface (i.e. ``net.http.enabled``) no longer -reports replication data. - -.. _3.0-compatibility-tools: - -MongoDB Tools Changes ---------------------- - -.. _tools-remove-dbpath-support: - -Require a Running MongoDB Instance -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The 3.0 versions of MongoDB tools, :binary:`~bin.mongodump`, -:binary:`~bin.mongorestore`, :binary:`~bin.mongoexport`, -:binary:`~bin.mongoimport`, :binary:`~bin.mongofiles`, and -``mongooplog``, must connect to running MongoDB instances and -these tools *cannot* directly modify the data files with ``--dbpath`` -as in previous versions. Ensure that you start your :binary:`~bin.mongod` -instance(s) before using these tools. - -Removed Options -~~~~~~~~~~~~~~~ - -- Removed ``--dbpath``, ``--journal``, and ``--filter`` options for - :binary:`~bin.mongodump`, :binary:`~bin.mongorestore`, :binary:`~bin.mongoimport`, - :binary:`~bin.mongoexport`, and :binary:`~bin.bsondump`. - -- Removed ``--locks`` option for :binary:`~bin.mongotop`. - -- Removed ``--noobjcheck`` option for :binary:`~bin.bsondump` and - :binary:`~bin.mongorestore`. - -- Removed ``--csv`` option for :binary:`~bin.mongoexport`. Use the new - ``--type`` option to specify the export format type (``csv`` or - ``json``). - -.. seealso:: - - :ref:`3.0-tools-enhancements` - - -.. _3.0-compatibility-sharded-cluster: - -Sharded Cluster Setting ------------------------ - -Remove ``releaseConnectionsAfterResponse`` Parameter -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB now always releases connections after response. -``releaseConnectionsAfterResponse`` parameter is no longer available. - -.. _3.0-compatibility-security-changes: - -Security Changes ----------------- - -.. _legacy-auth-model-removed: - -MongoDB 2.4 User Model Removed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 completely removes support for the deprecated 2.4 user -model. MongoDB 3.0 will exit with an error message if there is user -data with the 2.4 schema, i.e. if ``authSchema`` version is less than -``3``. - -To verify the version of your existing 2.6 schema, query the -``system.version`` collection in the ``admin`` database: - -.. note:: You must have privileges to query the collection. - -.. code-block:: javascript - - use admin - db.system.version.find( { _id: "authSchema" }) - -If you are currently using ``auth`` and you have schema version 2 or 3, -the query returns the ``currentVersion`` of the existing ``authSchema``. - -If you do not currently have any users *or* you are using -``authSchema`` version 1, the query will not return any result. - -If your ``authSchema`` version is less -than ``3`` or the query does not return any results, see the 2.6 Upgrade Authorization to -upgrade the ``authSchema`` version before upgrading to MongoDB 3.0. - -After upgrading MongoDB to 3.0 from 2.6, to use the new ``SCRAM-SHA-1`` -challenge-response mechanism if you have existing user data, you will -need to upgrade the authentication schema a second time. This upgrades -the ``MONGODB-CR`` user model to ``SCRAM-SHA-1`` user model. See -:doc:`/release-notes/3.0-scram` for details. - -.. _3.0-compatibility-localhost: - -Localhost Exception Changed -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In 3.0, the localhost exception changed so that these connections *only* -have access to create the first user on the ``admin`` -database. In previous versions, connections that gained access using -the localhost exception had unrestricted access to the MongoDB -instance. - -See :ref:`localhost-exception` for more information. - -``db.addUser()`` Removed -~~~~~~~~~~~~~~~~~~~~~~~~ - -3.0 removes the legacy ``db.addUser()`` method. Use -:method:`db.createUser()` and :method:`db.updateUser()` instead. - -TLS/SSL Configuration Option Changes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 introduced new :setting:`net.ssl.allowConnectionsWithoutCertificates` -configuration file setting and ``--sslAllowConnectionsWithoutCertificates`` -command line option for :binary:`~bin.mongod` and :binary:`~bin.mongos`. These -options replace previous ``net.ssl.weakCertificateValidation`` and -``--sslWeakCertificateValidation`` options, which became -aliases. Update your configuration to ensure future compatibility. - -.. _3.0-compatibility-certificate-validation: - -TLS/SSL Certificates Validation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default, when running in SSL mode, MongoDB instances will *only* -start if its certificate (i.e. :setting:`net.ssl.PEMKeyFile`) is valid. -You can disable this behavior with the -:setting:`net.ssl.allowInvalidCertificates` setting or the -``--sslAllowInvalidCertificates`` command line option. - -To start the ``mongo`` shell with ``--ssl``, you must explicitly -specify either the ``--sslCAFile`` or ``--sslAllowInvalidCertificates`` -option at startup. See :doc:`/tutorial/configure-ssl-clients` for more -information. - -.. _3.0-compatibility-certificate-hostname-validation: - -TLS/SSL Certificate Hostname Validation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default, MongoDB validates the hostnames of hosts attempting to connect -using certificates against the hostnames listed in those certificates. In -certain deployment situations this behavior may be undesirable. It is now -possible to disable such hostname validation without disabling validation of -the rest of the certificate information with the -:setting:`net.ssl.allowInvalidHostnames` setting or the -``--sslAllowInvalidHostnames`` command line option. - -SSLv3 Ciphers Disabled -~~~~~~~~~~~~~~~~~~~~~~ - -In light of `vulnerabilities in legacy SSL ciphers -`_, -these ciphers have been explicitly disabled in MongoDB. No -configuration changes are necessary. - -``mongo`` Shell Version Compatibility -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Versions of the ``mongo`` shell before 3.0 are *not* -compatible with 3.0 deployments of MongoDB that enforce access -control. If you have a 3.0 MongoDB deployment that requires -access control, you must use 3.0 versions of the ``mongo`` -shell. - -HTTP Status Interface and REST API Compatibility -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Neither the HTTP status interface nor the REST API support the -:ref:`SCRAM-SHA-1 ` challenge-response -user authentication mechanism introduced in version 3.0. - -.. _3.0-compatibility-indexes: - -Indexes -------- - -Remove ``dropDups`` Option -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -``dropDups`` option is no longer available for -:method:`~db.collection.createIndex()`, -:method:`~db.collection.ensureIndex()`, and :dbcommand:`createIndexes`. - -Changes to Restart Behavior during Background Indexing -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For 3.0 :binary:`~bin.mongod` instances, if a background index build is in -progress when the :binary:`~bin.mongod` process terminates, when the -instance restarts the index build will restart as foreground index -build. If the index build encounters any errors, such as a duplicate -key error, the :binary:`~bin.mongod` will exit with an error. - -To start the :binary:`~bin.mongod` after a failed index build, use the -``storage.indexBuildRetry`` or ``--noIndexBuildRetry`` to skip the -index build on start up. - -.. _3.0-geo-near-compatibility: - -``2d`` Indexes and Geospatial Near Queries -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -For :query:`$near` queries that use a :ref:`2d <2d-index>` index: - -- MongoDB no longer uses a default limit of 100 documents. - -- Specifying a :method:`~cursor.batchSize()` is no longer analogous to - specifying a :method:`~cursor.limit()`. - -For :query:`$nearSphere` queries that use a :ref:`2d <2d-index>` index, -MongoDB no longer uses a default limit of 100 documents. - -.. _compatibility-driver-versions: - -Driver Compatibility Changes ----------------------------- - -Each officially supported driver has release a version that includes -support for all new features introduced in MongoDB 3.0. Upgrading to -one of these version is strongly recommended as part of the upgrade -process. - -A driver upgrade is **necessary** in certain scenarios due to -changes in functionality: - -- Use of the ``SCRAM-SHA-1`` authentication method -- Use of functionality that calls :dbcommand:`listIndexes` or - :dbcommand:`listCollections` - -The minimum 3.0-compatible driver versions are: - -.. |driver-compatibility-heading| replace:: Minimum 3.0-Compatible Version - -.. include:: /includes/list-table-3.0-driver-compatibility.rst - -General Compatibility Changes ------------------------------ - -``findAndModify`` Return Document -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In MongoDB 3.0, when performing an update with -:dbcommand:`findAndModify` that also specifies ``upsert: true`` *and* -either the ``new`` option is not set or ``new: false``, -:dbcommand:`findAndModify` returns ``null`` in the ``value`` field if -the ``query`` does not match any document, regardless of the ``sort`` -specification. - -In previous versions, :dbcommand:`findAndModify` returns an empty -document ``{}`` in the ``value`` field if a ``sort`` is specified for -the update, and ``upsert: true``, and the ``new`` option is not set or -``new: false``. - -``upsert:true`` with a Dotted ``_id`` Query -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/fact-upsert-id.rst - -Deprecate Access to ``system.indexes`` and ``system.namespaces`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 deprecates *direct* access to ``system.indexes`` and -``system.namespaces`` collections. Use the :dbcommand:`createIndexes` -and :dbcommand:`listIndexes` commands instead. See also -:ref:`3.0-compatibility-drivers-wired-tiger`. - -Collection Name Validation -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 more consistently enforces the :limit:`collection naming -restrictions `. Ensure your application -does not create or depend on invalid collection names. - -.. _3.0-compatibility-platform-support: - -Platform Support -~~~~~~~~~~~~~~~~ - -Commercial support is no longer provided for MongoDB on 32-bit -platforms (Linux and Windows). Linux RPM and DEB packages are also no -longer available. However, binary archives are still available. - -Linux Package Repositories -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/extracts/fact-3.0-linux-package-repo-relnotes.rst - -Removed/Deprecated Commands -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following commands and methods are no longer available in MongoDB 3.0: - -- ``closeAllDatabases`` - -- ``getoptime`` - -- ``text`` - -- ``indexStats``, ``db.collection.getIndexStats()``, and ``db.collection.indexStats()`` - -The following commands and methods are deprecated in MongoDB 3.0: - -- ``diagLogging`` - -- ``eval``, ``db.eval()`` - -- ``db.collection.copyTo()`` - -In addition, you cannot use the now deprecated ``eval`` -command or the ``db.eval()`` method to invoke :dbcommand:`mapReduce` or -:method:`db.collection.mapReduce()`. - -.. _3.0-date-timestamp: - -Date and Timestamp Comparison Order -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 no longer treats the :ref:`Timestamp -` and the :ref:`Date -` data types as equivalent for comparison -purposes. Instead, the :ref:`Timestamp ` -data type has a higher comparison/sort order (i.e. is "greater") than -the :ref:`Date ` data type. If your -application relies on the equivalent comparison/sort order of Date and -Timestamp objects, modify your application accordingly before upgrading. - -Server Status Output Change -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The :dbcommand:`serverStatus` command and the -:method:`db.serverStatus()` method no longer return ``workingSet``, -``indexCounters``, and ``recordStats`` sections in the output. - -Unix Socket Permissions Change -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Unix domain socket file permission now defaults to ``0700``. To change -the permission, MongoDB provides the -:setting:`net.unixDomainSocket.filePermissions` setting as well as the -``--filePermission`` option. - -``cloneCollection`` -~~~~~~~~~~~~~~~~~~~ - -The :v3.0:`cloneCollection ` command -and the :v3.0:`db.cloneCollection() ` -method will now return an error if the collection already exists, instead of -inserting into it. diff --git a/source/release-notes/3.0-downgrade.txt b/source/release-notes/3.0-downgrade.txt deleted file mode 100644 index 184923f964e..00000000000 --- a/source/release-notes/3.0-downgrade.txt +++ /dev/null @@ -1,214 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -========================== -Downgrade MongoDB from 3.0 -========================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Before you attempt any downgrade, familiarize yourself with the content -of this document, particularly the :ref:`3.0-downgrade-considerations` -and the procedure for :ref:`downgrading sharded clusters -<3.0-downgrade-cluster>`. - -.. _3.0-downgrade-considerations: - -Downgrade Recommendations and Checklist ---------------------------------------- - -When downgrading, consider the following: - -Downgrade Path -~~~~~~~~~~~~~~ - -.. include:: /includes/fact-3.0-downgrade-path.rst - -.. important:: - - If you upgrade to MongoDB 3.0 and have run - ``authSchemaUpgrade``, you **cannot** downgrade to the 2.6 - series without disabling ``--auth``. - -Procedures -~~~~~~~~~~ - -Follow the downgrade procedures: - -- To downgrade sharded clusters, see :ref:`3.0-downgrade-cluster`. - -- To downgrade replica sets, see :ref:`3.0-downgrade-replica-set`. - -- To downgrade a standalone MongoDB instance, see :ref:`3.0-downgrade-standalone`. - -.. note:: - - *Optional*. Consider :dbcommand:`compacting ` collections - after downgrading. Otherwise, older versions will not be able to - reuse free space regions larger than 2MB created while running 3.0. - This can result in wasted space but no data loss following the - downgrade. - -Downgrade MongoDB Processes ---------------------------- - -.. _3.0-downgrade-standalone: - -Downgrade a Standalone ``mongod`` Instance -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you have changed the storage engine to ``WiredTiger``, change the -storage engine to MMAPv1 before downgrading to 2.6. - -.. _3.0-downgrade-mmapv1-standalone: - -Change Storage Engine to MMAPv1 -``````````````````````````````` - -To change storage engine to MMAPv1 for a standalone :binary:`~bin.mongod` -instance, you will need to manually export and upload the data using -:binary:`~bin.mongodump` and :binary:`~bin.mongorestore`. - -.. include:: /includes/steps/3.0-change-to-mmapv1.rst - -Downgrade Binaries -`````````````````` - -The following steps outline the procedure to downgrade a standalone -:binary:`~bin.mongod` from version 3.0 to 2.6. - -.. include:: /includes/fact-3.0-downgrade-path.rst - -.. include:: /includes/steps/3.0-downgrade-mongod.rst - -.. _`MongoDB Download Page`: http://www.mongodb.org/downloads - -.. _3.0-downgrade-replica-set: - -Downgrade a 3.0 Replica Set -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/fact-change-storage-engine-before-downgrade.rst - -.. _3.0-downgrade-repl-set-mmapv1: - -Change Storage Engine to MMAPv1 -``````````````````````````````` - -You can update members to use the MMAPv1 storage engine in a rolling -manner. - -.. note:: - - When running a replica set with mixed storage engines, performance - can vary according to workload. - -To change the storage engine to MMAPv1 for an existing secondary -replica set member, remove the member's data and perform an -:doc:`initial sync `: - -.. include:: /includes/steps/3.0-change-to-mmapv1-replica-set.rst - -Repeat for the remaining the secondary members. Once all the secondary -members have switched to MMAPv1, step down the primary, and update the -stepped-down member. - -Downgrade Binaries -`````````````````` - -.. include:: /includes/fact-3.0-downgrade-path.rst - -The following steps outline a "rolling" downgrade process for the -replica set. The "rolling" downgrade process minimizes downtime by -downgrading the members individually while the other members are -available: - -.. include:: /includes/steps/3.0-downgrade-replica-set.rst - -Replica set failover is not instant but will render the set unavailable to -writes and interrupt reads until the failover process -completes. Typically this takes 10 seconds or more. You may wish to -plan the downgrade during a predetermined maintenance window. - -.. _3.0-downgrade-cluster: - -Downgrade a 3.0 Sharded Cluster -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Requirements -```````````` - -While the downgrade is in progress, you cannot make changes to the -collection meta-data. For example, during the downgrade, do -**not** do any of the following: - -- :method:`sh.enableSharding()` - -- :method:`sh.shardCollection()` - -- :method:`sh.addShard()` - -- :method:`db.createCollection()` - -- :method:`db.collection.drop()` - -- :method:`db.dropDatabase()` - -- any operation that creates a database - -- any other operation that modifies the cluster meta-data in any - way. See :doc:`/reference/sharding` for a complete list of - sharding commands. Note, however, that not all commands on the - :doc:`/reference/sharding` page modifies the cluster meta-data. - -Change Storage Engine to MMAPv1 -``````````````````````````````` - -.. include:: /includes/fact-change-storage-engine-before-downgrade.rst - -Change Shards to Use MMAPv1 -+++++++++++++++++++++++++++ - -To change the storage engine to MMAPv1, refer to the procedure in -:ref:`Change Storage Engine to MMAPv1 for replica set members -<3.0-downgrade-repl-set-mmapv1>` and :ref:`Change Storage Engine to -MMAPv1 for standalone mongod <3.0-downgrade-mmapv1-standalone>` as -appropriate for your shards. - -Change Config Servers to Use MMAPv1 -+++++++++++++++++++++++++++++++++++ - -.. note:: - - During this process, only two config servers will be running at any - given time to ensure that the sharded cluster's metadata is - *read only*. - -.. include:: /includes/steps/3.0-change-to-mmapv1-config-server.rst - -Downgrade Binaries -`````````````````` - -.. include:: /includes/fact-3.0-downgrade-path.rst - -The downgrade procedure for a sharded cluster reverses the order of the -upgrade procedure. The version ``v6`` config database is backwards -compatible with MongoDB 2.6. - -.. include:: /includes/steps/3.0-downgrade-sharded-cluster.rst - -.. |action| replace:: Downgrade -.. |version-new| replace:: 2.6 -.. |version-stop| replace:: 3.0 - -.. include:: /includes/2.6-3.0-upgrade-downgrade-procedure.rst diff --git a/source/release-notes/3.0-scram.txt b/source/release-notes/3.0-scram.txt deleted file mode 100644 index bbfd930d0b6..00000000000 --- a/source/release-notes/3.0-scram.txt +++ /dev/null @@ -1,146 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -.. _3.0-scram: - -================ -Upgrade to SCRAM -================ - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - - -.. important:: - - Starting in version 4.0, MongoDB removes support for the deprecated - MongoDB Challenge-Response (``MONGODB-CR``) authentication mechanism. - - If you have user credentials stored in ``MONGODB-CR``, you must - upgrade to :ref:`Salted Challenge Response Authentication Mechanism - (SCRAM) ` **before** you upgrade to version - 4.0. - - The command listed in this procedure is only available in MongoDB - 3.0 through MongoDB 3.6. - -.. _3.0-scram-considerations: - -Considerations --------------- - -Backwards Incompatibility -~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/fact-upgrade-scram-irreversible.rst - -.. _considerations-scram-sha-1-drivers: - -Requirements -~~~~~~~~~~~~ - -To upgrade the authentication model, you must have a user in the -``admin`` database with the role :authrole:`userAdminAnyDatabase`. - -Timing -~~~~~~ - -*Applicable only if you are upgrading from 2.6 to 3.0* - -- Once you upgrade the MongoDB binaries to version 3.0, allow your - MongoDB deployment to run for a day or two before following this - procedure. This allows 3.0 some time to "burn in" and decreases the - likelihood of downgrades occurring after the user privilege model - upgrade. The user authentication and access control will continue to - work as it did in 2.6. - -- If you decide to upgrade the user authentication model immediately - instead of waiting the recommended "burn in" period, then for sharded - clusters, you must wait at least 10 seconds after upgrading the - sharded clusters to run the authentication upgrade command. - -Replica Sets -~~~~~~~~~~~~ - -For a replica set, it is only necessary to run the upgrade process on -the :term:`primary` as the changes will automatically replicate to -the secondaries. - -Sharded Clusters -~~~~~~~~~~~~~~~~ - -For a sharded cluster, connect to one :binary:`~bin.mongos` instance and run the -upgrade procedure to upgrade the cluster's authentication data. By -default, the procedure will upgrade the authentication data of the -shards as well. - -To override this behavior, run ``authSchemaUpgrade`` with the -``upgradeShards: false`` option. If you choose to -override, you must run the upgrade procedure on the :binary:`~bin.mongos` -first, and then run the procedure on the :term:`primary` members of -each shard. - -For a sharded cluster, do **not** run the upgrade process directly -against the :ref:``. Instead, perform the upgrade -process using one :binary:`~bin.mongos` instance to interact with the -config database. - -Upgrade Drivers -~~~~~~~~~~~~~~~ - -Once upgraded, you must upgrade all drivers used by applications that -will connect to upgraded database instances to version that support -SCRAM. The minimum driver versions that support SCRAM are: - -.. |driver-compatibility-heading| replace:: Version - -.. include:: /includes/list-table-3.0-driver-compatibility.rst - -See the :driver:`MongoDB Drivers Page ` for links to -download upgraded drivers. - -Prerequisites -------------- - -Before upgrading the authentication model, your binaries must be at -least version 3.0. - -For sharded clusters, ensure that **all** cluster components are at -least 3.0. - -To upgrade, see :doc:`upgrade MongoDB binaries to 3.0 -`. - - -.. _3.0-upgrade-mongodb-cr-to-scram: - -Upgrade 2.6 ``MONGODB-CR`` User Credentials to SCRAM User Credentials ---------------------------------------------------------------------- - -.. warning:: - - .. include:: /includes/fact-upgrade-scram-irreversible.rst - -.. important:: - - To use SCRAM, a driver upgrade is **necessary** if your current - driver version does not support SCRAM. See :ref:`required driver - versions ` for details. - -.. include:: /includes/steps/3.0-upgrade-mongodb-cr-to-scram.rst - -Result ------- - -After this procedure is complete, all users in the database will have -SCRAM credentials, and any subsequently-created users will also have -this type of credentials. diff --git a/source/release-notes/3.0-upgrade.txt b/source/release-notes/3.0-upgrade.txt deleted file mode 100644 index eaed9729efc..00000000000 --- a/source/release-notes/3.0-upgrade.txt +++ /dev/null @@ -1,234 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -====================== -Upgrade MongoDB to 3.0 -====================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -In the general case, the upgrade from MongoDB 2.6 to 3.0 is a -binary-compatible "drop-in" upgrade: shut down the :binary:`~bin.mongod` -instances and replace them with :binary:`~bin.mongod` instances running -3.0. **However**, before you attempt any upgrade please familiarize -yourself with the content of this document, particularly the procedure -for :ref:`upgrading sharded clusters <3.0-upgrade-cluster>`. - -If you need guidance on upgrading to 3.0, `MongoDB offers consulting -`_ -to help ensure a smooth transition without interruption to your -MongoDB application. - -.. _3.0-upgrade-considerations: - -Upgrade Recommendations and Checklists --------------------------------------- - -When upgrading, consider the following: - -Upgrade Requirements -~~~~~~~~~~~~~~~~~~~~ - -To upgrade an existing MongoDB deployment to 3.0, you must be running -2.6. If you're running a version of MongoDB before 2.6, you *must* -upgrade to 2.6 before upgrading to 3.0. -See :v2.6:`Upgrade to 2.6 ` for the procedure to upgrade from 2.4 -to 2.6. Once upgraded to MongoDB 2.6, you **cannot** downgrade to any -version earlier than MongoDB 2.4. - -If your existing MongoDB deployment is already running with -authentication and authorization, your user data model ``authSchema`` -must be at least version 3. To verify the version of your existing -``authSchema``, see :ref:`legacy-auth-model-removed`. - -Preparedness -~~~~~~~~~~~~ - -Before upgrading MongoDB, always test your application in a staging -environment before deploying the upgrade to your production -environment. - -Some changes in MongoDB 3.0 require manual checks and intervention. -Before beginning your upgrade, see the -:v3.0:`Compatibility Changes in MongoDB 3.0 ` document to ensure that your -applications and deployments are compatible with MongoDB 3.0. Resolve -the incompatibilities in your deployment before starting the upgrade. - -Downgrade Limitations -~~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/fact-3.0-downgrade-path.rst - -If you upgrade to 3.0 and have run ``authSchemaUpgrade``, you -**cannot** downgrade to 2.6 without disabling ``--auth`` or -restoring a pre-upgrade backup, as ``authSchemaUpgrade`` -discards the ``MONGODB-CR`` credentials used in 2.6. See -:ref:`3.0-upgrade-auth-schema`. - -Upgrade MongoDB Processes -------------------------- - -.. _3.0-upgrade-standalone: - -Upgrade Standalone ``mongod`` Instance to MongoDB 3.0 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following steps outline the procedure to upgrade a standalone -:binary:`~bin.mongod` from version 2.6 to 3.0. To upgrade from version -2.4 to 3.0, :v2.6:`upgrade to version 2.6 ` -*first*, and then use the following procedure to upgrade from 2.6 to 3.0. - -Upgrade Binaries -```````````````` - -If you installed MongoDB from the MongoDB ``apt``, ``yum``, or ``zypper`` -repositories, you should upgrade to 3.0 using your package manager. Follow the -appropriate :v3.0:`installation instructions ` -for your Linux system. This will involve adding a repository for the new -release, then performing the actual upgrade. - -Otherwise, you can manually upgrade MongoDB: - -.. include:: /includes/steps/3.0-upgrade-mongod.rst - -.. _3.0-upgrade-wiredtiger-standalone: - -Change Storage Engine for Standalone to WiredTiger -`````````````````````````````````````````````````` - -To change the storage engine for a standalone :binary:`~bin.mongod` -instance to WiredTiger, see -:doc:`/tutorial/change-standalone-wiredtiger`. - -.. _3.0-upgrade-replica-set: - -Upgrade a Replica Set to 3.0 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Prerequisites -````````````` - -- If the oplog contains entries generated by versions of MongoDB - that precede version 2.2.1, you must wait for the entries to be - overwritten by later versions *before* you can upgrade to MongoDB - 3.0. For more information, see :ref:`3.0-oplog-format-change` - -- :ref:`Stricter validation in MongoDB 3.0 - <3.0-compatibility-repl-set-config>` of replica set configuration - may invalidate previously-valid replica set configuration, - preventing replica sets from starting in MongoDB 3.0. For more - information, see :ref:`3.0-compatibility-repl-set-config`. - -- All replica set members must be running version 2.6 before you can upgrade - them to version 3.0. To upgrade a replica set from an earlier MongoDB - version, :v2.6:`upgrade all members of the replica set to version 2.6 - ` *first*, and then follow the procedure - to upgrade from MongoDB 2.6 to 3.0. - -Upgrade Binaries -````````````````` - -You can upgrade from MongoDB 2.6 to 3.0 using a "rolling" upgrade to -minimize downtime by upgrading the members individually while the other -members are available: - -.. include:: /includes/steps/3.0-upgrade-replica-set.rst - -Replica set failover is not instant and will render the set -unavailable to accept writes until the failover process -completes. This may take 30 seconds or more: schedule the -upgrade procedure during a scheduled maintenance window. - -.. _3.0-upgrade-repl-set-wiredtiger: - -Change Replica Set Storage Engine to WiredTiger -``````````````````````````````````````````````` - -To change the storage engine for a replica set to WiredTiger, -see :doc:`/tutorial/change-replica-set-wiredtiger`. - -.. _3.0-upgrade-cluster: - -Upgrade a Sharded Cluster to 3.0 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Only upgrade sharded clusters to 3.0 if **all** members of the -cluster are currently running instances of 2.6. The only supported -upgrade path for sharded clusters running 2.4 is via 2.6. The upgrade -process checks all components of the cluster and will produce warnings -if any component is running version 2.4. - -Considerations -`````````````` - -The upgrade process does not require any downtime. However, while you -upgrade the sharded cluster, ensure that clients do not make changes -to the collection meta-data. For example, during the upgrade, do **not** -do any of the following: - -- :method:`sh.enableSharding()` - -- :method:`sh.shardCollection()` - -- :method:`sh.addShard()` - -- :method:`db.createCollection()` - -- :method:`db.collection.drop()` - -- :method:`db.dropDatabase()` - -- any operation that creates a database - -- any other operation that modifies the cluster metadata in any - way. See :doc:`/reference/sharding` for a complete list - of sharding commands. Note, however, that not all commands on - the :doc:`/reference/sharding` page modifies the - cluster meta-data. - -Upgrade Sharded Clusters -```````````````````````` - -*Optional but Recommended.* As a precaution, take a backup of the -``config`` database *before* upgrading the sharded cluster. - -.. include:: /includes/steps/3.0-upgrade-sharded-cluster.rst - -.. _3.0-upgrade-cluster-wiredtiger: - -Change Sharded Cluster Storage Engine to WiredTiger -``````````````````````````````````````````````````` - -For a sharded cluster in MongoDB 3.0, you can choose to update the -shards to use WiredTiger storage engine and have the config servers use -MMAPv1. If you update the config servers to use WiredTiger, you must -update all three config servers to use WiredTiger. - -To change a sharded cluster to use WiredTiger, see -:doc:`/tutorial/change-sharded-cluster-wiredtiger`. - -.. |action| replace:: Upgrade -.. |version-new| replace:: 3.0 -.. |version-stop| replace:: 2.6 - -.. _3.0-upgrade-auth-schema: - -Upgrade Existing ``MONGODB-CR`` Users to Use ``SCRAM-SHA-1`` ------------------------------------------------------------- - -After upgrading the binaries, see :ref:`3.0-scram` for details on -``SCRAM-SHA-1`` upgrade scenarios. - -.. include:: /includes/2.6-3.0-upgrade-downgrade-procedure.rst - -.. _`MongoDB Download Page`: http://www.mongodb.org/downloads?tck=docs_server diff --git a/source/release-notes/3.0.txt b/source/release-notes/3.0.txt deleted file mode 100644 index 4c83228ad16..00000000000 --- a/source/release-notes/3.0.txt +++ /dev/null @@ -1,777 +0,0 @@ -.. This page is hidden from the TOC and search indexing. - -:orphan: - -.. meta:: - :robots: noindex, nosnippet - -.. _release-notes-3.0: - -============================= -Release Notes for MongoDB 3.0 -============================= - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: twocols - -*March 3, 2015* - -MongoDB 3.0 is now available. Key features include support for the -WiredTiger storage engine, pluggable storage engine API, -``SCRAM-SHA-1`` authentication mechanism, and improved ``explain`` -functionality. - -MongoDB Ops Manager, which includes Automation, Backup, and Monitoring, -is now also available. See the `Ops Manager documentation -`_ and the `Ops Manager -release notes -`_ -for more information. - -Patch Releases --------------- - -.. toctree:: - - /release-notes/3.0-changelog - -.. _3.0.15-release-notes: - -3.0.15 -- May 15, 2017 -~~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- :issue:`SERVER-27164`: Deadlock during initial sync or steady state - replication when CRUD operations implicitly create collections on the - same database. - -- :issue:`SERVER-28548`: In MMAPv1, index readers/writers can return - invalid data if record no longer exists. - -- `All issues closed in 3.0.15 - `_ - -.. _3.0.14-release-notes: - -3.0.14 -- Nov 4, 2016 -~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- Incorrect memory access on 3.0.13 triggers segmentation fault: :issue:`SERVER-26889` - -.. _3.0.13-release-notes: - -3.0.13 -- Oct 31, 2016 -~~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- Debian 8(Jessie) packages: :issue:`SERVER-18329` - -- Upgrade to Perl compatible regular expressions (PCRE 8.39): :issue:`SERVER-24662` - -- Limit memory usage during 2dsphere index build: :issue:`SERVER-25075` - -- `All issues closed in 3.0.13 - `_ - -.. _3.0.12-release-notes: - -3.0.12 -- May 9, 2016 -~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- Background index build may result in extra index key entries that do - not correspond to indexed documents: :issue:`SERVER-22970` - -- Documents that contain embedded null characters can be created: - :issue:`SERVER-7005` - -- IX GlobalLock being held while waiting for WiredTiger cache eviction: - :issue:`SERVER-22964` - -- `All issues closed in 3.0.12 - `_ - -.. _3.0.11-release-notes: - -3.0.11 -- Mar 31, 2016 -~~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- For MongoDB 3.0.9 and MongoDB 3.0.10, during chunk migration, insert - and update operations to documents in the migrating chunk are not - reflected in the destination shard: :issue:`SERVER-23425` - -.. _3.0.10-release-notes: - -3.0.10 -- Mar 8, 2016 -~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- Read preference of :readmode:`secondaryPreferred` can end up using - unversioned connections: :issue:`SERVER-18671` - -- For MMAPv1 journaling, the "last sequence number" file (``lsn`` file) - may be ahead of what is synced to the data files: - :issue:`SERVER-22261`. - -- Data size change for oplog deletes can overflow 32-bit int: - :issue:`SERVER-22634` - -- High fragmentation on WiredTiger databases under write workloads: - :issue:`SERVER-22898`. - -- `All issues closed in 3.0.10 - `_ - -.. _3.0.9-release-notes: - -3.0.9 -- Jan 26, 2016 -~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- Queries which specify sort and batch size can return results out of - order if documents are concurrently updated. :issue:`SERVER-19996` - -- Large amounts of create and drop collections can cause - ``listDatabases`` to be slow under WiredTiger. :issue:`SERVER-20961` - -- Authentication failure message includes server IP address instead of - the client IP address. :issue:`SERVER-22054` - -- `All issues closed in 3.0.9 - `_ - -.. _3.0.8-release-notes: - -3.0.8 -- Dec 15, 2015 -~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- :dbcommand:`findAndModify` on :binary:`~bin.mongos` can upsert to the - wrong shard. :issue:`SERVER-20407`. - -- WiredTiger commit visibility caused document not found. - :issue:`SERVER-21275`. - -- The oplog can grow to 3x configured size. :issue:`SERVER-21553` - -- `All issues closed in 3.0.8 - `_ - -.. _3.0.7-release-notes: - -3.0.7 -- Oct 13, 2015 -~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- WiredTiger memory handling and performance issues: :issue:`SERVER-20159`, - :issue:`SERVER-20204`, :issue:`SERVER-20091`, and - :issue:`SERVER-20176`. - -- Reconfig during a pending step down may prevent a primary from - stepping down: :issue:`SERVER-20262`. - -- Built-in roles requires additional privileges: :issue:`SERVER-19131`, - :issue:`SERVER-15893`, and :issue:`SERVER-13647`. - -- `All issues closed in 3.0.7 - `_ - -.. _3.0.6-release-notes: - -3.0.6 -- August 24, 2015 -~~~~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- WiredTiger Stability issues: :issue:`SERVER-19751`, :issue:`SERVER-19673`, - and :issue:`SERVER-19573`. - -- Interaction between SSL and Auditing: :issue:`SERVER-19538`. - -- Aggregation :pipeline:`$sort` on sharded systems - :issue:`SERVER-19464`. - -- `All issues closed in 3.0.6 - `_ - -.. _3.0.5-release-notes: - -3.0.5 -- July 28, 2015 -~~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed and improvements: - -- Improvements to WiredTiger for capped collections and replication - (:issue:`SERVER-19178`, :issue:`SERVER-18875` and - :issue:`SERVER-19513`). - -- Additional WiredTiger improvements for performance - (:issue:`SERVER-19189`) and improvements related to - cache and session use (:issue:`SERVER-18829` - :issue:`SERVER-17836`). - -- Performance improvements for longer running queries, particularly - :query:`$text` and :query:`$near` queries - :issue:`SERVER-18926`. - -- `All issues closed in 3.0.5 - `_ - -.. _3.0.4-release-notes: - -3.0.4 -- June 16, 2015 -~~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- Missed writes with concurrent inserts during chunk migration from - shards with WiredTiger primaries: :issue:`SERVER-18822` - -- Write conflicts with multi-update updates with ``upsert=true`` with - the Wired Tiger Storage engine: :issue:`SERVER-18213` - -- Secondary reads could block replication: :issue:`SERVER-18190` - -- Performance on Windows with WiredTiger and documents larger than - 16kb: :issue:`SERVER-18079` - -- WiredTiger data files are not correctly recovered following - unexpected system restarts: :issue:`SERVER-18316` - -- `All issues closed in 3.0.4 - `_ - -.. _3.0.3-release-notes: - -3.0.3 -- May 12, 2015 -~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- Deprecate ``db.eval()`` and add warnings: - :issue:`SERVER-17453` - -- Potential for abrupt termination with the Windows service stop - operation: :issue:`SERVER-17802` - -- Crash caused by update with a *key too large to index* on WiredTiger - and RocksDB storage engines: :issue:`SERVER-17882` - -- Inconsistent support for :dbcommand:`mapReduce` in ``eval`` - environment: :issue:`SERVER-17889` - -- `All issues closed in 3.0.3 - `_ - -.. _3.0.2-release-notes: - -3.0.2 -- April 9, 2015 -~~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- Inefficient query plans for ``2d`` \ :query:`$nearSphere`: - :issue:`SERVER-17469` - -- Starting :binary:`~bin.mongod` during repair operations with WiredTiger: - :issue:`SERVER-17652` and :issue:`SERVER-17729` - -- Invalid compression stream error with WiredTiger and ``zlib`` block - compression: :issue:`SERVER-17713` - -- Memory use issue for inserts into large indexed arrays: - :issue:`SERVER-17616` - -- `All issues closed in 3.0.2 - `_ - -.. _3.0.1-release-notes: - -3.0.1 -- March 17, 2015 -~~~~~~~~~~~~~~~~~~~~~~~ - -Issues fixed: - -- Race condition in WiredTiger between inserts and checkpoints that - could result in lost records: :issue:`SERVER-17506`. - -- WiredTiger's capped collections implementation causes a server crash: - :issue:`SERVER-17345`. - -- Initial sync with duplicate ``_id`` entries: :issue:`SERVER-17487`. - -- Deadlock condition in MMAPv1 between the journal lock and the oplog - collection lock: :issue:`SERVER-17416`. - -- `All issues closed in 3.0.1 - `_ - -Major Changes -------------- - -Pluggable Storage Engine API -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 introduces a pluggable storage engine API that allows third -parties to develop storage engines for MongoDB. - -WiredTiger -~~~~~~~~~~ - -MongoDB 3.0 introduces support for the `WiredTiger -`_ storage engine. With the support for -WiredTiger, MongoDB now supports two storage engines: - -- MMAPv1, the storage engine available in previous versions of MongoDB - and the default storage engine for MongoDB 3.0, and - -- `WiredTiger `_, available only in the 64-bit - versions of MongoDB 3.0. - -WiredTiger Usage -```````````````` - -WiredTiger is an alternate to the default MMAPv1 storage engine. -WiredTiger supports all MongoDB features, including operations that -report on server, database, and collection statistics. Switching to -WiredTiger, however, requires a change to the :ref:`on-disk storage -format <3.0-compatibility-data-file>`. For instructions on changing the -storage engine to WiredTiger, see the appropriate sections in the -:doc:`/release-notes/3.0-upgrade` documentation. - -MongoDB 3.0 replica sets and sharded clusters can have members with -different storage engines; however, performance can vary according to -workload. For details, see the appropriate sections in the -:doc:`/release-notes/3.0-upgrade` documentation. - -The WiredTiger storage engine requires the latest official MongoDB -drivers. For more information, see -:ref:`3.0-compatibility-drivers-wired-tiger`. - -.. seealso:: - - - :ref:`3.0-compatibility-touch` - - :doc:`/core/wiredtiger` documentation - -WiredTiger Configuration -```````````````````````` - -To configure the behavior and properties of the WiredTiger storage -engine, see ``storage.wiredTiger`` configuration options. You -can set :ref:`WiredTiger options on the command line -`. - -.. seealso:: - - :doc:`/core/wiredtiger` - -WiredTiger Concurrency and Compression -`````````````````````````````````````` - -The 3.0 WiredTiger storage engine provides document-level locking and -compression. - -By default, WiredTiger compresses collection data using the -:term:`snappy` compression library. WiredTiger uses :term:`prefix -compression` on all indexes by default. - -.. seealso:: - - :ref:`prod-notes-wired-tiger-concurrency` section in the - :doc:`/administration/production-notes`, the blog post - `New Compression Options in MongoDB 3.0`_ - -.. _`New Compression Options in MongoDB 3.0`: https://www.mongodb.com/blog/post/new-compression-options-mongodb-30?tck=docs_server - -MMAPv1 Improvements -~~~~~~~~~~~~~~~~~~~ - -MMAPv1 Concurrency Improvement -`````````````````````````````` - -In version 3.0, the MMAPv1 storage engine adds support for -collection-level locking. - -MMAPv1 Configuration Changes -```````````````````````````` - -To support multiple storage engines, some configuration settings for -MMAPv1 have changed. See :ref:`3.0-compatibility-configuration-file`. - -.. _3.0-mmapv1-padding: - -MMAPv1 Record Allocation Behavior Changes -````````````````````````````````````````` - -MongoDB 3.0 no longer implements dynamic record allocation and -deprecates :v3.0:`paddingFactor -`. The default allocation -strategy for collections in instances that use MMAPv1 is :v3.0:`power -of 2 allocation -`, which has been -improved to better handle large document sizes. In 3.0, the -``usePowerOf2Sizes`` flag is ignored, so the power of 2 strategy is -used for all collections that do not have ``noPadding`` flag set. - -For collections with workloads that consist only of inserts or in-place -updates (such as incrementing counters), you can disable the power of 2 -strategy. To disable the power of 2 strategy for a collection, use the -:v3.0:`collMod ` command with the -``noPadding`` flag or the :v3.0:`db.createCollection() -` method with the ``noPadding`` -option. - -.. warning:: - - Do not set ``noPadding`` if the workload includes removes or any - updates that may cause documents to grow. For more information, see - :v3.0:`No Padding Allocation Strategy `. - -When low on disk space, MongoDB 3.0 no longer errors on all writes but -only when the required disk allocation fails. As such, MongoDB now -allows in-place updates and removes when low on disk space. - -.. seealso:: - - :ref:`3.0-compatiblity-record-alloc` - -.. _3.0-replica-sets: - -Replica Sets ------------- - -.. _3.0-replica-sets-max-members: - -Increased Number of Replica Set Members -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -In MongoDB 3.0, replica sets can have up to 50 -members. [#voting-members]_ The following drivers support the larger -replica sets: - -- C# (.NET) Driver 1.10 -- Java Driver 2.13 -- Python Driver (PyMongo) 3.0 -- Ruby Driver 2.0 -- Node.JS Driver 2.0 - -The C, C++, Perl, and legacy PHP drivers, as well as the earlier versions of -the Ruby, Python, and Node.JS drivers, discover and monitor replica set -members serially, and thus are not suitable for use with large replica -sets. - -.. [#voting-members] The maximum number of *voting* members remains at 7. - -.. _3.0-replica-sets-step-down: - -Replica Set Step Down Behavior Changes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The process that a :term:`primary` member of a :term:`replica set` -uses to step down has the following changes: - -- Before stepping down, :dbcommand:`replSetStepDown` will attempt to - terminate long running user operations that would block the primary - from stepping down, such as an index build, a write operation or a - map-reduce job. - -- To help prevent rollbacks, the :dbcommand:`replSetStepDown` will wait - for an electable secondary to catch up to the state of the primary - before stepping down. Previously, a primary would wait for a - secondary to catch up to within 10 seconds of the primary (i.e. a - secondary with a replication lag of 10 seconds or less) before - stepping down. - -- :dbcommand:`replSetStepDown` now allows users to specify a - ``secondaryCatchUpPeriodSecs`` parameter to specify how long the - primary should wait for a secondary to catch up before stepping - down. - -.. _3.0-replica-sets-operational-changes: - -Other Replica Set Operational Changes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Initial sync builds indexes more efficiently for each collection and - applies oplog entries in batches using threads. - -- Definition of :ref:`w: "majority" ` write concern changed to - mean majority of *voting* nodes. - -- Stronger restrictions on - :doc:`/reference/replica-configuration`. For details, see - :ref:`3.0-compatibility-repl-set-config`. - -- For pre-existing collections on secondary members, MongoDB 3.0 no - longer automatically builds missing ``_id`` indexes. - -.. seealso:: - - :ref:`3.0-compatibility-rs` in - :doc:`/release-notes/3.0-compatibility` - -.. _3.0-sharded-clusters: - -Sharded Clusters ----------------- - -MongoDB 3.0 provides the following enhancements to sharded clusters: - -- Adds a new :method:`sh.removeTagRange()` helper to improve management - of sharded collections with tags. The new - :method:`sh.removeTagRange()` method acts as a complement to - :method:`sh.addTagRange()`. - -- Provides a more predictable read preference behavior. - :binary:`~bin.mongos` instances no longer pin connections to members of - replica sets when performing read operations. Instead, - :binary:`~bin.mongos` reevaluates :doc:`read preferences - ` for every operation to provide a more - predictable read preference behavior when read preferences change. - -- Provides a new ``writeConcern`` setting to configure the :doc:`write - concern ` of chunk migration operations. You can - configure the ``writeConcern`` setting for the :ref:`balancer - ` as well as for - :dbcommand:`moveChunk` and :dbcommand:`cleanupOrphaned` commands. - -- Improves visibility of balancer operations. :method:`sh.status()` - includes information about the state of the balancer. See - :method:`sh.status()` for details. - -.. seealso:: - - :ref:`3.0-compatibility-sharded-cluster` in - :doc:`/release-notes/3.0-compatibility` - -Security Improvements ---------------------- - -MongoDB 3.0 includes the following security enhancements: - -- MongoDB 3.0 adds a new :ref:`SCRAM-SHA-1 - ` challenge-response user authentication - mechanism. ``SCRAM-SHA-1`` requires a driver upgrade if your current - driver version does not support ``SCRAM-SHA-1``. For the driver - versions that support ``SCRAM-SHA-1``, see - :ref:`considerations-scram-sha-1-drivers`. - -- Increases restrictions when using the :ref:`localhost-exception` to - access MongoDB. For details, see :ref:`3.0-compatibility-localhost`. - -.. seealso:: - - :ref:`3.0-compatibility-security-changes` - -Improvements ------------- - -New Query Introspection System -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 includes a new query introspection system that provides an -improved output format and a finer-grained introspection into both -query plan and query execution. - -For details, see the new :method:`db.collection.explain()` method and -the new :dbcommand:`explain` command as well as the updated -:method:`cursor.explain()` method. - -For information on the format of the new output, see -:doc:`/reference/explain-results`. - -.. _3.0-logging-improvements: - -Enhanced Logging -~~~~~~~~~~~~~~~~ - -To improve usability of the log messages for diagnosis, MongoDB -categorizes some log messages under specific components, or operations, -and provides the ability to set the verbosity level for these -components. For information, see :doc:`/reference/log-messages`. - -.. _3.0-tools-enhancements: - -MongoDB Tools Enhancements -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -All MongoDB tools except for ``mongosniff`` and -``mongoperf`` are now written in Go and maintained as a separate -project. - -- New options for parallelized :binary:`~bin.mongodump` and - :binary:`~bin.mongorestore`. You can control the number of collections - that :binary:`~bin.mongorestore` will restore at a time with the - ``--numParallelCollections`` option. - -- New options ``-excludeCollection`` and - ``--excludeCollectionsWithPrefix`` for :binary:`~bin.mongodump` to - exclude collections. - -- :binary:`~bin.mongorestore` can now accept BSON data input from standard - input in addition to reading BSON data from file. - -- :binary:`~bin.mongostat` and :binary:`~bin.mongotop` can now return output - in JSON format with the ``--json`` option. - -- Added configurable :term:`write concern` to :binary:`~bin.mongoimport`, - :binary:`~bin.mongorestore`, and :binary:`~bin.mongofiles`. Use the - ``--writeConcern`` option. The default writeConcern has been - changed to 'w:majority'. - -- :binary:`~bin.mongofiles` now allows you to configure the GridFS prefix - with the ``--prefix`` option so that you can use custom namespaces - and store multiple GridFS namespaces in a single database. - -.. seealso:: - - :ref:`3.0-compatibility-tools` - - -Indexes -~~~~~~~ - -- Background index builds will no longer automatically interrupt if - :dbcommand:`dropDatabase`, :dbcommand:`drop`, - :dbcommand:`dropIndexes` operations occur for the database or - collection affected by the index builds. The - :dbcommand:`dropDatabase`, :dbcommand:`drop`, and - :dbcommand:`dropIndexes` commands will still fail with the error - message ``a background operation is currently running``, as in 2.6. - -- If you specify multiple indexes to the :dbcommand:`createIndexes` - command, - - - the command only scans the collection once, and - - - if at least one index is to be built in the foreground, the - operation will build all the specified indexes in the foreground. - -- For sharded collections, indexes can now :ref:`cover queries - ` that execute against the - :binary:`~bin.mongos` if the index includes the shard key. - -.. seealso:: - - :ref:`3.0-compatibility-indexes` in - :doc:`/release-notes/3.0-compatibility` - -Query Enhancements -~~~~~~~~~~~~~~~~~~ - -MongoDB 3.0 includes the following query enhancements: - -- For geospatial queries, adds support for "big" polygons for - :query:`$geoIntersects` and :query:`$geoWithin` queries. "Big" - polygons are single-ringed GeoJSON polygons with areas greater than - that of a single hemisphere. See :query:`$geometry`, - :query:`$geoIntersects`, and :query:`$geoWithin` for details. - -- For :method:`~db.collection.aggregate()`, adds a new - :expression:`$dateToString` operator to facilitate converting a date - to a formatted string. - -- Adds the :query:`$eq` query operator to query for equality conditions. - -.. seealso:: - - :ref:`3.0-geo-near-compatibility` - - -Distributions and Supported Versions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Most non-Enterprise MongoDB distributions now include support for TLS/SSL. -Previously, only MongoDB Enterprise distributions came with TLS/SSL support -included; for non-Enterprise distributions, you had to build MongoDB -locally with the ``--ssl`` flag (i.e. ``scons --ssl``). - -32-bit MongoDB builds are available for testing, but are not for -production use. 32-bit MongoDB builds do not include the WiredTiger -storage engine. - -MongoDB builds for Solaris do not support the WiredTiger storage -engine. - -MongoDB builds are available for Windows Server 2003 and Windows Vista -(as "64-bit Legacy"), but the minimum officially supported Windows -version is Windows Server 2008. - -.. seealso:: - - :ref:`3.0-compatibility-platform-support` - -Package Repositories -~~~~~~~~~~~~~~~~~~~~ - -.. include:: /includes/extracts/fact-3.0-linux-package-repo-relnotes.rst - -MongoDB Enterprise Features ---------------------------- - -Auditing -~~~~~~~~ - -:doc:`/core/auditing` in MongoDB Enterprise can filter on :doc:`any -field in the audit message `, including the -fields returned in the :ref:`param ` -document. This enhancement, along with the -:parameter:`auditAuthorizationSuccess` parameter, enables auditing to -filter on CRUD operations. However, enabling -:parameter:`auditAuthorizationSuccess` to audit of all authorization -successes degrades performance more than auditing only the -authorization failures. - -Additional Information ----------------------- - -Changes Affecting Compatibility -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. toctree:: - - /release-notes/3.0-compatibility - -Some changes in 3.0 can affect :doc:`compatibility -` and may require user actions. For a -detailed list of compatibility changes, see -:doc:`/release-notes/3.0-compatibility`. - -Upgrade Process -~~~~~~~~~~~~~~~ - -.. toctree:: - - /release-notes/3.0-upgrade - /release-notes/3.0-scram - /release-notes/3.0-downgrade - -See :doc:`/release-notes/3.0-upgrade` for full upgrade instructions. - -Download -~~~~~~~~ - -To download MongoDB 3.0, go to the `downloads page`_. - -.. _`downloads page`: http://www.mongodb.org/downloads - -.. seealso:: - - - `All Third Party License Notices `_ - - `All JIRA issues resolved in 3.0 `_ diff --git a/source/release-notes/4.0-compatibility.txt b/source/release-notes/4.0-compatibility.txt index 0b551e1c7be..5ebaf2ee89e 100644 --- a/source/release-notes/4.0-compatibility.txt +++ b/source/release-notes/4.0-compatibility.txt @@ -47,8 +47,7 @@ process for systems with ``MONGODB-CR`` users to ``SCRAM`` users. If your deployment has user credentials stored in ``MONGODB-CR`` schema, you must upgrade to :ref:`Salted Challenge Response Authentication Mechanism (SCRAM) ` **before** you -upgrade to version 4.0. For information on upgrading to ``SCRAM``, see -:doc:`/release-notes/3.0-scram`. +upgrade to version 4.0. .. _4.0-remove-mongodb-cr-copydb: diff --git a/source/release-notes/4.0.txt b/source/release-notes/4.0.txt index c7b89687d98..208c614f6a6 100644 --- a/source/release-notes/4.0.txt +++ b/source/release-notes/4.0.txt @@ -970,8 +970,7 @@ upgraded the authentication schema. If your deployment has user credentials stored in ``MONGODB-CR`` schema, you must upgrade to :ref:`Salted Challenge Response Authentication Mechanism (SCRAM) ` **before** you -upgrade to version 4.0. For information on upgrading to ``SCRAM``, see -:doc:`/release-notes/3.0-scram`. +upgrade to version 4.0. ``usersInfo`` Enhancement ~~~~~~~~~~~~~~~~~~~~~~~~~ From 1fd86b971245644d0fdc1188a7f8afb96c81c301 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Fri, 16 Feb 2024 10:56:43 -0800 Subject: [PATCH 140/308] DOCSP-14437 doc option for bypassing automatic encryption and decryption (#6415) * DOCSP-14437 doc option for bypassing automatic encryption and decryption * Update source/reference/method/Mongo.txt Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> --------- Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> --- source/reference/method/Mongo.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/reference/method/Mongo.txt b/source/reference/method/Mongo.txt index 9f44d9529f4..4ecb6253061 100644 --- a/source/reference/method/Mongo.txt +++ b/source/reference/method/Mongo.txt @@ -247,7 +247,8 @@ following parameters: - *(Optional)* The automatic client-side field level encryption rules specified using the JSON schema Draft 4 standard syntax and - encryption-specific keywords. + encryption-specific keywords. This option is mutually exclusive + with ``explicitEncryptionOnly``. For complete documentation, see :ref:`csfle-fundamentals-create-schema`. @@ -268,6 +269,14 @@ following parameters: indexed fields without the ``crypt_shared`` library. For details, see :ref:`qe-reference-mongo-client`. + * - ``explicitEncryptionOnly`` + - boolean + - *(Optional)* Specify ``true`` to use neither automatic encryption + nor automatic decryption. You can use :method:`getKeyVault()` and + :method:`getClientEncryption()` to perform explicit + encryption. This option is mutually exclusive with ``schemaMap``. + If omitted, defaults to ``false``. + .. _mongo-api-options: From a1eae629a9ff8f9821d0076a18c445e990b9c3a6 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Tue, 20 Feb 2024 09:22:32 -0800 Subject: [PATCH 141/308] DOCSP-30948 discourage use of duplicate fields in documents (#6355) * DOCSP-30948 discourage use of duplicate fields in documents * DOCSP-30948 updates for CR feedback * DOCSP-30948 updates for CR feedback --- source/includes/fact-document-field-name-restrictions.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/includes/fact-document-field-name-restrictions.rst b/source/includes/fact-document-field-name-restrictions.rst index 59e0467255f..9a37a81e302 100644 --- a/source/includes/fact-document-field-name-restrictions.rst +++ b/source/includes/fact-document-field-name-restrictions.rst @@ -7,3 +7,7 @@ in field names. There are some restrictions. See :ref:`Field Name Considerations ` for more details. +- Each field name must be unique within the document. You must not store + documents with duplicate fields because MongoDB :ref:`CRUD ` + operations might behave unexpectedly if a document has duplicate + fields. From b44efe26bd8719f0375a03b55ad3a32029d23a70 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Tue, 20 Feb 2024 12:25:02 -0500 Subject: [PATCH 142/308] DOCSP-36934 clarifying ne null filter (#6422) * DOCSP-36934 clarifying ne null filter * DOCSP-36934 tech edits * DOCSP-36934 tech edits * DOCSP-36934 tech edits * DOCSP-36934 tech edits --- source/reference/operator/query/ne.txt | 5 +++++ source/tutorial/query-for-null-fields.txt | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/source/reference/operator/query/ne.txt b/source/reference/operator/query/ne.txt index 63e86c333b1..14e6802ea13 100644 --- a/source/reference/operator/query/ne.txt +++ b/source/reference/operator/query/ne.txt @@ -41,6 +41,11 @@ The ``$ne`` operator has the following form: { field: { $ne: value } } +.. note:: + + If the value of the ``$ne`` operator is null, see + :ref:`non-equality-filter` for more information. + Examples -------- diff --git a/source/tutorial/query-for-null-fields.txt b/source/tutorial/query-for-null-fields.txt index 9e3f6297dc1..789c844709d 100644 --- a/source/tutorial/query-for-null-fields.txt +++ b/source/tutorial/query-for-null-fields.txt @@ -166,12 +166,14 @@ Equality Filter The query returns both documents in the collection. +.. _non-equality-filter: + Non-Equality Filter ------------------- -To query for fields that **exist** and are **not null**, use the :query:`$ne` -operator. The ``{ item : { $ne : null } }`` query matches documents where the -``item`` field exists *and* has a non-null value. +To query for fields that **exist** and are **not null**, use the ``{ $ne +: null }`` filter. The ``{ item : { $ne : null } }`` query matches +documents where the ``item`` field exists *and* has a non-null value. .. tabs-drivers:: From 94f9e5004989729093d05deac4d0eb45d6284b25 Mon Sep 17 00:00:00 2001 From: jocelyn-mendez1 <91144778+jocelyn-mendez1@users.noreply.github.com> Date: Tue, 20 Feb 2024 12:41:16 -0500 Subject: [PATCH 143/308] DOCSP-30393 Add indexStats serverStatus metric (#6388) * DOCSP-30393 add indexStats * DOCSP-30393 versionadded * DOCSP-30393 fix build error * DOCSP-30393 LT feedback * DOCSP-30393 fix field name * DOCSP-30393 add sentence explaining counter --- source/reference/command/serverStatus.txt | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index 7679b61f384..c1ea59507e0 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -1236,6 +1236,56 @@ indexBulkBuilder The current bytes of memory allocated for building indexes. +.. _server-status-indexStats: + +indexStats +~~~~~~~~~~ + +.. code-block:: json + + indexStats: { + count: Long(""), + features: { + '2d': { count: Long(""), accesses: Long("") }, + '2dsphere': { count: Long(""), accesses: Long("") }, + '2dsphere_bucket': { count: Long(""), accesses: Long("") }, + collation: { count: Long(""), accesses: Long("") }, + compound: { count: Long(""), accesses: Long("") }, + hashed: { count: Long(""), accesses: Long("") }, + id: { count: Long(""), accesses: Long("") }, + normal: { count: Long(""), accesses: Long("") }, + partial: { count: Long(""), accesses: Long("") }, + single: { count: Long(""), accesses: Long("") }, + sparse: { count: Long(""), accesses: Long("") }, + text: { count: Long(""), accesses: Long("") }, + ttl: { count: Long(""), accesses: Long("") }, + unique: { count: Long(""), accesses: Long("") }, + wildcard: { count: Long(""), accesses: Long("") } + } + } + +.. serverstatus:: indexStats + + A document that reports statistics on all indexes on databases and collections. + + .. versionadded:: 6.0 + +.. serverstatus:: indexStats.count + + The total number of indexes. + + .. versionadded:: 6.0 + +.. serverstatus:: indexStats.features + + A document that provides counters for each index type and the number of + accesses on each index. Each index type under ``indexStats.features`` + has a ``count`` field that counts the total number of indexes for that + type, and an ``accesses`` field that counts the number of accesses on that + index. + + .. versionadded:: 6.0 + .. _server-status-instance-information: Instance Information From 17b50b72a05b92af4d6599b923d34d80dd5efcaa Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Tue, 20 Feb 2024 13:29:01 -0500 Subject: [PATCH 144/308] DOCSP 36794 Drive awareness of Atlas/Vector Search in Manual TOC (#6400) * DOCSP-36794 initial build * DOCSP-36794 shuffling toc * DOCSP-36794 editing contents.txt * DOCSP-36794 editing snooty.toml * DOCSP-36794 editing snooty.toml * DOCSP-36794 changing content.txt and index.txt * DOCSP-36794 adding duplicate of data-modeling to test * DOCSP-36794 adding atlas tabs * DOCSP-36794 adding atlas tabs * DOCSP-36794 adding atlas landing pages to snooty.toml * DOCSP-36794 removing snooty and adding ref * DOCSP-36794 removing snooty and adding ref * DOCSP-36794 harding coding links * DOCSP-36794 undoing snooty edits * DOCSP-36794 undoing snooty edits --- source/contents.txt | 23 +++++++++++++---------- source/index.txt | 11 +++++++---- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/source/contents.txt b/source/contents.txt index a6fa891bb9e..efc82a35d65 100644 --- a/source/contents.txt +++ b/source/contents.txt @@ -12,15 +12,16 @@ project, this Manual and additional editions of this text. - :doc:`/introduction` - :doc:`/crud` - :doc:`/aggregation` -- :doc:`/data-modeling` -- :doc:`/core/transactions` - :doc:`/indexes` -- :doc:`/security` +- :doc:`/core/timeseries-collections` - :doc:`/changeStreams` +- :doc:`/core/transactions` +- :doc:`/data-modeling` - :doc:`/replication` - :doc:`/sharding` -- :doc:`/administration` - :doc:`/storage` +- :doc:`/administration` +- :doc:`/security` - :doc:`/faq` - :doc:`/reference` - :doc:`/release-notes` @@ -35,16 +36,18 @@ project, this Manual and additional editions of this text. MongoDB Shell (mongosh) /crud /aggregation - /data-modeling /indexes - /security - /replication - /sharding - /changeStreams + Atlas Search + Atlas Vector Search /core/timeseries-collections + /changeStreams /core/transactions - /administration + /data-modeling + /replication + /sharding /storage + /administration + /security /faq /reference /release-notes diff --git a/source/index.txt b/source/index.txt index 8b96ae8d400..65830f88b69 100644 --- a/source/index.txt +++ b/source/index.txt @@ -251,15 +251,18 @@ Explore libraries and tools for MongoDB. MongoDB Shell (mongosh) /crud /aggregation - /data-modeling - /core/transactions /indexes - /security + Atlas Search + Atlas Vector Search + /core/timeseries-collections /changeStreams + /core/transactions + /data-modeling /replication /sharding - /administration /storage + /administration + /security /faq /reference /release-notes From fcbe8d9c4508ab7b41543794c82d8d80875f2b00 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:08:21 -0500 Subject: [PATCH 145/308] DOCSP-36935 4.4.29 Release Notes (#6438) --- config/changelog_conf.yaml | 2 + .../includes/changelogs/releases/4.4.29.rst | 77 +++++++++++++++++++ source/release-notes/4.4-changelog.txt | 2 + source/release-notes/4.4.txt | 19 +++++ 4 files changed, 100 insertions(+) create mode 100644 source/includes/changelogs/releases/4.4.29.rst diff --git a/config/changelog_conf.yaml b/config/changelog_conf.yaml index 9d327c7cd9f..9484b3512fe 100644 --- a/config/changelog_conf.yaml +++ b/config/changelog_conf.yaml @@ -20,6 +20,7 @@ groups: - Index Maintenance - Geo - Text Search + - prepared-txns "Write Operations": - Write Ops "Aggregation": @@ -33,6 +34,7 @@ groups: - APIs - Test Format - WiredTiger + - dhandles "MMAP": - MMAPv1 "Storage": diff --git a/source/includes/changelogs/releases/4.4.29.rst b/source/includes/changelogs/releases/4.4.29.rst new file mode 100644 index 00000000000..11243ce8624 --- /dev/null +++ b/source/includes/changelogs/releases/4.4.29.rst @@ -0,0 +1,77 @@ +.. _4.4.29-changelog: + +4.4.29 Changelog +---------------- + +Replication +~~~~~~~~~~~ + +:issue:`SERVER-70155` Add duration of how long an oplog slot is kept +open to mongod "Slow query" log lines + +Query +~~~~~ + +:issue:`WT-11064` Skip globally visible tombstones as part of update +obsolete check + +Storage +~~~~~~~ + + +WiredTiger +`````````` + +- :issue:`WT-12036` Workaround for lock contention on Windows + +Build and Packaging +~~~~~~~~~~~~~~~~~~~ + +:issue:`SERVER-85156` dbCheck throws unexpected "invalidate" change +stream event [5.0] + +Internals +~~~~~~~~~ + +- :issue:`SERVER-72839` Server skips peer certificate validation if + neither CAFile nor clusterCAFile is provided +- :issue:`SERVER-74344` Ban use of sparse indexes on internal comparison + expression unless explicitly hinted +- :issue:`SERVER-80279` Commit on non-existing transaction then proceed + to continue can trigger an invariant +- :issue:`SERVER-80310` Update sysperf to allow running individual genny + tasks on waterfall +- :issue:`SERVER-82353` Multi-document transactions can miss documents + when movePrimary runs concurrently +- :issue:`SERVER-82815` Expose server’s index key creation via + aggregation +- :issue:`SERVER-83564` Make sure the process field is indexed in + config.locks +- :issue:`SERVER-84722` Create undocumented server parameter to skip + document validation on insert code path for internal usage +- :issue:`SERVER-84732` Fix typo in mongo-perf standalone inMemory ARM + AWS test +- :issue:`SERVER-85305` Fix sys-perf-4.4 clone issue +- :issue:`SERVER-85306` Update sys-perf config to use HTTPs github links + rather than SSH +- :issue:`SERVER-85419` Balancer pollutes logs in case no suitable + recipient is found during draining +- :issue:`SERVER-85530` Refresh Test Certificates +- :issue:`SERVER-85536` [4.4] removing unindexed unique partial index + entries generates write conflicts +- :issue:`SERVER-85652` Update DSI atlas azure tasks to use an AL2 + compile artifact. +- :issue:`SERVER-85771` Make $bucketAuto more robust in the case of an + empty string for the groupBy field +- :issue:`SERVER-86027` Tag + insert_docs_larger_than_max_user_size_standalone.js with + requires_persistence and requires_replication +- :issue:`SERVER-86081` Sys-perf missing required parameters due to + Evergreen Redaction +- :issue:`SERVER-86322` [v4.4] Add high value workloads to the 4.4 + branch +- :issue:`SERVER-86351` Investigate failed copybara sync operation +- :issue:`WT-11280` Generation tracking might not be properly + synchronized +- :issue:`WT-12272` Remove unnecessary module in evergreen.yml + diff --git a/source/release-notes/4.4-changelog.txt b/source/release-notes/4.4-changelog.txt index e7ca5754f24..7ed28d2f1ab 100644 --- a/source/release-notes/4.4-changelog.txt +++ b/source/release-notes/4.4-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/4.4.29.rst + .. include:: /includes/changelogs/releases/4.4.28.rst .. include:: /includes/changelogs/releases/4.4.27.rst diff --git a/source/release-notes/4.4.txt b/source/release-notes/4.4.txt index 20687ca5065..80644980768 100644 --- a/source/release-notes/4.4.txt +++ b/source/release-notes/4.4.txt @@ -44,6 +44,25 @@ Release Notes for MongoDB 4.4 Patch Releases -------------- + +.. _4.4.29-release-notes: + +4.4.29 - Upcoming +~~~~~~~~~~~~~~~~~ + +- :issue:`SERVER-70155` Add duration of how long an oplog slot is kept + open to mongod "Slow query" log lines +- :issue:`SERVER-82353` Multi-document transactions can miss documents + when movePrimary runs concurrently +- :issue:`SERVER-83564` Make sure the process field is indexed in + config.locks +- :issue:`SERVER-85536` [4.4] removing unindexed unique partial index + entries generates write conflicts + +- `All JIRA issues closed in 4.4.29 + `_ +- :ref:`4.4.29-changelog` + .. _4.4.28-release-notes: 4.4.28 - Jan 18, 2024 From cf179a69405f9c361208b1577f645aad35a78d29 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:11:58 -0800 Subject: [PATCH 146/308] DOCSP-36214 Additional information for a scheduled balancing window (#6360) * DOCSP-36214 Additional information for a scheduled balancing window * Apply suggestions from code review Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> * Update source/tutorial/manage-sharded-cluster-balancer.txt Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> --------- Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> --- .../manage-sharded-cluster-balancer.txt | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/source/tutorial/manage-sharded-cluster-balancer.txt b/source/tutorial/manage-sharded-cluster-balancer.txt index d162ae34bb5..8ed9cc875e8 100644 --- a/source/tutorial/manage-sharded-cluster-balancer.txt +++ b/source/tutorial/manage-sharded-cluster-balancer.txt @@ -88,13 +88,27 @@ Schedule the Balancing Window In some situations, particularly when your data set grows slowly and a migration can impact performance, it is useful to ensure -that the balancer is active only at certain times. The following -procedure specifies the ``activeWindow``, -which is the timeframe during which the :term:`balancer` will -be able to migrate chunks: +that the balancer is active only at certain times. By default, the +balancer process is always enabled and migrating chunks. The following +procedure specifies the ``activeWindow``, which is the timeframe during +which the :term:`balancer` is able to migrate chunks: .. include:: /includes/steps/schedule-balancer-window.rst +.. _sharding-check-balancing-window: + +Check Balancing Window +---------------------- + +To see the current balancing window, run the following +command: + +.. code-block:: javascript + :copyable: true + + use config + db.settings.find( { _id: "balancer" } ) + .. _sharding-balancing-remove-window: Remove a Balancing Window Schedule From cf2373a742346cede6d8f1c2180d05a12f6077d0 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:14:27 -0800 Subject: [PATCH 147/308] DOCSP-36209 Audit Event Messages missing AuthenticationAbandoned (#6320) --- source/reference/audit-message.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/source/reference/audit-message.txt b/source/reference/audit-message.txt index ca90bf044a2..9a8a46d928d 100644 --- a/source/reference/audit-message.txt +++ b/source/reference/audit-message.txt @@ -211,6 +211,7 @@ associated ``param`` details and the ``result`` values, if any. - | ``0`` - Success | ``18`` - Authentication Failed | ``334`` - Mechanism Unavailable + | ``337`` - Authentication Abandoned * - .. _audit-message-authCheck: From 7d258408270a874c9cf599d0c5accf7755dc03ee Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:17:35 -0800 Subject: [PATCH 148/308] DOCSP-36270 additional information on rs.status and replSetGetStatus (#6314) * DOCSP-36270 additional information on rs.status and replSetGetStatus * DOCSP-36270 updates for AH's review feedack --- source/reference/command/replSetGetStatus.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/reference/command/replSetGetStatus.txt b/source/reference/command/replSetGetStatus.txt index 16ebdee79bb..4f139716418 100644 --- a/source/reference/command/replSetGetStatus.txt +++ b/source/reference/command/replSetGetStatus.txt @@ -87,6 +87,18 @@ The command has the following syntax: You cannot specify ``initialSync: 1`` in the :binary:`~bin.mongosh` helper :method:`rs.status()`. +.. note:: + + If you haven't yet :method:`initialized ` your replica + set, the ``replSetGetStatus`` command returns the following error: + + .. code-block:: shell + :copyable: false + + MongoServerError: no replset config has been received + + Run the :dbcommand:`replSetInitiate` command and try again. + .. _rs-status-output: Example From bcc0c45df31310e18f33f91c42f0c65595ca8dd2 Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Tue, 20 Feb 2024 17:18:20 -0500 Subject: [PATCH 149/308] DOCSP-36940 redirect 404s (#6439) --- config/redirects | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/redirects b/config/redirects index 23c462f3013..bd22cc9c6fb 100644 --- a/config/redirects +++ b/config/redirects @@ -2566,7 +2566,10 @@ raw: https://mongodb.github.io/mongo-java-driver/ -> ${base}/drivers/java/sync/c [*-v6.3]: ${prefix}/${version}/data-modeling/schema-design-process/identify-workload -> ${base}/${version}/core/data-modeling-introduction [*-v6.3]: ${prefix}/${version}/data-modeling/schema-design-process/map-relationships -> ${base}/${version}/core/data-modeling-introduction [v7.0-*]: ${prefix}/${version}/core/data-modeling-introduction -> ${base}/${version}/data-modeling -[v7.0-*]: ${prefix}/${version}/core/data-model-design -> ${base}/${version}/data-modeling/embedding-vs-references +[v7.0-*]: ${prefix}/${version}/core/data-model-design -> ${base}/${version}/data-modeling/#link-related-data # DOCSP-35889 (v6.1-*]: ${prefix}/${version}/reference/operator/aggregation/first-array-element -> ${base}/${version}/reference/operator/aggregation/first/ + +# DOCSP-36940 +(v6.1-*]: ${prefix}/${version}/reference/operator/aggregation/last-array-element -> ${base}/${version}/reference/operator/aggregation/lastN-array-element/ From 4bc20585b94876610c676e2fe3d4b13abcac28f0 Mon Sep 17 00:00:00 2001 From: Sarah Simpers <82042374+sarahsimpers@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:18:18 -0500 Subject: [PATCH 150/308] (DOCS-16165) Adds example wiredTiger option setting and updates link (#6215) * (DOCS-16165) Adds example wiredTiger option setting and updates link * Includes tech review change to remove the link to the wiredTiger docs --- source/reference/method/db.createCollection.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source/reference/method/db.createCollection.txt b/source/reference/method/db.createCollection.txt index 173888199f5..12b40b0db9e 100644 --- a/source/reference/method/db.createCollection.txt +++ b/source/reference/method/db.createCollection.txt @@ -551,8 +551,17 @@ options when you create a collection with This operation creates a new collection named ``users`` with a specific configuration string that MongoDB will pass to the -``wiredTiger`` storage engine. See the :wtdocs-v5.0:`WiredTiger documentation of -collection level options ` -for specific ``wiredTiger`` options. +``wiredTiger`` storage engine. + +For example, to specify the ``zlib`` compressor for file blocks in the +``users`` collection, set the ``block_compressor`` option with the +following command: + +.. code-block:: javascript + + db.createCollection( + "users", + { storageEngine: { wiredTiger: { configString: "block_compressor=zlib" } } } + ) .. include:: /includes/fact-encryption-options-create-collection.rst From 05a1ac959aa03187807919e74148141f1b9490a1 Mon Sep 17 00:00:00 2001 From: Nick Larew Date: Wed, 21 Feb 2024 11:50:34 -0500 Subject: [PATCH 151/308] Redo fix on new multikey index page (#6440) --- source/core/indexes/index-types/index-multikey.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/core/indexes/index-types/index-multikey.txt b/source/core/indexes/index-types/index-multikey.txt index 8bcc5e44927..b4f62560a29 100644 --- a/source/core/indexes/index-types/index-multikey.txt +++ b/source/core/indexes/index-types/index-multikey.txt @@ -30,6 +30,8 @@ sets that index to be a multikey index. MongoDB can create multikey indexes over arrays that hold both scalar values (for example, strings and numbers) and embedded documents. +If an array contains multiple instances of the same value, the index +only includes one entry for the value. To create a multikey index, use the following prototype: From 7ab31f58a88df3d619a3bbeaaaa0752f864ae0d6 Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:23:52 -0600 Subject: [PATCH 152/308] DOCSP-34191: kotlin insert documents code (#6289) * DOCSP-34191: kotlin insert examples * staging test * fix tab ids * fix tab ids * fix tab ids * staging test * dedent settings * add back default domain * staging --- Makefile | 3 + snooty.toml | 2 +- .../driver-example-insert-1.rst | 9 +++ .../driver-example-insert-2.rst | 9 +++ .../driver-example-insert-3.rst | 9 +++ .../driver-example-query-7.rst | 9 +++ source/tutorial/insert-documents.txt | 70 ++++++++++++++++++- 7 files changed, 107 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index dd7b2573519..30357621dea 100644 --- a/Makefile +++ b/Makefile @@ -181,5 +181,8 @@ examples: curl -SfL https://raw.githubusercontent.com/mongodb/mongo-swift-driver/master/Examples/Docs/Sources/AsyncExamples/main.swift -o ${DRIVERS_PATH}/swiftAsync.swift curl -SfL https://raw.githubusercontent.com/mongodb/mongo-swift-driver/master/Examples/Docs/Sources/SyncExamples/main.swift -o ${DRIVERS_PATH}/swiftSync.swift +# kotlin-coroutine + curl -SfL https://raw.githubusercontent.com/mongodb/docs-kotlin/master/source/examples/ServerManualCodeExamples.kt -o ${DRIVERS_PATH}/kotlin_examples.kt + changelogs: python3 changelogs/generatechangelogs.py diff --git a/snooty.toml b/snooty.toml index 3dc8a8e1d5a..8388b74161e 100644 --- a/snooty.toml +++ b/snooty.toml @@ -358,7 +358,7 @@ java-driver-api = "https://mongodb.github.io/mongo-java-driver/{+java-driver-ver pymongo-api-docs = "https://pymongo.readthedocs.io/en/stable/api" node-libmongocrypt-binding-docs = "https://github.com/mongodb/libmongocrypt/tree/master/bindings" csharp-api-docs = "https://mongodb.github.io/mongo-csharp-driver/2.18/apidocs/html" -java-api-docs = "https://mongodb.github.io/mongo-java-driver/4.7/apidocs" +java-api-docs = "https://mongodb.github.io/mongo-java-driver/4.11/apidocs" go-api-docs = "https://pkg.go.dev/go.mongodb.org/mongo-driver@v1.10.3" enterprise-download-link = "https://www.mongodb.com/try/download/enterprise" # C2C Product diff --git a/source/includes/driver-examples/driver-example-insert-1.rst b/source/includes/driver-examples/driver-example-insert-1.rst index 370c2f859e6..9257aa27916 100644 --- a/source/includes/driver-examples/driver-example-insert-1.rst +++ b/source/includes/driver-examples/driver-example-insert-1.rst @@ -51,6 +51,15 @@ :start-after: Start Example 1 :end-before: End Example 1 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: 8 + :start-after: Start Example 1 + :end-before: End Example 1 + - id: nodejs content: | diff --git a/source/includes/driver-examples/driver-example-insert-2.rst b/source/includes/driver-examples/driver-example-insert-2.rst index a69a5ddb0dc..feef74f81d2 100644 --- a/source/includes/driver-examples/driver-example-insert-2.rst +++ b/source/includes/driver-examples/driver-example-insert-2.rst @@ -60,6 +60,15 @@ :start-after: Start Example 2 :end-before: End Example 2 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 2 + :end-before: End Example 2 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_insert.js diff --git a/source/includes/driver-examples/driver-example-insert-3.rst b/source/includes/driver-examples/driver-example-insert-3.rst index e655bb44f47..65ce46b6afd 100644 --- a/source/includes/driver-examples/driver-example-insert-3.rst +++ b/source/includes/driver-examples/driver-example-insert-3.rst @@ -69,6 +69,15 @@ :start-after: Start Example 3 :end-before: End Example 3 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: 8 + :start-after: Start Example 3 + :end-before: End Example 3 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_insert.js diff --git a/source/includes/driver-examples/driver-example-query-7.rst b/source/includes/driver-examples/driver-example-query-7.rst index 68eeb414057..4cbbd40d8b1 100644 --- a/source/includes/driver-examples/driver-example-query-7.rst +++ b/source/includes/driver-examples/driver-example-query-7.rst @@ -50,6 +50,15 @@ :start-after: Start Example 7 :end-before: End Example 7 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 7 + :end-before: End Example 7 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query.js diff --git a/source/tutorial/insert-documents.txt b/source/tutorial/insert-documents.txt index 9bad6c2ce8b..b08cb066a06 100644 --- a/source/tutorial/insert-documents.txt +++ b/source/tutorial/insert-documents.txt @@ -11,7 +11,7 @@ Insert Documents .. facet:: :name: programming_language - :values: shell, csharp, go, java, python, perl, php, ruby, scala, javascript/typescript + :values: shell, csharp, go, java, python, perl, php, ruby, scala, javascript/typescript, kotlin .. meta:: :description: Examples of how to insert documents using MongoDB, including creating a collection upon first insert. @@ -194,6 +194,19 @@ Insert a Single Document ObjectId value to the new document. See :ref:`write-op-insert-behavior`. + .. tab:: + :tabid: kotlin-coroutine + + `MongoCollection.insertOne <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-one.html>`__ + inserts a *single* :ref:`document` into + a collection. + + The following example inserts a new document into the + ``inventory`` collection. If the document does not specify + an ``_id`` field, the driver adds the ``_id`` field with an + ObjectId value to the new document. See + :ref:`write-op-insert-behavior`. + .. tab:: :tabid: nodejs @@ -331,10 +344,28 @@ Insert a Single Document .. tab:: :tabid: java-sync + `com.mongodb.client.MongoCollection.insertOne <{+java-api-docs+}/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#insertOne(TDocument)>`__ returns an + instance of `InsertOneResult + <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/result/InsertOneResult.html>`__. + You can access the ``_id`` field of the inserted document by + calling the `getInsertedId() <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/result/InsertOneResult.html#getInsertedId()>`__ method on the result. + + .. tab:: + :tabid: java-async + `com.mongodb.reactivestreams.client.MongoCollection.insertOne `_ returns a `Publisher `_ object. The ``Publisher`` inserts the document into a collection when subscribers request data. + .. tab:: + :tabid: kotlin-coroutine + + `MongoCollection.insertOne <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-one.html>`__ returns an + instance of `InsertOneResult + <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/result/InsertOneResult.html>`__. + You can access the ``_id`` field of the inserted document by + accessing the ``insertedId`` field of the result. + .. tab:: :tabid: nodejs @@ -484,6 +515,18 @@ upper-right to set the language of the examples on this page. ``_id`` field, the driver adds the ``_id`` field with an ObjectId value to each document. See :ref:`write-op-insert-behavior`. + .. tab:: + :tabid: kotlin-coroutine + + `MongoCollection.insertMany <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-many.html>`__ + inserts *multiple* :ref:`documents ` + into a collection. Pass a list of documents as a parameter to the method. + + The following example inserts three new documents into the + ``inventory`` collection. If the documents do not specify an + ``_id`` field, the driver adds an ObjectId value to each document. + See :ref:`write-op-insert-behavior`. + .. tab:: :tabid: nodejs @@ -570,7 +613,6 @@ upper-right to set the language of the examples on this page. ``_id`` field, the driver adds the ``_id`` field with an ObjectId value to each document. See :ref:`write-op-insert-behavior`. - .. include:: /includes/driver-examples/driver-example-insert-3.rst .. tabs-drivers:: @@ -625,6 +667,17 @@ upper-right to set the language of the examples on this page. To retrieve the inserted documents, :ref:`query the collection `: + .. tab:: + :tabid: kotlin-coroutine + + `MongoCollection.insertMany() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-many.html>`_ + returns an ``InsertManyResult`` instance. The ``insertedIds`` + field of ``InsertManyResult`` contains the ``_id`` values of the + inserted documents. + + To retrieve the inserted documents, :ref:`query the collection + `: + .. tab:: :tabid: nodejs @@ -702,7 +755,6 @@ upper-right to set the language of the examples on this page. To retrieve the inserted documents, :ref:`query the collection `: - .. include:: /includes/driver-examples/driver-example-query-7.rst .. _write-op-insert-behavior: @@ -794,6 +846,18 @@ requested from MongoDB for write operations. For details, see - `Java Reactive Streams Driver Quick Tour `_ + .. tab:: + :tabid: kotlin-coroutine + + .. seealso:: + + - `MongoCollection.insertOne <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-one.html>`__ + + - `MongoCollection.insertMany <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/insert-many.html>`__ + + - :driver:`Kotlin Driver Write Operation Examples + ` + .. tab:: :tabid: nodejs From 83d3466b72bf9cb829682ea2bba65e5e49c0fe96 Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:46:42 -0600 Subject: [PATCH 153/308] DOCSP-36863: update libmc to v1.9 (#6451) --- snooty.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snooty.toml b/snooty.toml index 8388b74161e..4ff43db9cf8 100644 --- a/snooty.toml +++ b/snooty.toml @@ -333,7 +333,7 @@ kmip-kms-no-hover = "KMIP-compliant key provider" kmip-kms = "{+kmip-hover+}-compliant key provider" kmip-kms-title = "KMIP-Compliant Key Provider" csfle-code-snippets-gen-keys = "https://github.com/mongodb/docs/tree/master/source/includes/quick-start/generate-master-key" -libmongocrypt-version = "1.8" +libmongocrypt-version = "1.9" mongodb-crypt-version = "1.7.3" sample-app-url-csfle = "https://github.com/mongodb-university/docs-in-use-encryption-examples/tree/main/csfle" sample-app-url-qe = "https://github.com/mongodb/docs/tree/master/source/includes/qe-tutorials" From 8d1c9fb4261228b15d8b0c7f63fde2f254323a00 Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Wed, 21 Feb 2024 16:49:04 -0500 Subject: [PATCH 154/308] DOCSP-36726-link-create-user-from-security-checklist (#6472) --- source/administration/security-checklist.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/source/administration/security-checklist.txt b/source/administration/security-checklist.txt index b9cb597411d..2da04da6b43 100644 --- a/source/administration/security-checklist.txt +++ b/source/administration/security-checklist.txt @@ -67,6 +67,7 @@ Pre-production Checklist/Considerations .. seealso:: - :doc:`/core/authorization` + - :doc:`/tutorial/create-users` - :doc:`/tutorial/manage-users-and-roles` |arrow| Encrypt Communication (TLS/SSL) From ce24cbc1f4b23f5fa984200f036baf66bed84e62 Mon Sep 17 00:00:00 2001 From: jocelyn-mendez1 <91144778+jocelyn-mendez1@users.noreply.github.com> Date: Wed, 21 Feb 2024 19:25:28 -0500 Subject: [PATCH 155/308] DOCSP-17951 No shard key or id field for Sharded collections (#6394) * DOCSP-17951 no shard key or id * DOCSP-17951 fix table * DOCSP-17951 fix table * DOCSP-17951 fix table * DOCSP-17951 jason feedback * DOCSP-17951 nick feedback --- source/reference/command/findAndModify.txt | 3 ++ .../method/db.collection.deleteOne.txt | 4 +- .../method/db.collection.findAndModify.txt | 3 ++ .../method/db.collection.updateOne.txt | 41 ++++++++++--------- 4 files changed, 29 insertions(+), 22 deletions(-) diff --git a/source/reference/command/findAndModify.txt b/source/reference/command/findAndModify.txt index 93f59034104..375feea3612 100644 --- a/source/reference/command/findAndModify.txt +++ b/source/reference/command/findAndModify.txt @@ -352,6 +352,9 @@ To use :dbcommand:`findAndModify` on a sharded collection: - You can provide an equality condition on a full shard key in the ``query`` field. +- Starting in version 7.1, you do not need to provide the :term:`shard key` + or ``_id`` field in the query specification. + .. include:: /includes/extracts/missing-shard-key-equality-condition-findAndModify.rst Shard Key Modification diff --git a/source/reference/method/db.collection.deleteOne.txt b/source/reference/method/db.collection.deleteOne.txt index 4567dc75963..2dc91323dff 100644 --- a/source/reference/method/db.collection.deleteOne.txt +++ b/source/reference/method/db.collection.deleteOne.txt @@ -131,8 +131,8 @@ To use :method:`db.collection.deleteOne` on a sharded collection: - If you only target one shard, you can use a partial shard key in the query specification or, -- You can provide the :term:`shard key` or the ``_id`` field in the query - specification. +- If you set ``limit: 1``, you do not need to provide the :term:`shard key` + or ``_id`` field in the query specification. Transactions ~~~~~~~~~~~~ diff --git a/source/reference/method/db.collection.findAndModify.txt b/source/reference/method/db.collection.findAndModify.txt index fde4406b0d8..6bd93ebdf5b 100644 --- a/source/reference/method/db.collection.findAndModify.txt +++ b/source/reference/method/db.collection.findAndModify.txt @@ -278,6 +278,9 @@ To use :dbcommand:`findAndModify` on a sharded collection: - You can provide an equality condition on a full shard key in the ``query`` field. +- Starting in version 7.1, you do not need to provide the :term:`shard key` + or ``_id`` field in the query specification. + .. include:: /includes/extracts/missing-shard-key-equality-condition-findAndModify.rst Shard Key Modification diff --git a/source/reference/method/db.collection.updateOne.txt b/source/reference/method/db.collection.updateOne.txt index e73ee7739af..42271281713 100644 --- a/source/reference/method/db.collection.updateOne.txt +++ b/source/reference/method/db.collection.updateOne.txt @@ -346,40 +346,41 @@ See also :ref:`updateOne-sharded-upsert`. Missing Shard Key ````````````````` -Starting in version 4.4, documents in a sharded collection can be -:ref:`missing the shard key fields `. To use -:method:`db.collection.updateOne()` to set the document's -**missing** shard key, you :red:`must` run on a -:binary:`~bin.mongos`. Do :red:`not` issue the operation directly on -the shard. +- Starting in version 7.1, you do not need to provide the :term:`shard key` + or ``_id`` field in the query specification. -In addition, the following requirements also apply: +- Starting in version 4.4, documents in a sharded collection can be + :ref:`missing the shard key fields `. To use + :method:`db.collection.updateOne()` to set a **missing** shard key, + you :red:`must` run on a :binary:`~bin.mongos`. Do :red:`not` issue + the operation directly on the shard. -.. list-table:: - :header-rows: 1 - :widths: 30 70 + In addition, the following requirements also apply: + + .. list-table:: + :header-rows: 1 + :widths: 30 70 - * - Task + * - Task - - Requirements + - Requirements - * - To set to ``null`` + * - To set to ``null`` - - - Requires equality filter on the full shard key if + - Requires equality filter on the full shard key if ``upsert: true``. - * - To set to a non-``null`` value + * - To set to a non-``null`` value - - - :red:`Must` be performed either inside a + - :red:`Must` be performed either inside a :ref:`transaction ` or as a :doc:`retryable write `. - - Requires equality filter on the full shard key if ``upsert: - true``. + Requires equality filter on the full shard key if ``upsert: true``. -.. tip:: + .. tip:: - .. include:: /includes/extracts/missing-shard-key-equality-condition-abridged.rst + .. include:: /includes/extracts/missing-shard-key-equality-condition-abridged.rst See also: From 782926cfecf0b55e7d14cacee1cfd61f3f8a7de3 Mon Sep 17 00:00:00 2001 From: pierwill <19642016+pierwill@users.noreply.github.com> Date: Thu, 22 Feb 2024 08:52:04 -0600 Subject: [PATCH 156/308] DOCSP-35879 Atlas support for Aggregation methods (#6124) Co-authored-by: pierwill --- source/reference/method/db.aggregate.txt | 14 ++++++++++++++ source/reference/method/db.collection.count.txt | 11 +++++++++-- source/reference/method/db.collection.distinct.txt | 11 +++++++++-- .../reference/method/db.collection.mapReduce.txt | 13 +++++++++++++ 4 files changed, 45 insertions(+), 4 deletions(-) diff --git a/source/reference/method/db.aggregate.txt b/source/reference/method/db.aggregate.txt index 265ba5c08b9..c5d75c72a53 100644 --- a/source/reference/method/db.aggregate.txt +++ b/source/reference/method/db.aggregate.txt @@ -142,6 +142,20 @@ Definition :pipeline:`$merge` stage. +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-limited-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + + Example ------- diff --git a/source/reference/method/db.collection.count.txt b/source/reference/method/db.collection.count.txt index 8abaf1d6907..13bbb02052c 100644 --- a/source/reference/method/db.collection.count.txt +++ b/source/reference/method/db.collection.count.txt @@ -36,12 +36,19 @@ Definition :method:`~db.collection.find()` operation but instead counts and returns the number of results that match a query. + Compatibility ------------- -.. |operator-method| replace:: ``db.collection.count()`` +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-limited-free.rst -.. include:: /includes/fact-compatibility.rst +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/method/db.collection.distinct.txt b/source/reference/method/db.collection.distinct.txt index ecea1087c76..86ec9351408 100644 --- a/source/reference/method/db.collection.distinct.txt +++ b/source/reference/method/db.collection.distinct.txt @@ -28,12 +28,19 @@ Definition values for a specified field across a single collection or view and returns the results in an array. + Compatibility ------------- -.. |operator-method| replace:: ``db.collection.distinct()`` +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-limited-free.rst -.. include:: /includes/fact-compatibility.rst +.. include:: /includes/fact-environments-onprem-only.rst Syntax ------ diff --git a/source/reference/method/db.collection.mapReduce.txt b/source/reference/method/db.collection.mapReduce.txt index 67ea230c763..4b063c938c8 100644 --- a/source/reference/method/db.collection.mapReduce.txt +++ b/source/reference/method/db.collection.mapReduce.txt @@ -23,6 +23,19 @@ db.collection.mapReduce() .. include:: /includes/extracts/views-unsupported-mapReduce.rst +Compatibility +------------- + +.. |command| replace:: method + +This method is available in deployments hosted in the following environments: + +.. include:: /includes/fact-environments-atlas-only.rst + +.. include:: /includes/fact-environments-atlas-support-no-free.rst + +.. include:: /includes/fact-environments-onprem-only.rst + Syntax ------ From 61dc66d6204c0b0230a18048e2377027de76867e Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Thu, 22 Feb 2024 09:53:10 -0500 Subject: [PATCH 157/308] DOCSP-36609 Warning about All Voting Member Index Build Quorum/Offline Nodes (#6344) * DOCSP-36609 Warning about All Voting Member Index Build Quorum/Offline Nodes * internal review * external review --- source/core/index-creation.txt | 2 ++ .../unreachable-node-default-quorum-index-builds.rst | 6 ++++++ source/reference/command/createIndexes.txt | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 source/includes/unreachable-node-default-quorum-index-builds.rst diff --git a/source/core/index-creation.txt b/source/core/index-creation.txt index 3f408fed7d6..78fc69c8e27 100644 --- a/source/core/index-creation.txt +++ b/source/core/index-creation.txt @@ -175,6 +175,8 @@ Index Builds in Replicated Environments .. include:: /includes/extracts/4.4-changes-index-builds-simultaneous-nolink.rst +.. include:: /includes/unreachable-node-default-quorum-index-builds.rst + The build process is summarized as follows: 1. The primary receives the :dbcommand:`createIndexes` command and diff --git a/source/includes/unreachable-node-default-quorum-index-builds.rst b/source/includes/unreachable-node-default-quorum-index-builds.rst new file mode 100644 index 00000000000..00c7a086eca --- /dev/null +++ b/source/includes/unreachable-node-default-quorum-index-builds.rst @@ -0,0 +1,6 @@ +.. important:: + + If a data-bearing voting node becomes unreachable and the + :ref:`commitQuorum ` is set to the + default ``votingMembers``, index builds can hang until that node + comes back online. diff --git a/source/reference/command/createIndexes.txt b/source/reference/command/createIndexes.txt index 986980bf7fd..97abb76c04e 100644 --- a/source/reference/command/createIndexes.txt +++ b/source/reference/command/createIndexes.txt @@ -535,6 +535,8 @@ Concurrency .. include:: /includes/extracts/createIndexes-resource-lock.rst +.. include:: /includes/unreachable-node-default-quorum-index-builds.rst + Memory Usage Limit ~~~~~~~~~~~~~~~~~~ From a8872fb5bfe65c332031662992502d1cca174cf4 Mon Sep 17 00:00:00 2001 From: ianf-mongodb <85948430+ianf-mongodb@users.noreply.github.com> Date: Thu, 22 Feb 2024 13:53:09 -0500 Subject: [PATCH 158/308] DOCSP-36731) 5.0.25 Release Notes (#6473) --- config/changelog_conf.yaml | 1 + .../includes/changelogs/releases/5.0.25.rst | 142 ++++++++++++++++++ source/release-notes/5.0-changelog.txt | 2 + source/release-notes/5.0.txt | 20 +++ 4 files changed, 165 insertions(+) create mode 100644 source/includes/changelogs/releases/5.0.25.rst diff --git a/config/changelog_conf.yaml b/config/changelog_conf.yaml index 9484b3512fe..a46a364c76a 100644 --- a/config/changelog_conf.yaml +++ b/config/changelog_conf.yaml @@ -35,6 +35,7 @@ groups: - Test Format - WiredTiger - dhandles + - RTS "MMAP": - MMAPv1 "Storage": diff --git a/source/includes/changelogs/releases/5.0.25.rst b/source/includes/changelogs/releases/5.0.25.rst new file mode 100644 index 00000000000..a07d8abacda --- /dev/null +++ b/source/includes/changelogs/releases/5.0.25.rst @@ -0,0 +1,142 @@ +.. _5.0.25-changelog: + +5.0.25 Changelog +---------------- + +Sharding +~~~~~~~~ + +- :issue:`SERVER-76536` Increase + receiveChunkWaitForRangeDeleterTimeoutMS in concurrency suites +- :issue:`SERVER-81508` Potential double-execution of write statements + when ShardCannotRefreshDueToLocksHeld is thrown + +Replication +~~~~~~~~~~~ + +:issue:`SERVER-56756` Primary cannot stepDown when experiencing disk +failures + +Storage +~~~~~~~ + + +WiredTiger +`````````` + +- :issue:`WT-10017` Remove the unstable historical versions at the end + of rollback to stable +- :issue:`WT-12316` Fix timing stress options in test/format for 6.0 and + older branches + +Build and Packaging +~~~~~~~~~~~~~~~~~~~ + +:issue:`SERVER-85156` dbCheck throws unexpected "invalidate" change +stream event [5.0] + +Internals +~~~~~~~~~ + +- :issue:`SERVER-62763` Fix data-type used for passing options to + setsockopt +- :issue:`SERVER-64444` listIndexes fails on invalid pre-5.0 index spec + after upgrade +- :issue:`SERVER-66036` Improve future validity semantics +- :issue:`SERVER-68674` Vendor an immutable/persistent data structure + library +- :issue:`SERVER-69413` Documentation Updates +- :issue:`SERVER-71520` Dump all thread stacks on RSTL acquisition + timeout +- :issue:`SERVER-72839` Server skips peer certificate validation if + neither CAFile nor clusterCAFile is provided +- :issue:`SERVER-74874` Add typedef for immutable unordered map and set +- :issue:`SERVER-74875` Implement immutable ordered map and set +- :issue:`SERVER-74876` Evaluate which immer memory policy to use +- :issue:`SERVER-74946` Convert containers in CollectionCatalog for + collection lookup to immutable +- :issue:`SERVER-74947` Convert containers in CollectionCatalog for view + lookup to immutable +- :issue:`SERVER-74951` Convert containers in CollectionCatalog for + profile settings to immutable +- :issue:`SERVER-75263` Add immer benchmarks +- :issue:`SERVER-75497` Convert ordered containers in CollectionCatalog + to immutable +- :issue:`SERVER-75613` Add GDB pretty printers for immutable data + structures +- :issue:`SERVER-75851` Add typedef for immutable vector +- :issue:`SERVER-76789` Add immer to README.third_party.md +- :issue:`SERVER-76932` Add a way for a thread to know when the + SignalHandler thread is done with printAllThreadStacks +- :issue:`SERVER-77694` cannot compile immer header with --opt=off +- :issue:`SERVER-78911` Always suppress "Different user name was + supplied to saslSupportedMechs" log during X.509 intracluster auth +- :issue:`SERVER-80150` Log negotiated network compressor with client + metadata +- :issue:`SERVER-80279` Commit on non-existing transaction then proceed + to continue can trigger an invariant +- :issue:`SERVER-80978` Fix potential deadlock between + TTLMonitor::onStepUp and prepared transaction +- :issue:`SERVER-81133` Speedup logic to persist routing table cache +- :issue:`SERVER-82093` Release mongo v5 on amazon 2023 +- :issue:`SERVER-82353` Multi-document transactions can miss documents + when movePrimary runs concurrently +- :issue:`SERVER-82627` ReshardingDataReplication does not join the + ReshardingOplogFetcher thread pool causing invariant failure. +- :issue:`SERVER-82815` Expose server’s index key creation via + aggregation +- :issue:`SERVER-83050` Create a deployment of mongodb on + AL2-openssl-1.1.1 +- :issue:`SERVER-83337` Re-enable wt_size_storer_cleanup_replica_set.js + on macOS +- :issue:`SERVER-83369` Index creation does not enforce type of + bucketSize field +- :issue:`SERVER-83564` Make sure the process field is indexed in + config.locks +- :issue:`SERVER-84063` Remove BlackDuck from Security Daily Cron +- :issue:`SERVER-84722` Create undocumented server parameter to skip + document validation on insert code path for internal usage +- :issue:`SERVER-84749` Remove + sharding_update_v1_oplog_jscore_passthrough from macOS variants +- :issue:`SERVER-84772` Delete stitch-related tasks in enterprise + variant +- :issue:`SERVER-85167` Size storer can be flushed concurrently with + being destructed for rollback +- :issue:`SERVER-85263` Report escaped client application name +- :issue:`SERVER-85306` Update sys-perf config to use HTTPs github links + rather than SSH +- :issue:`SERVER-85364` [6.0] Convert resource map in CollectionCatalog + to immutable +- :issue:`SERVER-85365` [6.0] Convert shadow catalog in + CollectionCatalog to immutable +- :issue:`SERVER-85419` Balancer pollutes logs in case no suitable + recipient is found during draining +- :issue:`SERVER-85498` [5.0] Fix immutable_ordered_test on MacOS +- :issue:`SERVER-85530` Refresh Test Certificates +- :issue:`SERVER-85652` Update DSI atlas azure tasks to use an AL2 + compile artifact. +- :issue:`SERVER-85693` Fix potential access violation in + User::validateRestrictions +- :issue:`SERVER-85771` Make $bucketAuto more robust in the case of an + empty string for the groupBy field +- :issue:`SERVER-86027` Tag + insert_docs_larger_than_max_user_size_standalone.js with + requires_persistence and requires_replication +- :issue:`SERVER-86062` [v5.0] directoryperdb.js relies on + fsync/checkpointing behavior which does not hold when running with + --nojournal +- :issue:`SERVER-86081` Sys-perf missing required parameters due to + Evergreen Redaction +- :issue:`SERVER-86561` Increase benchmarks_orphaned from 3h to 4h +- :issue:`WT-7712` commit and durable timestamps should be disallowed at + stable timestamp +- :issue:`WT-9824` Add testing to file manager WT connection + configurations in test/format +- :issue:`WT-11491` Log the WiredTiger time spent during startup and + shutdown +- :issue:`WT-11777` Fix units of __wt_timer_evaluate() calls: logging + and progress period +- :issue:`WT-12211` Fix PATH env variable in hang analyzer to generate + python core dump (7.0) +- :issue:`WT-12272` Remove unnecessary module in evergreen.yml + diff --git a/source/release-notes/5.0-changelog.txt b/source/release-notes/5.0-changelog.txt index c9553a5b31b..d016d753d9b 100644 --- a/source/release-notes/5.0-changelog.txt +++ b/source/release-notes/5.0-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/5.0.25.rst + .. include:: /includes/changelogs/releases/5.0.24.rst .. include:: /includes/changelogs/releases/5.0.23.rst diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index 397ffe8a489..84f4deaf384 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -52,6 +52,26 @@ Patch Releases - 5.0.6 - 5.0.21 (Time Series collections sharded by metaField embedded objects) +.. _5.0.25-release-notes: + +5.0.25 - Upcoming +~~~~~~~~~~~~~~~~~ + +- :issue:`SERVER-64444` listIndexes fails on invalid pre-5.0 index spec + after upgrade +- :issue:`SERVER-82353` Multi-document transactions can miss documents + when movePrimary runs concurrently +- :issue:`SERVER-83564` Make sure the process field is indexed in + config.locks +- :issue:`SERVER-85419` Balancer pollutes logs in case no suitable + recipient is found during draining +- :issue:`WT-10017` Remove the unstable historical versions at the + end of rollback to stable + +- `All JIRA issues closed in 5.0.25 + `_ +- :ref:`5.0.25-changelog` + .. _5.0.24-release-notes: 5.0.24 - Jan 18, 2024 From 53ce99c53f6a795f78d44eba8feb2ff961d1a421 Mon Sep 17 00:00:00 2001 From: Nick Villahermosa Date: Thu, 22 Feb 2024 14:48:24 -0500 Subject: [PATCH 159/308] DOCSP-37018 Clarified restrictions on multi-document operations with QE (#6463) * Clarified restrictions on multi-document operations * Grammar fix --- .../queryable-encryption/reference/limitations.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/core/queryable-encryption/reference/limitations.txt b/source/core/queryable-encryption/reference/limitations.txt index a0c0ce039ba..a3351c3c2cb 100644 --- a/source/core/queryable-encryption/reference/limitations.txt +++ b/source/core/queryable-encryption/reference/limitations.txt @@ -153,11 +153,11 @@ Sharding CRUD ---- -- {+qe+} does not support batch operations. The following operations are - not supported: - - - :method:`db.collection.updateMany()` - - :method:`db.collection.deleteMany()` +- {+qe+} does not support multi-document update operations. + :method:`db.collection.updateMany()` is not supported. +- {+qe+} does not support multi-statement update or delete operations. + :method:`db.collection.bulkWrite()` with more than one update or + delete operation is not supported. - {+qe+} limits :method:`db.collection.findAndModify()` arguments. From 501c289d12a8424da46a2df25c67a8332e6a11d9 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Thu, 22 Feb 2024 12:09:27 -0800 Subject: [PATCH 160/308] DOCSP-30834 communicate limits of change streams on views (#6412) --- .../views/fact-compare-view-and-materialized-view.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/includes/views/fact-compare-view-and-materialized-view.rst b/source/includes/views/fact-compare-view-and-materialized-view.rst index a5e9850395c..de060ef7a03 100644 --- a/source/includes/views/fact-compare-view-and-materialized-view.rst +++ b/source/includes/views/fact-compare-view-and-materialized-view.rst @@ -7,7 +7,14 @@ from an aggregation pipeline. - On-demand materialized views are stored on and read from disk. They use a :pipeline:`$merge` or :pipeline:`$out` stage to update the saved - data. + data. + + .. note:: + + When using :pipeline:`$merge`, you can use :ref:`change streams + ` to watch for changes on the materialized view. + When using :pipeline:`$out`, you can't watch for changes on the + materialized view. Indexes ~~~~~~~ From a8c05130bb14b8fa9f2823ab876834310a470f53 Mon Sep 17 00:00:00 2001 From: mmeigs Date: Thu, 22 Feb 2024 16:04:32 -0500 Subject: [PATCH 161/308] delete mongo-web-shell reference (#6480) --- source/includes/fact-mws-intro.rst | 1 - source/includes/fact-mws.rst | 2 -- 2 files changed, 3 deletions(-) delete mode 100644 source/includes/fact-mws-intro.rst delete mode 100644 source/includes/fact-mws.rst diff --git a/source/includes/fact-mws-intro.rst b/source/includes/fact-mws-intro.rst deleted file mode 100644 index f0f7330978b..00000000000 --- a/source/includes/fact-mws-intro.rst +++ /dev/null @@ -1 +0,0 @@ -You can run the operation in the web shell below: diff --git a/source/includes/fact-mws.rst b/source/includes/fact-mws.rst deleted file mode 100644 index a137412d860..00000000000 --- a/source/includes/fact-mws.rst +++ /dev/null @@ -1,2 +0,0 @@ -.. mongo-web-shell:: - :version: latest From f23c43c9094a43150638fb7a0cf3936561288bfa Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Fri, 23 Feb 2024 10:30:05 -0500 Subject: [PATCH 162/308] DOCSP-34193: kotlin query code examples (#6486) * DOCSP-34193: kotlin query code examples * fix * extracts * include fix --- .../driver-example-query-10.rst | 9 + .../driver-example-query-11.rst | 9 + .../driver-example-query-12.rst | 9 + .../driver-example-query-13.rst | 9 + .../driver-example-query-6.rst | 9 + .../driver-example-query-9.rst | 9 + .../driver-example-query-find-method.rst | 6 + .../driver-example-query-intro.rst | 15 + source/includes/extracts-filter.yaml | 1087 +++++++++-------- source/tutorial/query-documents.txt | 30 +- 10 files changed, 657 insertions(+), 535 deletions(-) diff --git a/source/includes/driver-examples/driver-example-query-10.rst b/source/includes/driver-examples/driver-example-query-10.rst index 1cb7601a903..d4c36d9c3c8 100644 --- a/source/includes/driver-examples/driver-example-query-10.rst +++ b/source/includes/driver-examples/driver-example-query-10.rst @@ -57,6 +57,15 @@ :start-after: Start Example 10 :end-before: End Example 10 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 10 + :end-before: End Example 10 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query.js diff --git a/source/includes/driver-examples/driver-example-query-11.rst b/source/includes/driver-examples/driver-example-query-11.rst index b020bf5f7e8..d8620b4869c 100644 --- a/source/includes/driver-examples/driver-example-query-11.rst +++ b/source/includes/driver-examples/driver-example-query-11.rst @@ -57,6 +57,15 @@ :start-after: Start Example 11 :end-before: End Example 11 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 11 + :end-before: End Example 11 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query.js diff --git a/source/includes/driver-examples/driver-example-query-12.rst b/source/includes/driver-examples/driver-example-query-12.rst index d5e0cc55f56..8570118a02d 100644 --- a/source/includes/driver-examples/driver-example-query-12.rst +++ b/source/includes/driver-examples/driver-example-query-12.rst @@ -57,6 +57,15 @@ :start-after: Start Example 12 :end-before: End Example 12 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 12 + :end-before: End Example 12 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query.js diff --git a/source/includes/driver-examples/driver-example-query-13.rst b/source/includes/driver-examples/driver-example-query-13.rst index cc28fee06d4..1c694c310a5 100644 --- a/source/includes/driver-examples/driver-example-query-13.rst +++ b/source/includes/driver-examples/driver-example-query-13.rst @@ -61,6 +61,15 @@ :start-after: Start Example 13 :end-before: End Example 13 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 13 + :end-before: End Example 13 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query.js diff --git a/source/includes/driver-examples/driver-example-query-6.rst b/source/includes/driver-examples/driver-example-query-6.rst index c6979b420ed..7e24f28bea7 100644 --- a/source/includes/driver-examples/driver-example-query-6.rst +++ b/source/includes/driver-examples/driver-example-query-6.rst @@ -65,6 +65,15 @@ :start-after: Start Example 6 :end-before: End Example 6 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 6 + :end-before: End Example 6 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query.js diff --git a/source/includes/driver-examples/driver-example-query-9.rst b/source/includes/driver-examples/driver-example-query-9.rst index ba9e1824dac..176e4f0f70a 100644 --- a/source/includes/driver-examples/driver-example-query-9.rst +++ b/source/includes/driver-examples/driver-example-query-9.rst @@ -57,6 +57,15 @@ :start-after: Start Example 9 :end-before: End Example 9 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 9 + :end-before: End Example 9 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query.js diff --git a/source/includes/driver-examples/driver-example-query-find-method.rst b/source/includes/driver-examples/driver-example-query-find-method.rst index 9fc26cda700..9e467cdcb23 100644 --- a/source/includes/driver-examples/driver-example-query-find-method.rst +++ b/source/includes/driver-examples/driver-example-query-find-method.rst @@ -39,6 +39,12 @@ document as the query filter parameter to the find method. The query filter parameter determines the select criteria: + - id: kotlin-coroutine + content: | + To select all documents in the collection, pass an empty + document as the query filter parameter to the find method. The + query filter parameter determines the select criteria: + - id: nodejs content: | To select all documents in the collection, pass an empty diff --git a/source/includes/driver-examples/driver-example-query-intro.rst b/source/includes/driver-examples/driver-example-query-intro.rst index 8192fc4c271..3ecf928cd97 100644 --- a/source/includes/driver-examples/driver-example-query-intro.rst +++ b/source/includes/driver-examples/driver-example-query-intro.rst @@ -56,6 +56,21 @@ .. include:: /includes/driver-examples/examples-intro.rst + - id: kotlin-coroutine + content: | + This page provides examples of |query_operations| by using the + `MongoCollection.find() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/find.html>`__ method in the MongoDB + :driver:`Kotlin Coroutine Driver `. + + .. tip:: + + The driver provides `com.mongodb.client.model.Filters <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/model/Filters.html>`__ + helper methods to facilitate the creation of filter + documents. The examples on this page use these methods to + create the filter documents. + + .. include:: /includes/driver-examples/examples-intro.rst + - id: nodejs content: | This page provides examples of |query_operations| using the diff --git a/source/includes/extracts-filter.yaml b/source/includes/extracts-filter.yaml index 3ed7baf4b36..f6449108739 100644 --- a/source/includes/extracts-filter.yaml +++ b/source/includes/extracts-filter.yaml @@ -1,667 +1,688 @@ ref: filter-equality content: | - .. tabs-drivers:: + .. tabs-drivers:: - tabs: - - id: shell - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: + tabs: + - id: shell + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: - .. code-block:: javascript + .. code-block:: javascript - { : , ... } + { : , ... } - - id: compass - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: + - id: compass + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: - .. code-block:: javascript + .. code-block:: javascript - { : , ... } + { : , ... } - - id: python - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: + - id: python + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: - .. code-block:: python + .. code-block:: python - { : , ... } + { : , ... } - - id: motor - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: + - id: motor + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: - .. code-block:: python + .. code-block:: python - { : , ... } + { : , ... } - - id: java-sync - content: | - To specify equality conditions, use the - ``com.mongodb.client.model.Filters.eq_`` method to create the - :ref:`query filter document `: + - id: java-sync + content: | + To specify equality conditions, use the + ``com.mongodb.client.model.Filters.eq_`` method to create the + :ref:`query filter document `: - .. code-block:: java + .. code-block:: java - and(eq( , ), eq( , ) ...) + and(eq( , ), eq( , ) ...) - - id: java-async - content: | - To specify equality conditions, use the - com.mongodb.client.model.Filters.eq_ method to create the - :ref:`query filter document `: + - id: java-async + content: | + To specify equality conditions, use the + com.mongodb.client.model.Filters.eq_ method to create the + :ref:`query filter document `: - .. code-block:: java + .. code-block:: java - and(eq( , ), eq( , ) ...) + and(eq( , ), eq( , ) ...) - - id: nodejs - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: + - id: kotlin-coroutine + content: | + To specify equality conditions, use the + ``com.mongodb.client.model.Filters.eq_`` method to create the + :ref:`query filter document `: - .. code-block:: javascript + .. code-block:: kotlin - { : , ... } + and(eq( , ), eq( , ) ...) - - id: php - content: | - To specify equality conditions, use `` => `` - expressions in the - :ref:`query filter document `: + - id: nodejs + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: - .. code-block:: php + .. code-block:: javascript - [ => , ... ] + { : , ... } - - id: perl - content: | - To specify equality conditions, use `` => `` - expressions in the - :ref:`query filter document `: + - id: php + content: | + To specify equality conditions, use `` => `` + expressions in the + :ref:`query filter document `: - .. code-block:: perl + .. code-block:: php - { => , ... } + [ => , ... ] - - id: ruby - content: | - To specify equality conditions, use `` => `` - expressions in the - :ref:`query filter document `: + - id: perl + content: | + To specify equality conditions, use `` => `` + expressions in the + :ref:`query filter document `: - .. code-block:: ruby + .. code-block:: perl - { => , ... } + { => , ... } - - id: scala - content: | - To specify equality conditions, use the - ``com.mongodb.client.model.Filters.eq_`` method to create the - :ref:`query filter document `: + - id: ruby + content: | + To specify equality conditions, use `` => `` + expressions in the + :ref:`query filter document `: - .. code-block:: scala + .. code-block:: ruby - and(equal(, ), equal(, ) ...) + { => , ... } - - id: csharp - content: | - To specify equality conditions, construct a filter using the - :csharp-api:`Eq - ` method: + - id: scala + content: | + To specify equality conditions, use the + ``com.mongodb.client.model.Filters.eq_`` method to create the + :ref:`query filter document `: - .. code-block:: c# + .. code-block:: scala - Builders.Filter.Eq(, ); + and(equal(, ), equal(, ) ...) + + - id: csharp + content: | + To specify equality conditions, construct a filter using the + :csharp-api:`Eq + ` method: + + .. code-block:: c# + + Builders.Filter.Eq(, ); --- ref: filter-equality-embedded content: | - .. tabs-drivers:: - - tabs: - - id: shell - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: compass - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: python - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: motor - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: java-sync - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the filter document - ``eq( , )`` where ```` is the document - to match. - - - id: java-async - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the filter document - ``eq( , )`` where ```` is the document - to match. - - - id: nodejs - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: php - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``[ => ]`` where ```` is the document - to match. - - - id: perl - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ => }`` where ```` is the document - to match. - - - id: ruby - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ => }`` where ```` is the document - to match. - - - id: scala - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the filter document - ``equal( , )`` where ```` is the document - to match. - - - id: csharp - content: | - To specify an equality condition on a field that is an - embedded/nested document, construct a filter using the - :csharp-api:`Eq - ` - method: - - .. code-block:: c# - - Builders.Filter.Eq(, ) - - ```` is the document to match. + .. tabs-drivers:: + + tabs: + - id: shell + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: compass + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: python + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: motor + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: java-sync + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the filter document + ``eq( , )`` where ```` is the document + to match. + + - id: java-async + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the filter document + ``eq( , )`` where ```` is the document + to match. + + - id: nodejs + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: php + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``[ => ]`` where ```` is the document + to match. + + - id: perl + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ => }`` where ```` is the document + to match. + + - id: ruby + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ => }`` where ```` is the document + to match. + + - id: scala + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the filter document + ``equal( , )`` where ```` is the document + to match. + + - id: csharp + content: | + To specify an equality condition on a field that is an + embedded/nested document, construct a filter using the + :csharp-api:`Eq + ` + method: + + .. code-block:: c# + + Builders.Filter.Eq(, ) + + ```` is the document to match. --- ref: filter-equality-array content: | - .. tabs-drivers:: - - tabs: - - id: shell - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: compass - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: python - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: motor - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: java-sync - content: | - To specify equality condition on an array, use the query - document ``eq( , )`` where ```` is - the exact array to match, including the order of the - elements. - - - id: java-async - content: | - To specify equality condition on an array, use the query - document ``eq( , )`` where ```` is - the exact array to match, including the order of the - elements. - - - id: nodejs - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: php - content: | - To specify equality condition on an array, use the query - document ``[ => ]`` where ```` is the - exact array to match, including the order of the elements. - - - id: perl - content: | - To specify equality condition on an array, use the query - document ``{ => }`` where ```` is the - exact array to match, including the order of the elements. - - - id: ruby - content: | - To specify equality condition on an array, use the query - document ``{ => }`` where ```` is the - exact array to match, including the order of the elements. - - - id: scala - content: | - To specify equality condition on an array, use the query - document ``equal( , )`` where ```` is - the exact array to match, including the order of the - elements. - - - id: csharp - content: | - To specify equality condition on an array, construct a filter - using the :csharp-api:`Eq - ` method: - - .. code-block:: c# - - Builders.Filter.Eq(, ) - - ```` is the exact array to match, including the - order of the elements. + .. tabs-drivers:: + + tabs: + - id: shell + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: compass + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: python + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: motor + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: java-sync + content: | + To specify equality condition on an array, use the query + document ``eq( , )`` where ```` is + the exact array to match, including the order of the + elements. + + - id: java-async + content: | + To specify equality condition on an array, use the query + document ``eq( , )`` where ```` is + the exact array to match, including the order of the + elements. + + - id: nodejs + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: php + content: | + To specify equality condition on an array, use the query + document ``[ => ]`` where ```` is the + exact array to match, including the order of the elements. + + - id: perl + content: | + To specify equality condition on an array, use the query + document ``{ => }`` where ```` is the + exact array to match, including the order of the elements. + + - id: ruby + content: | + To specify equality condition on an array, use the query + document ``{ => }`` where ```` is the + exact array to match, including the order of the elements. + + - id: scala + content: | + To specify equality condition on an array, use the query + document ``equal( , )`` where ```` is + the exact array to match, including the order of the + elements. + + - id: csharp + content: | + To specify equality condition on an array, construct a filter + using the :csharp-api:`Eq + ` method: + + .. code-block:: c# + + Builders.Filter.Eq(, ) + + ```` is the exact array to match, including the + order of the elements. --- ref: filter-equality-array-element content: | - .. tabs-drivers:: - - tabs: - - id: shell - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ : }`` where ```` is the element value. - - - id: python - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ : }`` where ```` is the element value. - - - id: motor - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ : }`` where ```` is the element value. - - - id: java-sync - content: | - - To query if the array field contains at least *one* element - with the specified value, use the filter - ``eq( , )`` where ```` is the element value. - - - id: java-async - content: | - - To query if the array field contains at least *one* element - with the specified value, use the filter - ``eq( , )`` where value is the element value. - - - id: nodejs - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ : }`` where ```` is the element value. - - - id: php - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``[ => ]`` where ```` is the element value. - - - id: perl - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - - ``{ => }`` where value is the element value. - - - id: ruby - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ => }`` where ```` is the element value. - - - id: scala - content: | - - To query if the array field contains at least *one* element - with the specified value, use the filter - ``equal( , )`` where ```` is the element value. - - - id: csharp - content: | - To query if the array field contains at least *one* element - with the specified value, construct a filter using the - :csharp-api:`Eq - ` method: - - .. code-block:: c# - - Builders.Filter.Eq(, ) - - ```` is the element value to match. + .. tabs-drivers:: + + tabs: + - id: shell + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ : }`` where ```` is the element value. + + - id: python + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ : }`` where ```` is the element value. + + - id: motor + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ : }`` where ```` is the element value. + + - id: java-sync + content: | + + To query if the array field contains at least *one* element + with the specified value, use the filter + ``eq( , )`` where ```` is the element value. + + - id: java-async + content: | + + To query if the array field contains at least *one* element + with the specified value, use the filter + ``eq( , )`` where value is the element value. + + - id: nodejs + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ : }`` where ```` is the element value. + + - id: php + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``[ => ]`` where ```` is the element value. + + - id: perl + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + + ``{ => }`` where value is the element value. + + - id: ruby + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ => }`` where ```` is the element value. + + - id: scala + content: | + + To query if the array field contains at least *one* element + with the specified value, use the filter + ``equal( , )`` where ```` is the element value. + + - id: csharp + content: | + To query if the array field contains at least *one* element + with the specified value, construct a filter using the + :csharp-api:`Eq + ` method: + + .. code-block:: c# + + Builders.Filter.Eq(, ) + + ```` is the element value to match. --- ref: filter-query-operators content: | - .. tabs-drivers:: + .. tabs-drivers:: + + tabs: + - id: shell + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: + + .. code-block:: javascript + + { : { : }, ... } + + - id: compass + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: - tabs: - - id: shell - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: + .. code-block:: javascript - .. code-block:: javascript + { : { : }, ... } - { : { : }, ... } + - id: python + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: - - id: compass - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: + .. code-block:: python - .. code-block:: javascript + { : { : }, ... } - { : { : }, ... } + - id: motor + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: - - id: python - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: + .. code-block:: python - .. code-block:: python + { : { : }, ... } - { : { : }, ... } + - id: java-sync + content: | - - id: motor - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: + In addition to the equality condition, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the + com.mongodb.client.model.Filters_ helper methods to + facilitate the creation of filter documents. For example: - .. code-block:: python + .. code-block:: java - { : { : }, ... } + and(gte(, ), lt(, ), eq(, )) - - id: java-sync - content: | + - id: java-async + content: | - In addition to the equality condition, MongoDB provides - various :ref:`query operators ` to specify - filter conditions. Use the - com.mongodb.client.model.Filters_ helper methods to - facilitate the creation of filter documents. For example: + In addition to the equality condition, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the + com.mongodb.client.model.Filters_ helper methods to + facilitate the creation of filter documents. For example: - .. code-block:: java + .. code-block:: java - and(gte(, ), lt(, ), eq(, )) + and(gte(, ), lt(, ), eq(, )) - - id: java-async - content: | + - id: kotlin-coroutine + content: | - In addition to the equality condition, MongoDB provides - various :ref:`query operators ` to specify - filter conditions. Use the - com.mongodb.client.model.Filters_ helper methods to - facilitate the creation of filter documents. For example: + In addition to the equality condition, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the `com.mongodb.client.model.Filters <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/model/Filters.html>`__ helper methods to + facilitate the creation of filter documents. For example: - .. code-block:: java + .. code-block:: kotlin - and(gte(, ), lt(, ), eq(, )) + and(gte(, ), lt(, ), eq(, )) - - id: nodejs - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: + - id: nodejs + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: - .. code-block:: javascript + .. code-block:: javascript - { : { : }, ... } + { : { : }, ... } - - id: php - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: + - id: php + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: - .. code-block:: php + .. code-block:: php - [ => [ => ], ... ] + [ => [ => ], ... ] - - id: perl - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: + - id: perl + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: - .. code-block:: perl + .. code-block:: perl - { => { => }, ... } + { => { => }, ... } - - id: ruby - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: + - id: ruby + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: - .. code-block:: ruby + .. code-block:: ruby - { => { => }, ... } + { => { => }, ... } - - id: scala - content: | + - id: scala + content: | - In addition to the equality condition, MongoDB provides - various :ref:`query operators ` to specify - filter conditions. Use the - ``com.mongodb.client.model.Filters_`` helper methods to - facilitate the creation of filter documents. For example: + In addition to the equality condition, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the + ``com.mongodb.client.model.Filters_`` helper methods to + facilitate the creation of filter documents. For example: - .. code-block:: scala + .. code-block:: scala - and(gte(, ), lt(, ), equal(, )) + and(gte(, ), lt(, ), equal(, )) - - id: csharp - content: | - In addition to the equality filter, MongoDB provides - various :ref:`query operators ` to specify - filter conditions. Use the - :csharp-api:`FilterDefinitionBuilder ` - methods to create a filter document. For example: + - id: csharp + content: | + In addition to the equality filter, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the + :csharp-api:`FilterDefinitionBuilder ` + methods to create a filter document. For example: - .. code-block:: c# + .. code-block:: c# - var builder = Builders.Filter; - builder.And(builder.Eq(, ), builder.Lt(, )); + var builder = Builders.Filter; + builder.And(builder.Eq(, ), builder.Lt(, )); --- ref: filter-query-operators-array content: | - .. tabs-drivers:: + .. tabs-drivers:: - tabs: - - id: shell - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + tabs: + - id: shell + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: - .. code-block:: javascript + .. code-block:: javascript - { : { : , ... } } + { : { : , ... } } - - id: compass - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + - id: compass + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: - .. code-block:: javascript + .. code-block:: javascript - { : { : , ... } } + { : { : , ... } } - - id: python - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + - id: python + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: - .. code-block:: python + .. code-block:: python - { : { : , ... } } + { : { : , ... } } - - id: motor - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + - id: motor + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: - .. code-block:: python + .. code-block:: python - { : { : , ... } } + { : { : , ... } } - - id: java-sync - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `. For example: + - id: java-sync + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `. For example: - .. code-block:: java + .. code-block:: java - and(gte(, ), lt(, ) ...) + and(gte(, ), lt(, ) ...) - - id: java-async - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `. For example: + - id: java-async + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `. For example: - .. code-block:: java + .. code-block:: java - and(gte(, ), lt(, ) ...) + and(gte(, ), lt(, ) ...) - - id: nodejs - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + - id: nodejs + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: - .. code-block:: javascript + .. code-block:: javascript - { : { : , ... } } + { : { : , ... } } - - id: php - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + - id: php + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: - .. code-block:: php + .. code-block:: php - [ => [ => , ... ] ] + [ => [ => , ... ] ] - - id: perl - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + - id: perl + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: - .. code-block:: perl + .. code-block:: perl - { => { => , ... } } + { => { => , ... } } - - id: ruby - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + - id: ruby + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: - .. code-block:: ruby + .. code-block:: ruby - { => { => , ... } } + { => { => , ... } } - - id: scala - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + - id: scala + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: - .. code-block:: scala + .. code-block:: scala - and(gte(, ), lt(, ) ...) + and(gte(, ), lt(, ) ...) - - id: csharp - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `. For example: + - id: csharp + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `. For example: - .. code-block:: c# + .. code-block:: c# - var builder = Builders.Filter; - builder.And(builder.Eq(, ), builder.Lt(, )); -... + var builder = Builders.Filter; + builder.And(builder.Eq(, ), builder.Lt(, )); diff --git a/source/tutorial/query-documents.txt b/source/tutorial/query-documents.txt index fca578db560..4ca54ded140 100644 --- a/source/tutorial/query-documents.txt +++ b/source/tutorial/query-documents.txt @@ -12,11 +12,11 @@ Query Documents .. facet:: :name: programming_language - :values: csharp, go, java, go, javascript/typescript, perl, php, python, ruby, scala, shell + :values: csharp, go, java, go, javascript/typescript, perl, php, python, ruby, scala, shell, kotlin .. meta:: :description: MongoDB Manual: how to query documents and top-level fields, perform equality match, query with query operators, and specify compound query conditions. - :keywords: code example, compass, java sync, java async, reactive streams, motor, atlas, drivers, node.js + :keywords: code example, compass, java sync, java async, reactive streams, motor, atlas, drivers, node.js, kotlin coroutine .. contents:: On this page :local: @@ -83,6 +83,12 @@ the following SQL statement: `com.mongodb.reactivestreams.client.MongoCollection.find `_. + - id: kotlin-coroutine + content: | + For more information on the syntax of the method, see + `MongoCollection.find() + <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/find.html>`__. + - id: nodejs content: | @@ -347,6 +353,14 @@ Cursor returns an instance of the `com.mongodb.reactivestreams.client.FindPublisher `_ interface. + - id: kotlin-coroutine + content: | + The `MongoCollection.find() + <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/find.html>`__ method returns an + instance of the + `FindFlow <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-find-flow/index.html>`__ + class. + - id: nodejs content: | The :node-api:`Collection.find() ` method @@ -507,6 +521,18 @@ Additional Methods and Options `_ for more information. + - id: kotlin-coroutine + content: | + + The following methods can also read documents from a collection: + + - In an :ref:`aggregation pipeline `, + the :pipeline:`$match` pipeline stage allows you to perform + MongoDB queries. See the :driver:`Kotlin Coroutine Driver + Find Operation Examples + ` + to learn more. + - id: nodejs content: | From acceababd7ebe444b7a8510aeea7dcc3e0e173fb Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Fri, 23 Feb 2024 08:56:01 -0800 Subject: [PATCH 163/308] DOCSP-35407 Document usage of MONGODB_CONFIG_OVERRIDE_NOFORK (#6445) * DOCSP-35407 Document usage of MONGODB_CONFIG_OVERRIDE_NOFORK * DOCSP-35407 updates for AQ's feedback --- .gitignore | 4 +++- source/reference/configuration-options.txt | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bc3bbd949ca..15051a9145e 100644 --- a/.gitignore +++ b/.gitignore @@ -85,4 +85,6 @@ primer/source/includes/table-linux-kernel-version-production.yaml venv .vscode changelogs/.mongodb-jira.yaml -source/includes/qe-tutorials/csharp/obj/ \ No newline at end of file +source/includes/qe-tutorials/csharp/obj/ +source/includes/sdk/go/markdown/ +source/includes/mongosql/markdown/ diff --git a/source/reference/configuration-options.txt b/source/reference/configuration-options.txt index 8cdae9462b2..67376eb3d37 100644 --- a/source/reference/configuration-options.txt +++ b/source/reference/configuration-options.txt @@ -78,7 +78,8 @@ settings that you may adapt to your local configuration: The Linux package init scripts included in the official MongoDB packages depend on specific values for :setting:`systemLog.path`, :setting:`storage.dbPath`, and -:setting:`processManagement.fork`. If you modify these settings in the default +:setting:`processManagement.fork` or ``MONGODB_CONFIG_OVERRIDE_NOFORK`` +system environment variable. If you modify these settings in the default configuration file, :binary:`~bin.mongod` may not start. .. [#yaml-json] YAML is a superset of :term:`JSON`. @@ -915,6 +916,14 @@ Core Options The :setting:`processManagement.fork` option is not supported on Windows. .. include:: /includes/extracts/linux-config-expectations-processmanagement-fork.rst + + .. note:: + + Alternatively, you can set the ``MONGODB_CONFIG_OVERRIDE_NOFORK`` + environment variable on your system to ``true`` to run the + :binary:`~bin.mongos` or :binary:`~bin.mongod` process in the + background. If you set the environment variable, it overrides the + setting for ``processManagement.fork``. .. setting:: processManagement.pidFilePath From 492e61ced6065f8e1db2b7667a429b86c0f5f3e7 Mon Sep 17 00:00:00 2001 From: Sarah Simpers <82042374+sarahsimpers@users.noreply.github.com> Date: Fri, 23 Feb 2024 12:54:26 -0500 Subject: [PATCH 164/308] (DOCSP-37107) Updates M80 cluster connection limit for Atlas (#6474) --- source/reference/limits.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/limits.txt b/source/reference/limits.txt index 67a4545510c..a9d8eba2866 100644 --- a/source/reference/limits.txt +++ b/source/reference/limits.txt @@ -210,7 +210,7 @@ tiers: - 32000 * - ``M80`` - - 96000 + - 64000 * - ``M140`` - 96000 From 7b4627e85de1eaa2f620995250ee1297061ab566 Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Fri, 23 Feb 2024 13:11:15 -0500 Subject: [PATCH 165/308] DOCSP-34194: kotlin embedded query (#6501) * DOCSP-34194: kotlin embedded query * update tag * JM grammar fix --- .../includes/driver-examples/driver-example-query-14.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-15.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-16.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-17.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-18.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-19.rst | 9 +++++++++ source/includes/extracts-filter.yaml | 7 +++++++ source/tutorial/query-embedded-documents.txt | 4 ++-- 8 files changed, 63 insertions(+), 2 deletions(-) diff --git a/source/includes/driver-examples/driver-example-query-14.rst b/source/includes/driver-examples/driver-example-query-14.rst index 5cab3bfb388..21d184fa58a 100644 --- a/source/includes/driver-examples/driver-example-query-14.rst +++ b/source/includes/driver-examples/driver-example-query-14.rst @@ -65,6 +65,15 @@ :start-after: Start Example 14 :end-before: End Example 14 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 14 + :end-before: End Example 14 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_embedded_documents.js diff --git a/source/includes/driver-examples/driver-example-query-15.rst b/source/includes/driver-examples/driver-example-query-15.rst index 041dd727623..bffdfd0695d 100644 --- a/source/includes/driver-examples/driver-example-query-15.rst +++ b/source/includes/driver-examples/driver-example-query-15.rst @@ -57,6 +57,15 @@ :start-after: Start Example 15 :end-before: End Example 15 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 15 + :end-before: End Example 15 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_embedded_documents.js diff --git a/source/includes/driver-examples/driver-example-query-16.rst b/source/includes/driver-examples/driver-example-query-16.rst index 55f09bcef5b..e406f3b5736 100644 --- a/source/includes/driver-examples/driver-example-query-16.rst +++ b/source/includes/driver-examples/driver-example-query-16.rst @@ -49,6 +49,15 @@ :start-after: Start Example 16 :end-before: End Example 16 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 16 + :end-before: End Example 16 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_embedded_documents.js diff --git a/source/includes/driver-examples/driver-example-query-17.rst b/source/includes/driver-examples/driver-example-query-17.rst index 47e5dd8a677..01adaa36683 100644 --- a/source/includes/driver-examples/driver-example-query-17.rst +++ b/source/includes/driver-examples/driver-example-query-17.rst @@ -57,6 +57,15 @@ :start-after: Start Example 17 :end-before: End Example 17 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 17 + :end-before: End Example 17 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_embedded_documents.js diff --git a/source/includes/driver-examples/driver-example-query-18.rst b/source/includes/driver-examples/driver-example-query-18.rst index eb257d00a00..1b632eddafb 100644 --- a/source/includes/driver-examples/driver-example-query-18.rst +++ b/source/includes/driver-examples/driver-example-query-18.rst @@ -57,6 +57,15 @@ :start-after: Start Example 18 :end-before: End Example 18 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 18 + :end-before: End Example 18 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_embedded_documents.js diff --git a/source/includes/driver-examples/driver-example-query-19.rst b/source/includes/driver-examples/driver-example-query-19.rst index 2a56ddc6322..77b153bdbfe 100644 --- a/source/includes/driver-examples/driver-example-query-19.rst +++ b/source/includes/driver-examples/driver-example-query-19.rst @@ -57,6 +57,15 @@ :start-after: Start Example 19 :end-before: End Example 19 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 19 + :end-before: End Example 19 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_embedded_documents.js diff --git a/source/includes/extracts-filter.yaml b/source/includes/extracts-filter.yaml index f6449108739..a1a203d592b 100644 --- a/source/includes/extracts-filter.yaml +++ b/source/includes/extracts-filter.yaml @@ -186,6 +186,13 @@ content: | ``eq( , )`` where ```` is the document to match. + - id: kotlin-coroutine + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the filter document + ``eq( , )``, where ```` is the document + to match. + - id: nodejs content: | To specify an equality condition on a field that is an diff --git a/source/tutorial/query-embedded-documents.txt b/source/tutorial/query-embedded-documents.txt index 68e3cd25c7b..b4702caa226 100644 --- a/source/tutorial/query-embedded-documents.txt +++ b/source/tutorial/query-embedded-documents.txt @@ -12,11 +12,11 @@ Query on Embedded/Nested Documents .. facet:: :name: programming_language - :values: shell, csharp, go, java, python, perl, php, ruby, scala, javascript/typescript + :values: shell, csharp, go, java, python, perl, php, ruby, scala, javascript/typescript, kotlin .. meta:: :description: MongoDB Manual: How to query or select on embedded or nested documents, subdocuments and fields. - :keywords: filter, nested documents, subdocuments, nested fields, compound conditions, motor, java sync, java async, reactive streams, code example, node.js, compass + :keywords: filter, nested documents, subdocuments, nested fields, compound conditions, motor, java sync, java async, reactive streams, code example, node.js, compass, kotlin coroutine .. contents:: On this page :local: From 92ed57d66fcaeefd70b74d6824dd3044b913ced9 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Fri, 23 Feb 2024 13:28:08 -0500 Subject: [PATCH 166/308] DOCSP-36301 Move duplicate key exception info to upsert page (#6332) * WIP * remove 4.2 info * formatting * formatting * first draft of review edits * edits * tweaks * edits * formatting * typo * edit * edits * review edits * formatting fix * remove extra unique index links --- source/core/retryable-writes.txt | 182 +----------------- .../extracts-upsert-unique-index.yaml | 119 +++++++++--- .../reference/method/db.collection.update.txt | 7 +- 3 files changed, 104 insertions(+), 204 deletions(-) diff --git a/source/core/retryable-writes.txt b/source/core/retryable-writes.txt index e43f983e35c..e8a2492a458 100644 --- a/source/core/retryable-writes.txt +++ b/source/core/retryable-writes.txt @@ -16,7 +16,6 @@ Retryable writes allow MongoDB drivers to automatically retry certain write operations a single time if they encounter network errors, or if they cannot find a healthy :term:`primary` in the :ref:`replica set ` or :ref:`sharded cluster `. -[#duplicate-key-update]_ Prerequisites ------------- @@ -102,15 +101,15 @@ cannot be :writeconcern:`{w: 0} <\>`. * - | :method:`db.collection.insertOne()` | :method:`db.collection.insertMany()` - - Insert operations. + - Insert operations * - | :method:`db.collection.updateOne()` | :method:`db.collection.replaceOne()` - - Single-document update operations. [#duplicate-key-update]_ + - Single-document update operations * - | :method:`db.collection.deleteOne()` | :method:`db.collection.remove()` where ``justOne`` is ``true`` - - Single document delete operations. + - Single document delete operations * - | :method:`db.collection.findAndModify()` | :method:`db.collection.findOneAndDelete()` @@ -144,24 +143,6 @@ cannot be :writeconcern:`{w: 0} <\>`. any multi-document write operations, such as ``update`` which specifies ``true`` for the ``multi`` option. -.. note:: Updates to Shard Key Values - - Starting in MongoDB 4.2, you can update a document's shard key value - (unless the shard key field is the immutable ``_id`` field) by - issuing single-document update/findAndModify operations either as a - retryable write or in a :ref:`transaction `. For - details, see :ref:`update-shard-key`. - -.. [#duplicate-key-update] - - MongoDB 4.2 will retry certain single-document upserts - (update with ``upsert: true`` and ``multi: false``) that encounter a - duplicate key exception. See :ref:`retryable-update-upsert` for - conditions. - - Prior to MongoDB 4.2, MongoDB would not retry upsert operations - that encountered a duplicate key error. - Behavior -------- @@ -190,163 +171,6 @@ the failover period exceeds :urioption:`serverSelectionTimeoutMS`. applications starts responding (without a restart), the write operation may be retried and applied again. -.. _retryable-update-upsert: - -Duplicate Key Errors on Upsert -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -MongoDB 4.2 will retry single-document upsert operations -(i.e ``upsert : true`` and ``multi : false``) that -fail due to a duplicate key error *only if* the operation meets -*all* of the following conditions: - -- The target collection has a unique index that caused the duplicate key - error. - -- The update match condition is either: - - - A single equality predicate - - ``{ "fieldA" : "valueA" }``, - - *or* - - - a logical AND of equality predicates - - ``{ "fieldA" : "valueA", "fieldB" : "valueB" }`` - -- The set of fields in the unique index key pattern matches the set - of fields in the update query predicate. - -- The update operation does not modify any of the fields in the - query predicate. - -The following table contains examples of upsert operations that -the server can or cannot retry on a duplicate key error: - -.. list-table:: - :header-rows: 1 - :widths: 30 40 30 - - * - Unique Index Key Pattern - - Update Operation - - Retryable - - * - .. code-block:: javascript - :copyable: false - - { _id : 1 } - - .. code-block:: javascript - :copyable: false - - db.collName.updateOne( - { _id : ObjectId("1aa1c1efb123f14aaa167aaa") }, - { $set : { fieldA : 25 } }, - { upsert : true } - ) - - Yes - - * - .. code-block:: javascript - :copyable: false - - { fieldA : 1 } - - .. code-block:: javascript - :copyable: false - - db.collName.updateOne( - { fieldA : { $in : [ 25 ] } }, - { $set : { fieldB : "someValue" } }, - { upsert : true } - ) - - Yes - - * - .. code-block:: javascript - :copyable: false - - { - fieldA : 1, - fieldB : 1 - } - - .. code-block:: javascript - :copyable: false - - db.collName.updateOne( - { fieldA : 25, fieldB : "someValue" }, - { $set : { fieldC : false } }, - { upsert : true } - ) - - Yes - - * - .. code-block:: javascript - :copyable: false - - { fieldA : 1 } - - .. code-block:: javascript - :copyable: false - - db.collName.updateOne( - { fieldA : { $lte : 25 } }, - { $set : { fieldC : true } }, - { upsert : true } - ) - - No - - The query predicate on ``fieldA`` is not an equality - - * - .. code-block:: javascript - :copyable: false - - { fieldA : 1 } - - .. code-block:: javascript - :copyable: false - - db.collName.updateOne( - { fieldA : { $in : [ 25 ] } }, - { $set : { fieldA : 20 } }, - { upsert : true } - ) - - No - - The update operation modifies fields specified in the - query predicate. - - * - .. code-block:: javascript - :copyable: false - - { _id : 1 } - - .. code-block:: javascript - :copyable: false - - db.collName.updateOne( - { fieldA : { $in : [ 25 ] } }, - { $set : { fieldA : 20 } }, - { upsert : true } - ) - - No - - The set of query predicate fields (``fieldA``) does not - match the set of index key fields (``_id``). - - * - .. code-block:: javascript - :copyable: false - - { fieldA : 1 } - - .. code-block:: javascript - :copyable: false - - db.collName.updateOne( - { fieldA : 25, fieldC : true }, - { $set : { fieldD : false } }, - { upsert : true } - ) - - No - - The set of query predicate fields (``fieldA``, ``fieldC``) - does not match the set of index key fields (``fieldA``). - -Prior to MongoDB 4.2, MongoDB retryable writes did not support -retrying upserts which failed due to duplicate key errors. - Diagnostics ~~~~~~~~~~~ diff --git a/source/includes/extracts-upsert-unique-index.yaml b/source/includes/extracts-upsert-unique-index.yaml index 70304426a80..94da321373a 100644 --- a/source/includes/extracts-upsert-unique-index.yaml +++ b/source/includes/extracts-upsert-unique-index.yaml @@ -1,12 +1,8 @@ ref: _upsert-unique-index-base content: | - When using the {{upsert}} option with the {{command}} - {{commandOrMethod}}, **and not** using a :ref:`unique index - ` on the query field(s), multiple - instances of {{aOrAn}} {{command}} operation with similar query - field(s) could result in duplicate documents being inserted in - certain circumstances. + Upserts can create duplicate documents, unless there is a + :ref:`unique index ` to prevent duplicates. Consider an example where no document with the name ``Andy`` exists and multiple clients issue the following command at roughly the same @@ -14,26 +10,105 @@ content: | {{codeExample}} - If all {{command}} operations finish the query phase - before any client successfully inserts data, **and** there is no - :ref:`unique index ` on the ``name`` field, each - {{command}} operation may result in an insert, creating multiple - documents with ``name: Andy``. - - To ensure that only one such document is created, and the other - {{command}} operations update this new document instead, create a - :ref:`unique index ` on the ``name`` field. This - guarantees that only one document with ``name: Andy`` is permitted - in the collection. - - With this unique index in place, the multiple {{command}} operations - now exhibit the following behavior: + If all {{command}} operations finish the query phase before any + client successfully inserts data, **and** there is no unique index on + the ``name`` field, each {{command}} operation may result in an + insert, creating multiple documents with ``name: Andy``. + + A unique index on the ``name`` field ensures that only one document + is created. With a unique index in place, the multiple {{command}} + operations now exhibit the following behavior: - Exactly one {{command}} operation will successfully insert a new document. - - All other {{command}} operations will update the newly-inserted - document, incrementing the ``score`` value. + - Other {{command}} operations either update the newly-inserted + document or fail due to a unique key collision. + + In order for other {{command}} operations to update the + newly-inserted document, **all** of the following conditions must + be met: + + - The target collection has a unique index that would cause a + duplicate key error. + + - The update operation is not ``updateMany`` or ``multi`` is + ``false``. + + - The update match condition is either: + + - A single equality predicate. For example ``{ "fieldA" : "valueA" }`` + + - A logical AND of equality predicates. For example ``{ "fieldA" : + "valueA", "fieldB" : "valueB" }`` + + - The fields in the equality predicate match the fields in the + unique index key pattern. + + - The update operation does not modify any fields in the + unique index key pattern. + + The following table shows examples of ``upsert`` operations that, + when a key collision occurs, either result in an update or fail. + + .. list-table:: + :header-rows: 1 + :widths: 30 40 30 + + * - Unique Index Key Pattern + - Update Operation + - Result + + * - .. code-block:: javascript + :copyable: false + + { name : 1 } + + - .. code-block:: javascript + :copyable: false + + db.people.updateOne( + { name: "Andy" }, + { $inc: { score: 1 } }, + { upsert: true } + ) + - The ``score`` field of the matched document is incremented by + 1. + + * - .. code-block:: javascript + :copyable: false + + { name : 1 } + + - .. code-block:: javascript + :copyable: false + + db.people.updateOne( + { name: { $ne: "Joe" } }, + { $set: { name: "Andy" } }, + { upsert: true } + ) + + - The operation fails because it modifies the field in the + unique index key pattern (``name``). + + * - .. code-block:: javascript + :copyable: false + + { name : 1 } + - .. code-block:: javascript + :copyable: false + + db.people.updateOne( + { name: "Andy", email: "andy@xyz.com" }, + { $set: { active: false } }, + { upsert: true } + ) + - The operation fails because the equality predicate fields + (``name``, ``email``) do not match the index key field + (``name``). + + --- ref: upsert-unique-index-findAndModify-command diff --git a/source/reference/method/db.collection.update.txt b/source/reference/method/db.collection.update.txt index 96d2d10b160..300b0e9ab4f 100644 --- a/source/reference/method/db.collection.update.txt +++ b/source/reference/method/db.collection.update.txt @@ -1005,9 +1005,11 @@ with :method:`~db.collection.update()`. :method:`WriteResult()` .. _update-with-unique-indexes: +.. _retryable-update-upsert: +.. _upsert-duplicate-key-error: -Upsert with Unique Index -```````````````````````` +Upsert with Duplicate Values +```````````````````````````` .. include:: /includes/extracts/upsert-unique-index-update-method.rst @@ -1522,4 +1524,3 @@ field: .. seealso:: :method:`WriteResult.hasWriteError()` - From 088fbc55e9cc900ea4ab257fefaf23d7e2bc310d Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Fri, 23 Feb 2024 17:06:56 -0500 Subject: [PATCH 167/308] DOCSP-37138 remove OCSP info from TLS tutorial (#6513) * DOCSP-37138 remove OSCP info from TLS tutorial * update ssl section * cleanup * add refs * add missing word * standardization * present tense * typos * typo --- .../block-revoked-certificates-intro.rst | 3 + source/tutorial/configure-ssl.txt | 143 ++++++++---------- 2 files changed, 63 insertions(+), 83 deletions(-) create mode 100644 source/includes/security/block-revoked-certificates-intro.rst diff --git a/source/includes/security/block-revoked-certificates-intro.rst b/source/includes/security/block-revoked-certificates-intro.rst new file mode 100644 index 00000000000..0415be53db7 --- /dev/null +++ b/source/includes/security/block-revoked-certificates-intro.rst @@ -0,0 +1,3 @@ +To prevent clients with revoked certificates from connecting to the +:binary:`~bin.mongod` or :binary:`~bin.mongos` instance, you can use a +Certificate Revocation List (CRL). diff --git a/source/tutorial/configure-ssl.txt b/source/tutorial/configure-ssl.txt index eed56b9102c..2b4469c5d72 100644 --- a/source/tutorial/configure-ssl.txt +++ b/source/tutorial/configure-ssl.txt @@ -250,16 +250,15 @@ settings ` in your bindIp: localhost,mongodb0.example.net port: 27017 -A :binary:`~bin.mongod` instance that uses the above configuration -can only use TLS/SSL connections: +A :binary:`~bin.mongod` instance that uses the above configuration can +only accept TLS/SSL connections: .. code-block:: bash mongod --config -That is, clients must specify TLS/SSL connections. See -:ref:`tls-client-connection-only` for more information on -connecting with TLS/SSL. +See :ref:`tls-client-connection-only` for more information on connecting +with TLS/SSL. .. seealso:: @@ -372,16 +371,16 @@ For example, consider the following :ref:`configuration file bindIp: localhost,mongodb0.example.net port: 27017 -A :binary:`~bin.mongod` instance that uses the above configuration -can only use TLS/SSL connections and requires valid certificate from +A :binary:`~bin.mongod` instance that uses the above configuration can +only accept TLS/SSL connections and requires a valid certificate from its clients: .. code-block:: bash mongod --config -That is, clients must specify TLS/SSL connections and presents its -certificate key file to the instance. See +Clients must specify TLS/SSL connections and present their certificate +key file to the instance. See :ref:`mongo-connect-require-client-certificates-tls` for more information on connecting with TLS/SSL. @@ -399,6 +398,7 @@ information on connecting with TLS/SSL. :option:`--tlsCertificateKeyFile `, :option:`--tlsCAFile `. +.. _block-revoked-certs-tls: Block Revoked Certificates for Clients `````````````````````````````````````` @@ -409,46 +409,36 @@ Block Revoked Certificates for Clients MongoDB 4.2). For procedures using the ``net.ssl`` settings, see :ref:`configure-ssl`. -To prevent clients with revoked certificates from connecting to the -:binary:`~bin.mongod` or :binary:`~bin.mongos` instance, you can use: +.. include:: /includes/security/block-revoked-certificates-intro.rst -- Online Certificate Status Protocol (OCSP) - Starting in version 4.4, to check for certificate revocation, - MongoDB :parameter:`enables ` the use of OCSP - (Online Certificate Status Protocol) by default as an alternative - to specifying a CRL file or using the :setting:`system SSL - certificate store `. +To specify a :abbr:`CRL (Certificate Revocation List)` file, include +:setting:`net.tls.CRLFile` set to a file that contains revoked +certificates. - In versions 4.0 and 4.2, the use of OCSP is available only - through the use of :setting:`system certificate store - ` on Windows or macOS. - -- Certificate Revocation List (CRL) - To specify a CRL file, include - :setting:`net.tls.CRLFile` set to a file that contains revoked - certificates. - - For example: +For example: - .. code-block:: yaml - :emphasize-lines: 6 +.. code-block:: yaml + :emphasize-lines: 6 - net: - tls: - mode: requireTLS - certificateKeyFile: /etc/ssl/mongodb.pem - CAFile: /etc/ssl/caToValidateClientCertificates.pem - CRLFile: /etc/ssl/revokedCertificates.pem + net: + tls: + mode: requireTLS + certificateKeyFile: /etc/ssl/mongodb.pem + CAFile: /etc/ssl/caToValidateClientCertificates.pem + CRLFile: /etc/ssl/revokedCertificates.pem - Clients that present certificates that are listed in the - :file:`/etc/ssl/revokedCertificates.pem` will not be able to connect. +Clients that present certificates that are listed in the +:file:`/etc/ssl/revokedCertificates.pem` file are not able to connect. - .. seealso:: +.. seealso:: - You can also configure the revoked certificate list using the command-line option. + You can also configure the revoked certificate list using the + command-line option. - - For :binary:`~bin.mongod`, see :option:`--tlsCRLFile `. - - For :binary:`~bin.mongos`, see :option:`--tlsCRLFile `. + - For :binary:`~bin.mongod`, see :option:`--tlsCRLFile `. + - For :binary:`~bin.mongos`, see :option:`--tlsCRLFile `. .. _ssl-mongod-weak-certification: @@ -801,16 +791,15 @@ your :binary:`mongod` / :binary:`mongos` instance's bindIp: localhost,mongodb0.example.net port: 27017 -A :binary:`~bin.mongod` instance that uses the above configuration -can only use TLS/SSL connections: +A :binary:`~bin.mongod` instance that uses the above configuration can +only accept TLS/SSL connections: .. code-block:: bash mongod --config -That is, clients must specify TLS/SSL connections. See -:ref:`tls-client-connection-only` for more information on -connecting with TLS/SSL. +See :ref:`tls-client-connection-only` for more information on connecting +with TLS/SSL. .. seealso:: @@ -914,16 +903,16 @@ For example, consider the following :ref:`configuration file bindIp: localhost,mongodb0.example.net port: 27017 -A :binary:`~bin.mongod` instance that uses the above configuration -can only use TLS/SSL connections and requires valid certificate from +A :binary:`~bin.mongod` instance that uses the above configuration can +only accept TLS/SSL connections and requires a valid certificate from its clients: .. code-block:: bash mongod --config -That is, clients must specify TLS/SSL connections and present their -certificate key file to the instance. See +Clients must specify TLS/SSL connections and present their certificate +key file to the instance. See :ref:`mongo-connect-require-client-certificates-tls` for more information on connecting with TLS/SSL. @@ -941,50 +930,38 @@ information on connecting with TLS/SSL. :option:`--sslPEMKeyFile `, and :option:`--sslCAFile `. +.. _block-revoked-certs-ssl: + Block Revoked Certificates for Clients `````````````````````````````````````` -To prevent clients with revoked certificates from connecting to the -:binary:`~bin.mongod` or :binary:`~bin.mongos` instance, you can use: - -- Online Certificate Status Protocol (OCSP) - Starting in version 4.4, to check for certificate revocation, - MongoDB :parameter:`enables ` the use of OCSP - (Online Certificate Status Protocol) by default as an alternative - to specifying a CRL file or using the :setting:`system SSL - certificate store `. +.. include:: /includes/security/block-revoked-certificates-intro.rst +To specify a :abbr:`CRL (Certificate Revocation List)` file, include +:setting:`net.ssl.CRLFile` set to a file that contains revoked +certificates. - In versions 4.0 and 4.2, the use of OCSP is available only - through the use of :setting:`system certificate store - ` on Windows or macOS. - -- Certificate Revocation List (CRL) - To specify a CRL file, include - :setting:`net.ssl.CRLFile` set to a file that contains revoked - certificates. - - For example: +For example: - .. code-block:: yaml - :emphasize-lines: 6 +.. code-block:: yaml + :emphasize-lines: 6 - net: - ssl: - mode: requireSSL - PEMKeyFile: /etc/ssl/mongodb.pem - CAFile: /etc/ssl/caToValidateClientCertificates.pem - CRLFile: /etc/ssl/revokedCertificates.pem + net: + ssl: + mode: requireSSL + PEMKeyFile: /etc/ssl/mongodb.pem + CAFile: /etc/ssl/caToValidateClientCertificates.pem + CRLFile: /etc/ssl/revokedCertificates.pem - Clients that present certificates that are listed in the - :file:`/etc/ssl/revokedCertificates.pem` will not be able to connect. +Clients that present certificates that are listed in the +:file:`/etc/ssl/revokedCertificates.pem` file are not able to connect. - .. seealso:: +.. seealso:: - You can also configure the revoked certificate list using the command-line option. + You can also configure the revoked certificate list using the command-line option. - - For :binary:`~bin.mongod`, see :option:`--sslCRLFile `. - - For :binary:`~bin.mongos`, see :option:`--sslCRLFile `. + - For :binary:`~bin.mongod`, see :option:`--sslCRLFile `. + - For :binary:`~bin.mongos`, see :option:`--sslCRLFile `. Validate Only if a Client Presents a Certificate ```````````````````````````````````````````````` From f458a3ce4d8157433b3bb195b6d5662867ba503a Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Fri, 23 Feb 2024 16:31:44 -0600 Subject: [PATCH 168/308] DOCSP-34843 config Database Clarification (#6411) * DOCSP-34843 Adds note for config on mongos * Moves the note under intro * Fixes build issue * Adds facet * minor edits * minor edits * Fixes per Lauren --- source/reference/config-database.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/source/reference/config-database.txt b/source/reference/config-database.txt index f484d1a2a2c..9a8f7f7128e 100644 --- a/source/reference/config-database.txt +++ b/source/reference/config-database.txt @@ -20,6 +20,26 @@ The collections in the ``config`` database support: replica sets, and sharded clusters and retryable writes for replica sets and sharded clusters. +.. note:: + + Sharded clusters may show different collections in the + ``config`` database, depending on whether you connect to + :program:`mongos` or :program:`mongod`: + + - On ``mongos``, the ``config`` database shows collections + located on the config servers, such as + :data:`~config.collections` or :data:`~config.chunks`. + + - On ``mongod``, the ``config`` database shows + collections specific to the given shard, such as + :data:`~config.migrationCoordinators` or + :data:`~config.rangeDeletions`. + + When a config server and a shard are hosted on the same node, + :program:`mongos` may have access to some shard-local + collections in the ``config`` database. + + Restrictions ------------ From 106d19d0d4b503d08be111a1beb5a48fadbb85f3 Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Mon, 26 Feb 2024 12:59:16 -0500 Subject: [PATCH 169/308] DOCSP-34195: kotlin query arrays (#6502) * DOCSP-34195: kotlin query arrays * add sln to gitignore * remove gitignore changes * JM extract format fix --- .../driver-example-query-20.rst | 9 ++++++ .../driver-example-query-21.rst | 9 ++++++ .../driver-example-query-22.rst | 9 ++++++ .../driver-example-query-23.rst | 9 ++++++ .../driver-example-query-24.rst | 9 ++++++ .../driver-example-query-25.rst | 9 ++++++ .../driver-example-query-26.rst | 9 ++++++ .../driver-example-query-27.rst | 9 ++++++ .../driver-example-query-28.rst | 9 ++++++ source/includes/extracts-filter.yaml | 32 ++++++++++++++++--- source/tutorial/query-arrays.txt | 4 +-- 11 files changed, 111 insertions(+), 6 deletions(-) diff --git a/source/includes/driver-examples/driver-example-query-20.rst b/source/includes/driver-examples/driver-example-query-20.rst index e12d922fcc5..84c99a6a71e 100644 --- a/source/includes/driver-examples/driver-example-query-20.rst +++ b/source/includes/driver-examples/driver-example-query-20.rst @@ -66,6 +66,15 @@ :start-after: Start Example 20 :end-before: End Example 20 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 20 + :end-before: End Example 20 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_arrays.js diff --git a/source/includes/driver-examples/driver-example-query-21.rst b/source/includes/driver-examples/driver-example-query-21.rst index c0a575d6277..e3130093f2e 100644 --- a/source/includes/driver-examples/driver-example-query-21.rst +++ b/source/includes/driver-examples/driver-example-query-21.rst @@ -57,6 +57,15 @@ :start-after: Start Example 21 :end-before: End Example 21 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 21 + :end-before: End Example 21 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_arrays.js diff --git a/source/includes/driver-examples/driver-example-query-22.rst b/source/includes/driver-examples/driver-example-query-22.rst index c45f13eb958..2cc49f059c1 100644 --- a/source/includes/driver-examples/driver-example-query-22.rst +++ b/source/includes/driver-examples/driver-example-query-22.rst @@ -57,6 +57,15 @@ :start-after: Start Example 22 :end-before: End Example 22 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 22 + :end-before: End Example 22 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_arrays.js diff --git a/source/includes/driver-examples/driver-example-query-23.rst b/source/includes/driver-examples/driver-example-query-23.rst index 4f481c9c291..2f62a55b07b 100644 --- a/source/includes/driver-examples/driver-example-query-23.rst +++ b/source/includes/driver-examples/driver-example-query-23.rst @@ -57,6 +57,15 @@ :start-after: Start Example 23 :end-before: End Example 23 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 23 + :end-before: End Example 23 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_arrays.js diff --git a/source/includes/driver-examples/driver-example-query-24.rst b/source/includes/driver-examples/driver-example-query-24.rst index 35e98ba5e67..49151d01f82 100644 --- a/source/includes/driver-examples/driver-example-query-24.rst +++ b/source/includes/driver-examples/driver-example-query-24.rst @@ -57,6 +57,15 @@ :start-after: Start Example 24 :end-before: End Example 24 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 24 + :end-before: End Example 24 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_arrays.js diff --git a/source/includes/driver-examples/driver-example-query-25.rst b/source/includes/driver-examples/driver-example-query-25.rst index fd21527ca1a..98813b6d17c 100644 --- a/source/includes/driver-examples/driver-example-query-25.rst +++ b/source/includes/driver-examples/driver-example-query-25.rst @@ -57,6 +57,15 @@ :start-after: Start Example 25 :end-before: End Example 25 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 25 + :end-before: End Example 25 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_arrays.js diff --git a/source/includes/driver-examples/driver-example-query-26.rst b/source/includes/driver-examples/driver-example-query-26.rst index be53400c194..ad53ef4ae72 100644 --- a/source/includes/driver-examples/driver-example-query-26.rst +++ b/source/includes/driver-examples/driver-example-query-26.rst @@ -57,6 +57,15 @@ :start-after: Start Example 26 :end-before: End Example 26 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 26 + :end-before: End Example 26 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_arrays.js diff --git a/source/includes/driver-examples/driver-example-query-27.rst b/source/includes/driver-examples/driver-example-query-27.rst index c4b224af31d..1e5991a353f 100644 --- a/source/includes/driver-examples/driver-example-query-27.rst +++ b/source/includes/driver-examples/driver-example-query-27.rst @@ -57,6 +57,15 @@ :start-after: Start Example 26 :end-before: End Example 26 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 27 + :end-before: End Example 27 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_arrays.js diff --git a/source/includes/driver-examples/driver-example-query-28.rst b/source/includes/driver-examples/driver-example-query-28.rst index 49df5a49853..64474a50019 100644 --- a/source/includes/driver-examples/driver-example-query-28.rst +++ b/source/includes/driver-examples/driver-example-query-28.rst @@ -57,6 +57,15 @@ :start-after: Start Example 28 :end-before: End Example 28 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 28 + :end-before: End Example 28 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_arrays.js diff --git a/source/includes/extracts-filter.yaml b/source/includes/extracts-filter.yaml index a1a203d592b..31dfb0ab1d4 100644 --- a/source/includes/extracts-filter.yaml +++ b/source/includes/extracts-filter.yaml @@ -279,14 +279,21 @@ content: | - id: java-sync content: | To specify equality condition on an array, use the query - document ``eq( , )`` where ```` is + document ``eq(, )`` where ```` is the exact array to match, including the order of the elements. - id: java-async content: | To specify equality condition on an array, use the query - document ``eq( , )`` where ```` is + document ``eq(, )`` where ```` is + the exact array to match, including the order of the + elements. + + - id: kotlin-coroutine + content: | + To specify equality condition on an array, use the query + document ``eq(, )``, where ```` is the exact array to match, including the order of the elements. @@ -363,14 +370,21 @@ content: | To query if the array field contains at least *one* element with the specified value, use the filter - ``eq( , )`` where ```` is the element value. + ``eq(, )`` where ```` is the element value. - id: java-async content: | To query if the array field contains at least *one* element with the specified value, use the filter - ``eq( , )`` where value is the element value. + ``eq(, )`` where value is the element value. + + - id: kotlin-coroutine + content: | + + To query if the array field contains at least *one* element + with the specified value, use the filter + ``eq(, )``, where ```` is the element value. - id: nodejs content: | @@ -633,6 +647,16 @@ content: | and(gte(, ), lt(, ) ...) + - id: kotlin-coroutine + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `. For example: + + .. code-block:: kotlin + + and(gte(, ), lt(, ) ...) + - id: nodejs content: | To specify conditions on the elements in the array field, diff --git a/source/tutorial/query-arrays.txt b/source/tutorial/query-arrays.txt index d634a981d88..e6aeb256812 100644 --- a/source/tutorial/query-arrays.txt +++ b/source/tutorial/query-arrays.txt @@ -11,11 +11,11 @@ Query an Array .. facet:: :name: programming_language - :values: shell, csharp, go, java, javascript/typescript, python, perl, php, ruby, scala + :values: shell, csharp, go, java, javascript/typescript, python, perl, php, ruby, scala, kotlin .. meta:: :description: MongoDB Manual: code examples for query operations on array fields. Learn how to query an array and an array element or field, query on the array field as a whole, query if a field is in an array, and query by array size. - :keywords: compass, code example, motor, java sync, java async, reactive streams, node.js + :keywords: compass, code example, motor, java sync, java async, reactive streams, node.js, kotlin coroutine .. contents:: On this page :local: From 0b58840f94eae770d7a1c221cd9ed31b702023b6 Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Mon, 26 Feb 2024 13:03:28 -0500 Subject: [PATCH 170/308] DOCSP-34196: kotlin query array of documents (#6525) --- .../includes/driver-examples/driver-example-query-29.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-30.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-31.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-32.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-33.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-34.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-35.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-36.rst | 9 +++++++++ .../includes/driver-examples/driver-example-query-37.rst | 9 +++++++++ source/tutorial/query-array-of-documents.txt | 4 ++-- 10 files changed, 83 insertions(+), 2 deletions(-) diff --git a/source/includes/driver-examples/driver-example-query-29.rst b/source/includes/driver-examples/driver-example-query-29.rst index a0e07a4dd7a..dfb8a0d0b10 100644 --- a/source/includes/driver-examples/driver-example-query-29.rst +++ b/source/includes/driver-examples/driver-example-query-29.rst @@ -65,6 +65,15 @@ :start-after: Start Example 29 :end-before: End Example 29 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 29 + :end-before: End Example 29 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_array_of_documents.js diff --git a/source/includes/driver-examples/driver-example-query-30.rst b/source/includes/driver-examples/driver-example-query-30.rst index 33bb00c8416..ee117dd0c22 100644 --- a/source/includes/driver-examples/driver-example-query-30.rst +++ b/source/includes/driver-examples/driver-example-query-30.rst @@ -57,6 +57,15 @@ :start-after: Start Example 30 :end-before: End Example 30 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 30 + :end-before: End Example 30 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_array_of_documents.js diff --git a/source/includes/driver-examples/driver-example-query-31.rst b/source/includes/driver-examples/driver-example-query-31.rst index 468f0cf7a30..6bc0a729e95 100644 --- a/source/includes/driver-examples/driver-example-query-31.rst +++ b/source/includes/driver-examples/driver-example-query-31.rst @@ -49,6 +49,15 @@ :start-after: Start Example 31 :end-before: End Example 31 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 31 + :end-before: End Example 31 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_array_of_documents.js diff --git a/source/includes/driver-examples/driver-example-query-32.rst b/source/includes/driver-examples/driver-example-query-32.rst index ddf786d967a..1a58d8b48e4 100644 --- a/source/includes/driver-examples/driver-example-query-32.rst +++ b/source/includes/driver-examples/driver-example-query-32.rst @@ -57,6 +57,15 @@ :start-after: Start Example 32 :end-before: End Example 32 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 32 + :end-before: End Example 32 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_array_of_documents.js diff --git a/source/includes/driver-examples/driver-example-query-33.rst b/source/includes/driver-examples/driver-example-query-33.rst index 64b951aa19f..4160cb5d8c7 100644 --- a/source/includes/driver-examples/driver-example-query-33.rst +++ b/source/includes/driver-examples/driver-example-query-33.rst @@ -57,6 +57,15 @@ :start-after: Start Example 33 :end-before: End Example 33 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 33 + :end-before: End Example 33 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_array_of_documents.js diff --git a/source/includes/driver-examples/driver-example-query-34.rst b/source/includes/driver-examples/driver-example-query-34.rst index 464e151e60f..2af0d3075af 100644 --- a/source/includes/driver-examples/driver-example-query-34.rst +++ b/source/includes/driver-examples/driver-example-query-34.rst @@ -57,6 +57,15 @@ :start-after: Start Example 34 :end-before: End Example 34 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 34 + :end-before: End Example 34 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_array_of_documents.js diff --git a/source/includes/driver-examples/driver-example-query-35.rst b/source/includes/driver-examples/driver-example-query-35.rst index d69fd03fd05..0762e7dd9cd 100644 --- a/source/includes/driver-examples/driver-example-query-35.rst +++ b/source/includes/driver-examples/driver-example-query-35.rst @@ -57,6 +57,15 @@ :start-after: Start Example 35 :end-before: End Example 35 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 35 + :end-before: End Example 35 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_array_of_documents.js diff --git a/source/includes/driver-examples/driver-example-query-36.rst b/source/includes/driver-examples/driver-example-query-36.rst index a039bb8ab5c..70d93f061d2 100644 --- a/source/includes/driver-examples/driver-example-query-36.rst +++ b/source/includes/driver-examples/driver-example-query-36.rst @@ -57,6 +57,15 @@ :start-after: Start Example 36 :end-before: End Example 36 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 36 + :end-before: End Example 36 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_array_of_documents.js diff --git a/source/includes/driver-examples/driver-example-query-37.rst b/source/includes/driver-examples/driver-example-query-37.rst index cacb26bbb12..589510576fc 100644 --- a/source/includes/driver-examples/driver-example-query-37.rst +++ b/source/includes/driver-examples/driver-example-query-37.rst @@ -57,6 +57,15 @@ :start-after: Start Example 37 :end-before: End Example 37 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 37 + :end-before: End Example 37 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_array_of_documents.js diff --git a/source/tutorial/query-array-of-documents.txt b/source/tutorial/query-array-of-documents.txt index fcbeafbbae9..b6d22a87c70 100644 --- a/source/tutorial/query-array-of-documents.txt +++ b/source/tutorial/query-array-of-documents.txt @@ -11,11 +11,11 @@ Query an Array of Embedded Documents .. facet:: :name: programming_language - :values: shell, csharp, go, java, python, perl, php, ruby, rust, scala, javascript/typescript + :values: shell, csharp, go, java, python, perl, php, ruby, rust, scala, javascript/typescript, kotlin .. meta:: :description: MongoDB Manual code examples for how to query an array of documents, including nested or embedded documents. - :keywords: motor, java sync, java async, reactive streams, code example, node.js, compass + :keywords: motor, java sync, java async, reactive streams, code example, node.js, compass, kotlin coroutine .. contents:: On this page :local: From 82472a6bff15c35a94117e0800da36a59301af2a Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Mon, 26 Feb 2024 15:02:22 -0500 Subject: [PATCH 171/308] DOCSP-34197: kotlin project fields (#6526) * DOCSP-34197: kotlin project fields * LT PR fixes --- .../driver-example-query-42.rst | 9 +++ .../driver-example-query-43.rst | 9 +++ .../driver-example-query-44.rst | 9 +++ .../driver-example-query-45.rst | 9 +++ .../driver-example-query-46.rst | 9 +++ .../driver-example-query-47.rst | 9 +++ .../driver-example-query-48.rst | 9 +++ .../driver-example-query-49.rst | 9 +++ .../driver-example-query-50.rst | 14 ++++ .../project-fields-from-query-results.txt | 67 ++++++++++++------- 10 files changed, 130 insertions(+), 23 deletions(-) diff --git a/source/includes/driver-examples/driver-example-query-42.rst b/source/includes/driver-examples/driver-example-query-42.rst index 71360043c3a..09d39939bdc 100644 --- a/source/includes/driver-examples/driver-example-query-42.rst +++ b/source/includes/driver-examples/driver-example-query-42.rst @@ -66,6 +66,15 @@ :start-after: Start Example 42 :end-before: End Example 42 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 42 + :end-before: End Example 42 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_project.js diff --git a/source/includes/driver-examples/driver-example-query-43.rst b/source/includes/driver-examples/driver-example-query-43.rst index 92fb492d4af..f1a628c18c5 100644 --- a/source/includes/driver-examples/driver-example-query-43.rst +++ b/source/includes/driver-examples/driver-example-query-43.rst @@ -55,6 +55,15 @@ :start-after: Start Example 43 :end-before: End Example 43 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 43 + :end-before: End Example 43 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_project.js diff --git a/source/includes/driver-examples/driver-example-query-44.rst b/source/includes/driver-examples/driver-example-query-44.rst index 02ffc83aba5..c07902a8837 100644 --- a/source/includes/driver-examples/driver-example-query-44.rst +++ b/source/includes/driver-examples/driver-example-query-44.rst @@ -72,6 +72,15 @@ :start-after: Start Example 44 :end-before: End Example 44 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 44 + :end-before: End Example 44 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_project.js diff --git a/source/includes/driver-examples/driver-example-query-45.rst b/source/includes/driver-examples/driver-example-query-45.rst index 72c98231c12..16583448e6a 100644 --- a/source/includes/driver-examples/driver-example-query-45.rst +++ b/source/includes/driver-examples/driver-example-query-45.rst @@ -71,6 +71,15 @@ :start-after: Start Example 45 :end-before: End Example 45 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 45 + :end-before: End Example 45 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_project.js diff --git a/source/includes/driver-examples/driver-example-query-46.rst b/source/includes/driver-examples/driver-example-query-46.rst index be365b1e253..dad905b5069 100644 --- a/source/includes/driver-examples/driver-example-query-46.rst +++ b/source/includes/driver-examples/driver-example-query-46.rst @@ -71,6 +71,15 @@ :start-after: Start Example 46 :end-before: End Example 46 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 46 + :end-before: End Example 46 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_project.js diff --git a/source/includes/driver-examples/driver-example-query-47.rst b/source/includes/driver-examples/driver-example-query-47.rst index 7b9cb4e70fe..fae59a5a246 100644 --- a/source/includes/driver-examples/driver-example-query-47.rst +++ b/source/includes/driver-examples/driver-example-query-47.rst @@ -74,6 +74,15 @@ :start-after: Start Example 47 :end-before: End Example 47 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 47 + :end-before: End Example 47 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_project.js diff --git a/source/includes/driver-examples/driver-example-query-48.rst b/source/includes/driver-examples/driver-example-query-48.rst index 84eec839a2e..f2c28be543e 100644 --- a/source/includes/driver-examples/driver-example-query-48.rst +++ b/source/includes/driver-examples/driver-example-query-48.rst @@ -74,6 +74,15 @@ :start-after: Start Example 48 :end-before: End Example 48 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 48 + :end-before: End Example 48 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_project.js diff --git a/source/includes/driver-examples/driver-example-query-49.rst b/source/includes/driver-examples/driver-example-query-49.rst index 198ac71ad0e..63f5dd26e3c 100644 --- a/source/includes/driver-examples/driver-example-query-49.rst +++ b/source/includes/driver-examples/driver-example-query-49.rst @@ -71,6 +71,15 @@ :start-after: Start Example 49 :end-before: End Example 49 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 49 + :end-before: End Example 49 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_project.js diff --git a/source/includes/driver-examples/driver-example-query-50.rst b/source/includes/driver-examples/driver-example-query-50.rst index 1e62f862971..3f7645b57d6 100644 --- a/source/includes/driver-examples/driver-example-query-50.rst +++ b/source/includes/driver-examples/driver-example-query-50.rst @@ -74,6 +74,20 @@ :start-after: Start Example 50 :end-before: End Example 50 + - id: kotlin-coroutine + content: | + To specify a projection document, chain the + `FindFlow.projection() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-find-flow/projection.html>`__ method to the + ``find()`` method. The example uses the + `com.mongodb.client.model.Projections <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/model/Projections.html>`__ class to create the + projection documents. + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 50 + :end-before: End Example 50 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_project.js diff --git a/source/tutorial/project-fields-from-query-results.txt b/source/tutorial/project-fields-from-query-results.txt index 88b224435b0..171b2d117b0 100644 --- a/source/tutorial/project-fields-from-query-results.txt +++ b/source/tutorial/project-fields-from-query-results.txt @@ -13,10 +13,10 @@ Project Fields to Return from Query .. facet:: :name: programming_language - :values: shell, csharp, go, java, python, perl, php, ruby, scala, javascript/typescript + :values: shell, csharp, go, java, python, perl, php, ruby, scala, javascript/typescript, kotlin .. meta:: - :keywords: motor, java sync, java async, reactive streams, code example, node.js, compass + :keywords: motor, java sync, java async, reactive streams, code example, node.js, compass, kotlin coroutine .. contents:: On this page :local: @@ -79,6 +79,12 @@ Return All Fields in Matching Documents `__ method returns all fields in the matching documents. + - id: kotlin-coroutine + content: | + If you do not specify a :term:`projection` document, the + `MongoCollection.find() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/find.html>`__ method returns all + fields in the matching documents. + - id: nodejs content: | If you do not specify a :term:`projection` document, the @@ -244,10 +250,10 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``{ "instock.0": 1 }`` projection will *not* project the array + ``{ "instock.0": 1 }`` projection does *not* project the array with the first element. - id: compass @@ -267,10 +273,10 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``{ "instock.0": 1 }`` projection will *not* project the array + ``{ "instock.0": 1 }`` projection does *not* project the array with the first element. - id: java-sync @@ -282,10 +288,10 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``include("instock.0")`` projection will *not* project the array + ``include("instock.0")`` projection does *not* project the array with the first element. - id: java-async @@ -297,10 +303,25 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements + to include in the returned array. For instance, you *cannot* + project specific array elements using the array index; e.g. + ``include("instock.0")`` projection does *not* project the array + with the first element. + + - id: kotlin-coroutine + content: | + .. include:: /includes/fact-projection-ops.rst + + .. include:: /includes/fact-projection-slice-example.rst + + .. include:: /includes/driver-examples/driver-example-query-50.rst + + :projection:`$elemMatch`, :projection:`$slice`, and + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``include("instock.0")`` projection will *not* project the array + ``include("instock.0")`` projection does *not* project the array with the first element. - id: nodejs @@ -312,10 +333,10 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``{ "instock.0": 1 }`` projection will *not* project the array + ``{ "instock.0": 1 }`` projection does *not* project the array with the first element. - id: php @@ -327,10 +348,10 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``[ "instock.0" => 1 ]`` projection will *not* project the array + ``[ "instock.0" => 1 ]`` projection does *not* project the array with the first element. - id: perl @@ -342,10 +363,10 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``{ "instock.0" => 1 }`` projection will *not* project the array + ``{ "instock.0" => 1 }`` projection does *not* project the array with the first element. - id: ruby @@ -357,10 +378,10 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``{ "instock.0" => 1 }`` projection will *not* project the array + ``{ "instock.0" => 1 }`` projection does *not* project the array with the first element. - id: scala @@ -372,10 +393,10 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``include("instock.0")`` projection will *not* project the array + ``include("instock.0")`` projection does *not* project the array with the first element. - id: csharp @@ -387,7 +408,7 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For example, the following operation will not project the array @@ -406,10 +427,10 @@ Project Specific Array Elements in the Returned Array .. include:: /includes/driver-examples/driver-example-query-50.rst :projection:`$elemMatch`, :projection:`$slice`, and - :projection:`$` are the *only* way to project specific elements + :projection:`$` are the *only* operators that you can use to project specific elements to include in the returned array. For instance, you *cannot* project specific array elements using the array index; e.g. - ``include("instock.0")`` projection will *not* project the array + ``include("instock.0")`` projection does *not* project the array with the first element. Project Fields with Aggregation Expressions From 98bec06350d2bb045de532b9223f78e6fc9ab008 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Mon, 26 Feb 2024 14:20:48 -0800 Subject: [PATCH 172/308] (DOCSP-33009): Add 7.0 release note redirect for older versions (#6545) * WIP * (DOCSP-33009): Add 7.0 release note redirect for older versions --- config/redirects | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/redirects b/config/redirects index bd22cc9c6fb..fd3a425c92e 100644 --- a/config/redirects +++ b/config/redirects @@ -2367,6 +2367,14 @@ raw: ${prefix}/${version}/applications/drivers -> ${base}/drivers/ [*-v5.3]: ${prefix}/${version}/core/queryable-encryption -> ${base}/${version}/core/security-client-side-encryption # Release Notes redirects +[*-v6.0]: ${prefix}/${version}/release-notes/7.0/ -> ${base}/${version}/release-notes +[*-v6.0]: ${prefix}/${version}/release-notes/7.0-compatibility/ -> ${base}/${version}/release-notes +[*-v6.0]: ${prefix}/${version}/release-notes/7.0-changelog/ -> ${base}/${version}/release-notes +[*-v6.0]: ${prefix}/${version}/release-notes/7.0-downgrade/ -> ${base}/${version}/release-notes +[*-v6.0]: ${prefix}/${version}/release-notes/7.0-upgrade-standalone/ -> ${base}/${version}/release-notes +[*-v6.0]: ${prefix}/${version}/release-notes/7.0-upgrade-replica-set/ -> ${base}/${version}/release-notes +[*-v6.0]: ${prefix}/${version}/release-notes/7.0-upgrade-sharded-cluster/ -> ${base}/${version}/release-notes + [*-v6.1]: ${prefix}/${version}/release-notes/6.2 -> ${base}/${version}/release-notes [*-v5.0]: ${prefix}/${version}/release-notes/6.0 -> ${base}/${version}/release-notes From 6112e67bbb96f6579cc85799059f53cc23320998 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Tue, 27 Feb 2024 09:20:14 -0800 Subject: [PATCH 173/308] DOCS-16509 Add vectorSearch to Agg Stage Table (#6496) * DOCS-16509 Add vectorSearch to Agg Stage Table * build error * atlas note * copy * add version --- source/includes/extracts-agg-stages.yaml | 16 ++++++++++++++++ .../reference/operator/aggregation-pipeline.txt | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/source/includes/extracts-agg-stages.yaml b/source/includes/extracts-agg-stages.yaml index 4933954dec2..81a397f9419 100644 --- a/source/includes/extracts-agg-stages.yaml +++ b/source/includes/extracts-agg-stages.yaml @@ -291,6 +291,22 @@ content: | document, outputs *n* documents where *n* is the number of array elements and can be zero for an empty array. + * - :pipeline:`$vectorSearch` + + - Performs an :abbr:`ANN (Approximate Nearest Neighbor)` search on a + vector in the specified field of an + :atlas:`Atlas ` collection. + + .. versionadded:: 7.0.2 + + .. note:: + + ``$vectorSearch`` is only available for MongoDB Atlas clusters + running MongoDB v6.0.11 or higher, and is not available for + self-managed deployments. To learn more, see + :atlas:`Atlas Search Aggregation Pipeline Stages + `. + --- ref: agg-stages-db.aggregate content: | diff --git a/source/reference/operator/aggregation-pipeline.txt b/source/reference/operator/aggregation-pipeline.txt index 55d450b6fdb..0a842e1d50c 100644 --- a/source/reference/operator/aggregation-pipeline.txt +++ b/source/reference/operator/aggregation-pipeline.txt @@ -44,7 +44,7 @@ times in a pipeline. .. include:: /includes/extracts/agg-stages-db.collection.aggregate.rst For aggregation expression operators to use in the pipeline stages, see -:ref:`aggregation-pipeline-operator-reference`. +:ref:`aggregation-pipeline-operators`. db.aggregate() Stages --------------------- From b490e5feeb0e311c9e6e1a03a223759caad991d6 Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:05:43 -0800 Subject: [PATCH 174/308] DOCS-12059 documents network.physicalBytesIn and network.physicalBytesOut (#6465) * DOCS-12059 documents network.physicalBytesIn and network.physicalBytesOut * internal review * internal review --- source/reference/command/serverStatus.txt | 30 ++++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index c1ea59507e0..e9f3540c6a4 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -2946,6 +2946,8 @@ network network : { bytesIn : Long(""), bytesOut : Long(""), + physicalBytesIn : Long(""), + physicalBytesOut : Long(""), numSlowDNSOperations : Long(""), numSlowSSLOperations : Long(""), numRequests : Long(""), @@ -2999,15 +3001,31 @@ network .. serverstatus:: network.bytesIn - The total number of bytes that the server has *received* over network - connections initiated by clients or other :binary:`~bin.mongod` or - :binary:`~bin.mongos` instances. + The total number of logical bytes that the server has *received* over + network connections initiated by clients or other ``mongod`` or + ``mongos`` instances. Logical bytes are the exact number of bytes + that a given file contains. .. serverstatus:: network.bytesOut - The total number of bytes that the server has *sent* over network - connections initiated by clients or other :binary:`~bin.mongod` or - :binary:`~bin.mongos` instances. + The total number of logical bytes that the server has *sent* over + network connections initiated by clients or other ``mongod`` or + ``mongos`` instances. Logical bytes correspond to the number of + bytes that a given file contains. + +.. serverstatus:: network.physicalBytesIn + + The total number of physical bytes that the server has *received* + over network connections initiated by clients or other ``mongod`` or + ``mongos`` instances. Physical bytes are the number of bytes that + actually reside on disk. + +.. serverstatus:: network.physicalBytesOut + + The total number of physical bytes that the server has *sent* over + network connections initiated by clients or other ``mongod`` or + ``mongos`` instances. Physical bytes are the number of bytes that + actually reside on disk. .. serverstatus:: network.numSlowDNSOperations From 3fd695f898bfe22c21c38d06bcbc36f197f11fd7 Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Tue, 27 Feb 2024 13:58:36 -0500 Subject: [PATCH 175/308] DOCSP-34198: kotlin code for query nulls (#6536) * DOCSP-34198: kotlin code for query nulls * add tab * fixed source code, testing if build errors resolve --- .../driver-example-query-38.rst | 9 +++++ .../driver-example-query-39.rst | 9 +++++ .../driver-example-query-40.rst | 9 +++++ .../driver-example-query-41.rst | 9 +++++ .../driver-example-query-intro-no-perl.rst | 15 +++++++ source/tutorial/query-for-null-fields.txt | 39 ++++++++++++++++--- 6 files changed, 85 insertions(+), 5 deletions(-) diff --git a/source/includes/driver-examples/driver-example-query-38.rst b/source/includes/driver-examples/driver-example-query-38.rst index 4075a662212..cb9f625ac30 100644 --- a/source/includes/driver-examples/driver-example-query-38.rst +++ b/source/includes/driver-examples/driver-example-query-38.rst @@ -59,6 +59,15 @@ :start-after: Start Example 38 :end-before: End Example 38 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 38 + :end-before: End Example 38 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_for_null_fields.js diff --git a/source/includes/driver-examples/driver-example-query-39.rst b/source/includes/driver-examples/driver-example-query-39.rst index 93f9c6e0f7d..4ab58bd5947 100644 --- a/source/includes/driver-examples/driver-example-query-39.rst +++ b/source/includes/driver-examples/driver-example-query-39.rst @@ -58,6 +58,15 @@ :start-after: Start Example 39 :end-before: End Example 39 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 39 + :end-before: End Example 39 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_for_null_fields.js diff --git a/source/includes/driver-examples/driver-example-query-40.rst b/source/includes/driver-examples/driver-example-query-40.rst index bee161130ec..22bf4c69a17 100644 --- a/source/includes/driver-examples/driver-example-query-40.rst +++ b/source/includes/driver-examples/driver-example-query-40.rst @@ -58,6 +58,15 @@ :start-after: Start Example 40 :end-before: End Example 40 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 40 + :end-before: End Example 40 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_for_null_fields.js diff --git a/source/includes/driver-examples/driver-example-query-41.rst b/source/includes/driver-examples/driver-example-query-41.rst index be1115b6f2a..7f4ab958bb0 100644 --- a/source/includes/driver-examples/driver-example-query-41.rst +++ b/source/includes/driver-examples/driver-example-query-41.rst @@ -58,6 +58,15 @@ :start-after: Start Example 41 :end-before: End Example 41 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 41 + :end-before: End Example 41 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_query_for_null_fields.js diff --git a/source/includes/driver-examples/driver-example-query-intro-no-perl.rst b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst index dc1d49485dd..ed9ab4e5a83 100644 --- a/source/includes/driver-examples/driver-example-query-intro-no-perl.rst +++ b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst @@ -62,6 +62,21 @@ .. include:: /includes/driver-examples/examples-intro.rst + - id: kotlin-coroutine + content: | + This page provides examples of |query_operations| by using the + `MongoCollection.find() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/find.html>`__ method in the MongoDB + :driver:`Kotlin Coroutine Driver `. + + .. tip:: + + The driver provides `com.mongodb.client.model.Filters <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/model/Filters.html>`__ + helper methods to facilitate the creation of filter + documents. The examples on this page use these methods to + create the filter documents. + + .. include:: /includes/driver-examples/examples-intro.rst + - id: nodejs content: | diff --git a/source/tutorial/query-for-null-fields.txt b/source/tutorial/query-for-null-fields.txt index 789c844709d..0f4f40dd95e 100644 --- a/source/tutorial/query-for-null-fields.txt +++ b/source/tutorial/query-for-null-fields.txt @@ -11,10 +11,10 @@ Query for Null or Missing Fields .. facet:: :name: programming_language - :values: shell, csharp, go, java, javascript/typescript, php, python, ruby, scala + :values: shell, csharp, go, java, javascript/typescript, php, python, ruby, scala, kotlin .. meta:: - :keywords: java sync, java async, reactive streams, motor, code example, node.js, compass + :keywords: java sync, java async, reactive streams, motor, code example, node.js, compass, kotlin coroutine .. contents:: On this page :local: @@ -53,6 +53,12 @@ Different query operators in MongoDB treat ``null`` values differently. Use ``None`` with the Motor driver to query for ``null`` or missing fields in MongoDB. + - id: kotlin-coroutine + content: | + .. important:: + Use ``null`` with the Kotlin Coroutine driver to + query for ``null`` or missing fields in MongoDB. + - id: ruby content: | .. important:: @@ -78,7 +84,6 @@ Different query operators in MongoDB treat ``null`` values differently. Use ``nil`` with the MongoDB Go driver to query for ``null`` or missing fields in MongoDB. - .. include:: /includes/driver-examples/driver-example-query-38.rst .. _faq-comparison-with-null: @@ -125,6 +130,12 @@ Equality Filter contain the ``item`` field whose value is ``null`` *or* that do not contain the ``item`` field. + - id: kotlin-coroutine + content: | + The ``eq("item", null)`` query matches documents that either + contain the ``item`` field whose value is ``null`` *or* that + do not contain the ``item`` field. + - id: nodejs content: | The ``{ item : null }`` query matches documents that either @@ -206,13 +217,19 @@ documents where the ``item`` field exists *and* has a non-null value. content: | .. code-block:: java - collection.find($ne("item", null)); + collection.find(ne("item", null)); - id: java-async content: | .. code-block:: java - db.inventory.find( { item: { $ne : nul l} } ) + db.inventory.find( { item: { $ne : null} } ) + + - id: kotlin-coroutine + content: | + .. code-block:: kotlin + + collection.find(ne("item", null)) - id: nodejs content: | @@ -305,6 +322,13 @@ Type Check ``null``; i.e. the value of the ``item`` field is of :ref:`BSON Type ` ``Null`` (BSON Type 10): + - id: kotlin-coroutine + content: | + The ``type("item", BsonType.NULL)`` query matches *only* + documents that contain the ``item`` field whose value is + ``null``. This means the value of the ``item`` field is of + :ref:`BSON Type ` ``Null`` (BSON Type 10): + - id: nodejs content: | The ``{ item : { $type: 10 } }`` query matches *only* @@ -392,6 +416,11 @@ field. [#type0]_ The ``exists("item", false)`` query matches documents that do not contain the ``item`` field: + - id: kotlin-coroutine + content: | + The ``exists("item", false)`` query matches documents that + do not contain the ``item`` field: + - id: nodejs content: | The ``{ item : { $exists: false } }`` query matches documents From 9bd082c35521efa0c74ea11664f77e0038c5cfce Mon Sep 17 00:00:00 2001 From: Nick Villahermosa Date: Tue, 27 Feb 2024 13:59:01 -0500 Subject: [PATCH 176/308] DOCSP-37157 Removed duplicate text, fixed version (#6551) * Removed duplicate text * Fixed version number --- source/includes/autosplit-no-operation.rst | 2 +- source/includes/extracts-4.2-changes.yaml | 4 ++-- source/release-notes/6.0-upgrade-sharded-cluster.txt | 2 -- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/source/includes/autosplit-no-operation.rst b/source/includes/autosplit-no-operation.rst index e0e72b53092..e69682aeeb7 100644 --- a/source/includes/autosplit-no-operation.rst +++ b/source/includes/autosplit-no-operation.rst @@ -1,4 +1,4 @@ -Starting in MongoDB 6.1, automatic chunk splitting is not performed. +Starting in MongoDB 6.0.3, automatic chunk splitting is not performed. This is because of balancing policy improvements. Auto-splitting commands still exist, but do not perform an operation. For details, see :ref:`release-notes-6.1-balancing-policy-changes`. diff --git a/source/includes/extracts-4.2-changes.yaml b/source/includes/extracts-4.2-changes.yaml index 6c7b4f24de7..eb9fb77c2cf 100644 --- a/source/includes/extracts-4.2-changes.yaml +++ b/source/includes/extracts-4.2-changes.yaml @@ -558,7 +558,7 @@ content: | .. include:: /includes/autosplit-no-operation.rst - In MongoDB versions earlier than 6.1, :method:`sh.startBalancer()` + In MongoDB versions earlier than 6.0.3, :method:`sh.startBalancer()` also enables auto-splitting for the sharded cluster. --- ref: 4.2-changes-stop-balancer-autosplit @@ -566,7 +566,7 @@ content: | .. include:: /includes/autosplit-no-operation.rst - In MongoDB versions earlier than 6.1, :method:`sh.stopBalancer()` + In MongoDB versions earlier than 6.0.3, :method:`sh.stopBalancer()` also disables auto-splitting for the sharded cluster. --- ref: 4.2-changes-global-lock-reporting diff --git a/source/release-notes/6.0-upgrade-sharded-cluster.txt b/source/release-notes/6.0-upgrade-sharded-cluster.txt index ee035f080af..453639208c9 100644 --- a/source/release-notes/6.0-upgrade-sharded-cluster.txt +++ b/source/release-notes/6.0-upgrade-sharded-cluster.txt @@ -442,8 +442,6 @@ Upgrade Procedure If you do not wish to enable auto-splitting while the balancer is enabled, you must also run :method:`sh.disableAutoSplit()`. - .. include:: /includes/autosplit-no-operation.rst - For more information about re-enabling the balancer, see :ref:`sharding-balancing-enable`. From a305f2999cd8d82fc71a743391cf8a909796fb14 Mon Sep 17 00:00:00 2001 From: Nick Villahermosa Date: Tue, 27 Feb 2024 16:10:40 -0500 Subject: [PATCH 177/308] DOCSP-37115 Time series granularity recommendations and limits (#6554) * Fixed time series granularity example and added a limitation on max bucket size * Adjusted and expanded taxonomy tags * Rounding * Fixed example values * Internal PR feedback * Wording cleanup * Wording cleanup --- .../timeseries/timeseries-granularity.txt | 52 +++++++++++-------- .../timeseries/timeseries-limitations.txt | 29 ++++++++--- 2 files changed, 50 insertions(+), 31 deletions(-) diff --git a/source/core/timeseries/timeseries-granularity.txt b/source/core/timeseries/timeseries-granularity.txt index cc365855bb2..19bb11ecd19 100644 --- a/source/core/timeseries/timeseries-granularity.txt +++ b/source/core/timeseries/timeseries-granularity.txt @@ -1,14 +1,19 @@ +.. meta:: + :keywords: time series, granularity, IOT, code example, node.js + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: javascript/typescript + .. _timeseries-granularity: ==================================== Set Granularity for Time Series Data ==================================== - -.. default-domain:: mongodb - -.. facet:: - :name: genre - :values: reference .. contents:: On this page :local: @@ -16,9 +21,6 @@ Set Granularity for Time Series Data :depth: 2 :class: singlecol -.. meta:: - :keywords: Time series, granularity, IOT - When you create a time series collection, MongoDB automatically creates a ``system.buckets`` :ref:`system collection ` and groups incoming time series data @@ -87,11 +89,12 @@ bucket of data when using a given ``granularity`` value: .. include:: /includes/table-timeseries-granularity-intervals.rst -By default, ``granularity`` is set to ``seconds``. You can improve performance by setting the ``granularity`` value to the -closest match to the time span between incoming measurements from the -same data source. For example, if you are recording weather data from -thousands of sensors but only record data from each sensor once per 5 -minutes, set ``granularity`` to ``"minutes"``. +By default, ``granularity`` is set to ``seconds``. You can improve +performance by setting the ``granularity`` value to the closest match to +the time span between incoming measurements from the same data source. +For example, if you are recording weather data from thousands of sensors +but only record data from each sensor once per 5 minutes, set +``granularity`` to ``"minutes"``. .. code-block:: javascript @@ -125,8 +128,10 @@ Using Custom Bucketing Parameters In MongoDB 6.3 and higher, instead of ``granularity``, you can set bucket boundaries manually using the two custom bucketing parameters. -Consider this approach if you need the additional precision to optimize -a high volume of queries and :dbcommand:`insert` operations. +Consider this approach if you expect to query data for fixed time +intervals, such as every 4 hours starting at midnight. Ensuring buckets +don't overlap between those periods optimizes for high query volume and +:dbcommand:`insert` operations. To use custom bucketing parameters, set both parameters to the same value, and do not set ``granularity``: @@ -139,9 +144,10 @@ value, and do not set ``granularity``: bucket, MongoDB rounds down the document's timestamp value by this interval to set the minimum time for the bucket. -For the weather station example with 5 minute sensor intervals, you -could adjust bucketing by setting the custom bucketing parameters to -300 seconds, instead of using a ``granularity`` of ``"minutes"``: +For the weather station example, if you generate summary reports every +4 hours, you could adjust bucketing by setting the custom bucketing +parameters to 14400 seconds instead of using a ``granularity`` +of ``"minutes"``: .. code-block:: javascript @@ -151,15 +157,15 @@ could adjust bucketing by setting the custom bucketing parameters to timeseries: { timeField: "timestamp", metaField: "metadata", - bucketMaxSpanSeconds: 300, - bucketRoundingSeconds: 300 + bucketMaxSpanSeconds: 14400, + bucketRoundingSeconds: 14400 } } ) -If a document with a time of ``2023-03-27T18:24:35Z`` does not fit an +If a document with a time of ``2023-03-27T16:24:35Z`` does not fit an existing bucket, MongoDB creates a new bucket with a minimum time of -``2023-03-27T18:20:00Z`` and a maximum time of ``2023-03-27T18:24:59Z``. +``2023-03-27T16:00:00Z`` and a maximum time of ``2023-03-27T19:59:59Z``. Change Time Series Granularity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/core/timeseries/timeseries-limitations.txt b/source/core/timeseries/timeseries-limitations.txt index afd2d8d76d6..8d75f4b06c1 100644 --- a/source/core/timeseries/timeseries-limitations.txt +++ b/source/core/timeseries/timeseries-limitations.txt @@ -1,20 +1,22 @@ +.. meta:: + :keywords: time series, IOT + +.. facet:: + :name: genre + :values: reference + .. _manual-timeseries-collection-limitations: ================================== Time Series Collection Limitations ================================== -.. default-domain:: mongodb - .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -.. meta:: - :keywords: Time Series, IOT - This page describes limitations on using :ref:`time series collections `. @@ -173,12 +175,23 @@ parameters later. .. _timeseries-limitations-granularity: +Granularity +~~~~~~~~~~~ + +Bucket Size +``````````` +For any configuration of granularity parameters, the maximum +size of a bucket is 1000 measurements or 125KB of data, +whichever is lower. MongoDB may also enforce a lower maximum size for +high cardinality data with many unique values, so that the working set +of buckets fits within the :ref:`WiredTiger cache `. + Modifying Bucket Parameters -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``````````````````````````` -Once you set a collection's ``granularity`` or custom bucketing +Once you set a collection's ``granularity`` or the custom bucketing parameters ``bucketMaxSpanSeconds`` and ``bucketRoundingSeconds``, you -can increase them, but not decrease them. +can increase the timespan covered by a bucket, but not decrease it. Use the :dbcommand:`collMod` command to modify the parameters. For example: .. code-block:: javascript From 1082eb12a0e590a349dd68e9b032b2a18325bce0 Mon Sep 17 00:00:00 2001 From: Rea Rustagi <85902999+rustagir@users.noreply.github.com> Date: Tue, 27 Feb 2024 16:39:50 -0500 Subject: [PATCH 178/308] DOCSP-34200: kotlin code for update docs (#6555) * DOCSP-34200: kotlin code for update docs * JD PR fixes 1 * fix typo * line break --- .../driver-example-update-51.rst | 9 ++ .../driver-example-update-52.rst | 11 +++ .../driver-example-update-53.rst | 11 +++ .../driver-example-update-54.rst | 9 ++ source/tutorial/update-documents.txt | 92 ++++++++++++++++++- 5 files changed, 128 insertions(+), 4 deletions(-) diff --git a/source/includes/driver-examples/driver-example-update-51.rst b/source/includes/driver-examples/driver-example-update-51.rst index 1c012409598..058870010cb 100644 --- a/source/includes/driver-examples/driver-example-update-51.rst +++ b/source/includes/driver-examples/driver-example-update-51.rst @@ -75,6 +75,15 @@ :start-after: Start Example 51 :end-before: End Example 51 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 51 + :end-before: End Example 51 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_update.js diff --git a/source/includes/driver-examples/driver-example-update-52.rst b/source/includes/driver-examples/driver-example-update-52.rst index 888a80cc5d0..e4405a7dc24 100644 --- a/source/includes/driver-examples/driver-example-update-52.rst +++ b/source/includes/driver-examples/driver-example-update-52.rst @@ -149,6 +149,17 @@ .. include:: /includes/fact-update-operation-uses.rst + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 52 + :end-before: End Example 52 + + .. include:: /includes/fact-update-operation-uses.rst + - id: nodejs content: | .. literalinclude:: /driver-examples/node_update.js diff --git a/source/includes/driver-examples/driver-example-update-53.rst b/source/includes/driver-examples/driver-example-update-53.rst index ecd1c7ee557..00bf3e88f6d 100644 --- a/source/includes/driver-examples/driver-example-update-53.rst +++ b/source/includes/driver-examples/driver-example-update-53.rst @@ -58,6 +58,17 @@ .. include:: /includes/fact-update-many-operation-uses.rst + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 52 + :end-before: End Example 52 + + .. include:: /includes/fact-update-many-operation-uses.rst + - id: nodejs content: | .. literalinclude:: /driver-examples/node_update.js diff --git a/source/includes/driver-examples/driver-example-update-54.rst b/source/includes/driver-examples/driver-example-update-54.rst index 25ff83053ea..06b82b9d78d 100644 --- a/source/includes/driver-examples/driver-example-update-54.rst +++ b/source/includes/driver-examples/driver-example-update-54.rst @@ -47,6 +47,15 @@ :start-after: Start Example 54 :end-before: End Example 54 + - id: kotlin-coroutine + content: | + + .. literalinclude:: /driver-examples/kotlin_examples.kt + :language: kotlin + :dedent: + :start-after: Start Example 54 + :end-before: End Example 54 + - id: nodejs content: | .. literalinclude:: /driver-examples/node_update.js diff --git a/source/tutorial/update-documents.txt b/source/tutorial/update-documents.txt index f988360d3c9..ffd59dc7d8b 100644 --- a/source/tutorial/update-documents.txt +++ b/source/tutorial/update-documents.txt @@ -11,11 +11,11 @@ Update Documents .. facet:: :name: programming_language - :values: shell, csharp, go, java, python, perl, php, ruby, rust, scala, javascript/typescript + :values: shell, csharp, go, java, python, perl, php, ruby, rust, scala, javascript/typescript, kotlin .. meta:: :description: How to update single or multiple documents in MongoDB. How to update all or replace documents in MongoDB. How to update fields in documents in MongoDB. - :keywords: update collection, motor, java sync, java async, reactive streams, code example, node.js, compass + :keywords: update collection, motor, java sync, java async, reactive streams, code example, node.js, compass, kotlin coroutine .. contents:: On this page :local: @@ -131,6 +131,18 @@ upper-right to set the language of the following examples. |populate-inventory| + .. tab:: + :tabid: kotlin-coroutine + + This page uses the + following :driver:`Kotlin Coroutine Driver ` methods: + + - `MongoCollection.updateOne() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/update-one.html>`__ + - `MongoCollection.updateMany() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/update-many.html>`__ + - `MongoCollection.replaceOne() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/replace-one.html>`__ + + |populate-inventory| + .. tab:: :tabid: nodejs @@ -336,7 +348,7 @@ Update Documents in a Collection .. code-block:: java - combine(set( , ), set(, ) ) + combine(set(, ), set(, )) For a list of the update helpers, see `com.mongodb.client.model.Updates @@ -357,7 +369,7 @@ Update Documents in a Collection .. code-block:: java - combine(set( , ), set(, ) ) + combine(set(, ), set(, )) For a list of the update helpers, see `com.mongodb.client.model.Updates @@ -365,6 +377,25 @@ Update Documents in a Collection .. include:: /includes/fact-update-set-create-fields.rst + .. tab:: + :tabid: kotlin-coroutine + + To update a document, MongoDB provides + :ref:`update operators ` such + as :update:`$set` to modify field values. + + The driver provides the `com.mongodb.client.model.Updates + <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/model/Updates.html>`__ + class to facilitate the creation of update documents. The + following code shows an update document that uses methods + from the ``Updates`` builder class: + + .. code-block:: kotlin + + combine(set(, ), set(, )) + + .. include:: /includes/fact-update-set-create-fields.rst + .. tab:: :tabid: nodejs @@ -567,6 +598,15 @@ Update a Single Document on the ``inventory`` collection to update the *first* document where ``item`` equals ``"paper"``: + .. tab:: + :tabid: kotlin-coroutine + + The following example uses the + `MongoCollection.updateOne() + <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/update-one.html>`__ + method on the ``inventory`` collection to update the *first* + document where ``item`` equals ``"paper"``: + .. tab:: :tabid: nodejs @@ -683,6 +723,15 @@ Update Multiple Documents method on the ``inventory`` collection to update all documents where ``qty`` is less than ``50``: + .. tab:: + :tabid: kotlin-coroutine + + The following example uses the + `MongoCollection.updateMany() + <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/update-many.html>`__ + method on the ``inventory`` collection to update all documents + where ``qty`` is less than ``50``: + .. tab:: :tabid: nodejs @@ -801,6 +850,15 @@ Replace a Document .. include:: /includes/fact-update-replace-example.rst + .. tab:: + :tabid: kotlin-coroutine + + To replace the entire content of a document except for the ``_id`` + field, pass an entirely new document as the second argument to + the `MongoCollection.replaceOne() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/replace-one.html>`__ method. + + .. include:: /includes/fact-update-replace-example.rst + .. tab:: :tabid: nodejs @@ -1040,6 +1098,21 @@ Upsert Option For details on the new document created, see the individual reference pages for the methods. + .. tab:: + :tabid: kotlin-coroutine + + If the update and replace methods include the + `com.mongodb.client.model.UpdateOptions + <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/model/UpdateOptions.html>`__ + parameter that specifies ``upsert(true)``, + **and** no documents match the specified filter, then the + operation creates a new document and inserts it. If there are + matching documents, then the operation modifies or replaces + the matching document or documents. + + For details on the new document created, see the individual + reference pages for the methods. + .. tab:: :tabid: nodejs @@ -1238,6 +1311,17 @@ requested from MongoDB for write operations. For details, see - `Java Reactive Streams Driver Quick Tour `_ + .. tab:: + :tabid: kotlin-coroutine + + .. seealso:: + + - `MongoCollection.updateOne() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/update-one.html>`__ + - `MongoCollection.updateMany() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/update-many.html>`__ + - `MongoCollection.replaceOne() <{+java-api-docs+}/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/replace-one.html>`__ + + - :driver:`Kotlin Coroutine Driver Modify Documents Guide ` + .. tab:: :tabid: nodejs From c20470fe85435d33212acc91ad51ff74251e92d5 Mon Sep 17 00:00:00 2001 From: Nick Villahermosa Date: Tue, 27 Feb 2024 16:50:44 -0500 Subject: [PATCH 179/308] DOCSP-37146 Fixed expireAfterSeconds value and table entry (#6569) * Fixed expireAfterSeconds value and table entry * Taxonomy tagging * spelling --- .../core/timeseries/timeseries-procedures.txt | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/source/core/timeseries/timeseries-procedures.txt b/source/core/timeseries/timeseries-procedures.txt index f1a29e75938..1c5c411cc02 100644 --- a/source/core/timeseries/timeseries-procedures.txt +++ b/source/core/timeseries/timeseries-procedures.txt @@ -1,11 +1,20 @@ +.. meta:: + :keywords: time series, IOT, code example, node.js + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: javascript/typescript + .. _timeseries-create-query-procedures: ========================================= Create and Query a Time Series Collection ========================================= -.. default-domain:: mongodb - .. contents:: On this page :local: :backlinks: none @@ -61,7 +70,7 @@ Create a Time Series Collection After creation, you can modify granularity or bucket definitions using the :dbcommand:`collMod` method. However, - you can only increase the timespan covered by each bucket. You + you can only increase the time span covered by each bucket. You cannot decrease it. A. Define a ``granularity`` field: @@ -98,9 +107,9 @@ Create a Time Series Collection timeseries: { timeField: "timestamp", metaField: "metadata", - granularity: "seconds", - expireAfterSeconds: "86400" - } + granularity: "seconds" + }, + expireAfterSeconds: 86400 .. _time-series-fields: @@ -139,7 +148,7 @@ A time series collection includes the following fields: - integer - .. include:: /includes/time-series/fact-bucketroundingseconds-field-description.rst - * - ``timeseries.expireAfterSeconds`` + * - ``expireAfterSeconds`` - integer - Optional. Enable the automatic deletion of documents in a time series collection by specifying the number of seconds From c2bbf9b1b6d0afc1e90d35d59091781f61e813df Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Wed, 28 Feb 2024 09:12:55 -0800 Subject: [PATCH 180/308] 575 recovery (#6575) * add 2 examples to test output * add tab on host page and add "post" example * fix indent, post-code description and ref, adds c links * more examples * fix links; more testing * more examples * fix build issues * fix build issues * add 10,11,12,and13 * changing tab style * fix indentation with newer style of tabs * fix spacing * missing ` * remove other tabs sections... * add c tab to intro * adding back in tabs * add all remaining c-lang code snippets * fix indentation on post code * update dedent to match updated source code (https://github.com/mongodb/mongo-c-driver/pull/1532) * repushing to bring in latest code file * final tweak for dedentation * update delete page with C examples * add tab to see also section * found more files missing the c-lang tab * fix borked link and update text to post code * how many links can one person break? * review changes * remove cleanup code from snippets and move to the last snippet on each page only * update path to include * paths are not relative * Apply suggestions from code review Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> * remove extra line * Update source/tutorial/insert-documents.txt --------- Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> --- source/changeStreams.txt | 1 - .../driver-example-c-cleanup.rst | 10 + .../driver-example-delete-55.rst | 10 + .../driver-example-delete-56.rst | 9 + .../driver-example-delete-57.rst | 10 + .../driver-example-delete-58.rst | 11 + .../driver-example-delete-result.rst | 7 + .../driver-example-insert-1.rst | 9 + .../driver-example-insert-2.rst | 9 + .../driver-example-insert-3.rst | 10 + .../driver-example-query-10.rst | 10 + .../driver-example-query-11.rst | 9 + .../driver-example-query-12.rst | 9 + .../driver-example-query-13.rst | 9 + .../driver-example-query-14.rst | 10 + .../driver-example-query-15.rst | 9 + .../driver-example-query-16.rst | 10 + .../driver-example-query-17.rst | 9 + .../driver-example-query-18.rst | 10 + .../driver-example-query-19.rst | 10 + .../driver-example-query-20.rst | 9 + .../driver-example-query-21.rst | 10 + .../driver-example-query-22.rst | 10 + .../driver-example-query-23.rst | 10 + .../driver-example-query-24.rst | 10 + .../driver-example-query-25.rst | 10 + .../driver-example-query-26.rst | 10 + .../driver-example-query-27.rst | 10 + .../driver-example-query-28.rst | 11 + .../driver-example-query-29.rst | 10 + .../driver-example-query-30.rst | 10 + .../driver-example-query-31.rst | 10 + .../driver-example-query-32.rst | 10 + .../driver-example-query-33.rst | 10 + .../driver-example-query-34.rst | 10 + .../driver-example-query-35.rst | 9 + .../driver-example-query-36.rst | 10 + .../driver-example-query-37.rst | 9 + .../driver-example-query-38.rst | 10 + .../driver-example-query-39.rst | 10 + .../driver-example-query-40.rst | 10 + .../driver-example-query-41.rst | 11 + .../driver-example-query-42.rst | 8 + .../driver-example-query-43.rst | 10 + .../driver-example-query-44.rst | 11 + .../driver-example-query-45.rst | 9 + .../driver-example-query-46.rst | 9 + .../driver-example-query-47.rst | 9 + .../driver-example-query-48.rst | 9 + .../driver-example-query-49.rst | 9 + .../driver-example-query-50.rst | 9 +- .../driver-example-query-6.rst | 9 + .../driver-example-query-7.rst | 11 + .../driver-example-query-9.rst | 10 + .../driver-example-query-find-method.rst | 6 + .../driver-example-query-intro-no-perl.rst | 9 + .../driver-example-query-intro.rst | 7 + .../driver-example-update-51.rst | 9 + .../driver-example-update-52.rst | 10 + .../driver-example-update-53.rst | 10 + .../driver-example-update-54.rst | 11 + source/includes/extracts-filter.yaml | 588 +++++++++--------- source/tutorial/insert-documents.txt | 59 +- source/tutorial/query-documents.txt | 300 +++++---- source/tutorial/query-for-null-fields.txt | 31 + source/tutorial/remove-documents.txt | 60 ++ source/tutorial/update-documents.txt | 11 + 67 files changed, 1184 insertions(+), 440 deletions(-) create mode 100644 source/includes/driver-examples/driver-example-c-cleanup.rst diff --git a/source/changeStreams.txt b/source/changeStreams.txt index bd46d4a58b9..45e0ae8d9cb 100644 --- a/source/changeStreams.txt +++ b/source/changeStreams.txt @@ -865,7 +865,6 @@ See :ref:`change-stream-resume-token` for more information on the resume token. operation specified. - .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c :language: C :dedent: 3 diff --git a/source/includes/driver-examples/driver-example-c-cleanup.rst b/source/includes/driver-examples/driver-example-c-cleanup.rst new file mode 100644 index 00000000000..e598ec3b193 --- /dev/null +++ b/source/includes/driver-examples/driver-example-c-cleanup.rst @@ -0,0 +1,10 @@ +Be sure to also clean up any open resources by calling the +following methods, as appropriate: + +- `bson_destroy `__ + +- `mongoc_bulk_operation_destroy `__ + +- `mongoc_collection_destroy `__ + +- `mongoc_cursor_destroy `__, diff --git a/source/includes/driver-examples/driver-example-delete-55.rst b/source/includes/driver-examples/driver-example-delete-55.rst index 4d4de37fdfe..00b54936eac 100644 --- a/source/includes/driver-examples/driver-example-delete-55.rst +++ b/source/includes/driver-examples/driver-example-delete-55.rst @@ -35,6 +35,16 @@ Compass, see the :ref:`Compass documentation `. + + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 55 + :end-before: End Example 55 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-delete-56.rst b/source/includes/driver-examples/driver-example-delete-56.rst index d1091f2872d..aa2f511a373 100644 --- a/source/includes/driver-examples/driver-example-delete-56.rst +++ b/source/includes/driver-examples/driver-example-delete-56.rst @@ -8,6 +8,15 @@ db.inventory.deleteMany({}) + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 56 + :end-before: End Example 56 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-delete-57.rst b/source/includes/driver-examples/driver-example-delete-57.rst index b4046ed438c..0fa8c3172b8 100644 --- a/source/includes/driver-examples/driver-example-delete-57.rst +++ b/source/includes/driver-examples/driver-example-delete-57.rst @@ -8,6 +8,16 @@ db.inventory.deleteMany({ status : "A" }) + + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 57 + :end-before: End Example 57 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-delete-58.rst b/source/includes/driver-examples/driver-example-delete-58.rst index 04f5f93b9b2..5ce2466c775 100644 --- a/source/includes/driver-examples/driver-example-delete-58.rst +++ b/source/includes/driver-examples/driver-example-delete-58.rst @@ -46,6 +46,17 @@ #. Click :guilabel:`Delete` to confirm. Compass deletes the document from the collection. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 58 + :end-before: End Example 58 + + .. include:: /includes/driver-examples/driver-example-c-cleanup.rst + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-delete-result.rst b/source/includes/driver-examples/driver-example-delete-result.rst index 4cb942abda1..9d207514617 100644 --- a/source/includes/driver-examples/driver-example-delete-result.rst +++ b/source/includes/driver-examples/driver-example-delete-result.rst @@ -7,6 +7,13 @@ more information and examples, see :method:`~db.collection.deleteMany()`. + - id: c + content: | + The `mongoc_collection_delete_many `__ + method returns ``true`` if successful, or returns ``false`` and sets + an error if there are invalid arguments or a server or network error + occurs. + - id: python content: | The :py:meth:`~pymongo.collection.Collection.delete_many` diff --git a/source/includes/driver-examples/driver-example-insert-1.rst b/source/includes/driver-examples/driver-example-insert-1.rst index 9257aa27916..ab829beb8dc 100644 --- a/source/includes/driver-examples/driver-example-insert-1.rst +++ b/source/includes/driver-examples/driver-example-insert-1.rst @@ -15,6 +15,15 @@ .. figure:: /images/compass-insert-document-inventory.png :alt: Compass insert new document into collection + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 1 + :end-before: End Example 1 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-insert-2.rst b/source/includes/driver-examples/driver-example-insert-2.rst index feef74f81d2..a29f2811d0b 100644 --- a/source/includes/driver-examples/driver-example-insert-2.rst +++ b/source/includes/driver-examples/driver-example-insert-2.rst @@ -24,6 +24,15 @@ :compass:`Query Bar ` documentation. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 2 + :end-before: End Example 2 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-insert-3.rst b/source/includes/driver-examples/driver-example-insert-3.rst index 65ce46b6afd..0a080c35503 100644 --- a/source/includes/driver-examples/driver-example-insert-3.rst +++ b/source/includes/driver-examples/driver-example-insert-3.rst @@ -33,6 +33,16 @@ For instructions on inserting documents using |compass|, see :ref:`Insert Documents `. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 3 + :end-before: End Example 3 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-10.rst b/source/includes/driver-examples/driver-example-query-10.rst index d4c36d9c3c8..5a0af6df5f5 100644 --- a/source/includes/driver-examples/driver-example-query-10.rst +++ b/source/includes/driver-examples/driver-example-query-10.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-find-filter-query-op.png :alt: Query using query operators + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 10 + :end-before: End Example 10 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-11.rst b/source/includes/driver-examples/driver-example-query-11.rst index d8620b4869c..0fc0a23e729 100644 --- a/source/includes/driver-examples/driver-example-query-11.rst +++ b/source/includes/driver-examples/driver-example-query-11.rst @@ -21,6 +21,15 @@ .. figure:: /images/compass-find-filter-and.png :alt: Query using multiple conditions with AND + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 11 + :end-before: End Example 11 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-12.rst b/source/includes/driver-examples/driver-example-query-12.rst index 8570118a02d..b9cd282386c 100644 --- a/source/includes/driver-examples/driver-example-query-12.rst +++ b/source/includes/driver-examples/driver-example-query-12.rst @@ -21,6 +21,15 @@ .. figure:: /images/compass-find-filter-or.png :alt: Query using OR + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 12 + :end-before: End Example 12 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-13.rst b/source/includes/driver-examples/driver-example-query-13.rst index 1c694c310a5..d67da72ef4a 100644 --- a/source/includes/driver-examples/driver-example-query-13.rst +++ b/source/includes/driver-examples/driver-example-query-13.rst @@ -24,7 +24,16 @@ .. figure:: /images/compass-find-filter-and-or.png :alt: Query using AND as well as OR + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 13 + :end-before: End Example 13 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-14.rst b/source/includes/driver-examples/driver-example-query-14.rst index 21d184fa58a..65ba150b123 100644 --- a/source/includes/driver-examples/driver-example-query-14.rst +++ b/source/includes/driver-examples/driver-example-query-14.rst @@ -29,6 +29,16 @@ For instructions on inserting documents in MongoDB Compass, see :ref:`Insert Documents `. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 14 + :end-before: End Example 14 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-15.rst b/source/includes/driver-examples/driver-example-query-15.rst index bffdfd0695d..0535df5d57f 100644 --- a/source/includes/driver-examples/driver-example-query-15.rst +++ b/source/includes/driver-examples/driver-example-query-15.rst @@ -21,6 +21,15 @@ .. figure:: /images/compass-match-embedded.png :alt: Query embedded field + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 15 + :end-before: End Example 15 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-16.rst b/source/includes/driver-examples/driver-example-query-16.rst index e406f3b5736..5f1f139325f 100644 --- a/source/includes/driver-examples/driver-example-query-16.rst +++ b/source/includes/driver-examples/driver-example-query-16.rst @@ -13,6 +13,16 @@ .. figure:: /images/compass-find-embedded-no-match.png :alt: Query embedded field + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 16 + :end-before: End Example 16 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-17.rst b/source/includes/driver-examples/driver-example-query-17.rst index 01adaa36683..6e624419a1b 100644 --- a/source/includes/driver-examples/driver-example-query-17.rst +++ b/source/includes/driver-examples/driver-example-query-17.rst @@ -21,6 +21,15 @@ .. figure:: /images/compass-find-nested-field.png :alt: Query single nested field + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 17 + :end-before: End Example 17 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-18.rst b/source/includes/driver-examples/driver-example-query-18.rst index 1b632eddafb..c6f999e60db 100644 --- a/source/includes/driver-examples/driver-example-query-18.rst +++ b/source/includes/driver-examples/driver-example-query-18.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-find-nested-query-op.png :alt: Query single nested field + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 18 + :end-before: End Example 18 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-19.rst b/source/includes/driver-examples/driver-example-query-19.rst index 77b153bdbfe..bb0ff20fab9 100644 --- a/source/includes/driver-examples/driver-example-query-19.rst +++ b/source/includes/driver-examples/driver-example-query-19.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-find-embedded-and.png :alt: Query multiple nested fields + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 19 + :end-before: End Example 19 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-20.rst b/source/includes/driver-examples/driver-example-query-20.rst index 84c99a6a71e..dea273c9393 100644 --- a/source/includes/driver-examples/driver-example-query-20.rst +++ b/source/includes/driver-examples/driver-example-query-20.rst @@ -29,7 +29,16 @@ For instructions on inserting documents in MongoDB Compass, see :ref:`Insert Documents `. + - id: c + content: | + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 20 + :end-before: End Example 20 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-21.rst b/source/includes/driver-examples/driver-example-query-21.rst index e3130093f2e..004d53810d9 100644 --- a/source/includes/driver-examples/driver-example-query-21.rst +++ b/source/includes/driver-examples/driver-example-query-21.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-array-match-exact.png :alt: Query array matching exactly + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 21 + :end-before: End Example 21 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-22.rst b/source/includes/driver-examples/driver-example-query-22.rst index 2cc49f059c1..523641011fa 100644 --- a/source/includes/driver-examples/driver-example-query-22.rst +++ b/source/includes/driver-examples/driver-example-query-22.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-array-match-all.png :alt: Query array matching all criteria + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 22 + :end-before: End Example 22 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-23.rst b/source/includes/driver-examples/driver-example-query-23.rst index 2f62a55b07b..4e25301f225 100644 --- a/source/includes/driver-examples/driver-example-query-23.rst +++ b/source/includes/driver-examples/driver-example-query-23.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-array-elem-match.png :alt: Query array matching multiple criteria + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 23 + :end-before: End Example 23 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-24.rst b/source/includes/driver-examples/driver-example-query-24.rst index 49151d01f82..b577238f0f2 100644 --- a/source/includes/driver-examples/driver-example-query-24.rst +++ b/source/includes/driver-examples/driver-example-query-24.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-array-query-op.png :alt: Query array for at least one matching element + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 24 + :end-before: End Example 24 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-25.rst b/source/includes/driver-examples/driver-example-query-25.rst index 98813b6d17c..8782bf9ab8e 100644 --- a/source/includes/driver-examples/driver-example-query-25.rst +++ b/source/includes/driver-examples/driver-example-query-25.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-array-compound-filter.png :alt: Query array using a compound filter + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 25 + :end-before: End Example 25 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-26.rst b/source/includes/driver-examples/driver-example-query-26.rst index ad53ef4ae72..e6f6817ce1c 100644 --- a/source/includes/driver-examples/driver-example-query-26.rst +++ b/source/includes/driver-examples/driver-example-query-26.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-array-compound-multiple-criteria.png :alt: Query array by multiple conditions + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 26 + :end-before: End Example 26 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-27.rst b/source/includes/driver-examples/driver-example-query-27.rst index 1e5991a353f..6b9abe669e4 100644 --- a/source/includes/driver-examples/driver-example-query-27.rst +++ b/source/includes/driver-examples/driver-example-query-27.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-array-match-by-index.png :alt: Query array by index + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 27 + :end-before: End Example 27 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-28.rst b/source/includes/driver-examples/driver-example-query-28.rst index 64474a50019..df690fab865 100644 --- a/source/includes/driver-examples/driver-example-query-28.rst +++ b/source/includes/driver-examples/driver-example-query-28.rst @@ -21,6 +21,17 @@ .. figure:: /images/compass-array-query-by-size.png :alt: Query for array by number of elements + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 28 + :end-before: End Example 28 + + .. include:: /includes/driver-examples/driver-example-c-cleanup.rst + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-29.rst b/source/includes/driver-examples/driver-example-query-29.rst index dfb8a0d0b10..7b92827b25a 100644 --- a/source/includes/driver-examples/driver-example-query-29.rst +++ b/source/includes/driver-examples/driver-example-query-29.rst @@ -29,6 +29,16 @@ For instructions on inserting documents in MongoDB Compass, see :ref:`Insert Documents `. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 29 + :end-before: End Example 29 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-30.rst b/source/includes/driver-examples/driver-example-query-30.rst index ee117dd0c22..0d7222e69ae 100644 --- a/source/includes/driver-examples/driver-example-query-30.rst +++ b/source/includes/driver-examples/driver-example-query-30.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-find-nested-in-array.png :alt: Query for nested array element + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 30 + :end-before: End Example 30 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-31.rst b/source/includes/driver-examples/driver-example-query-31.rst index 6bc0a729e95..a0244af2f18 100644 --- a/source/includes/driver-examples/driver-example-query-31.rst +++ b/source/includes/driver-examples/driver-example-query-31.rst @@ -13,6 +13,16 @@ .. figure:: /images/compass-find-nested-array-no-match.png :alt: Query for nested array element + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 31 + :end-before: End Example 31 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-32.rst b/source/includes/driver-examples/driver-example-query-32.rst index 1a58d8b48e4..0c0d1ac2eca 100644 --- a/source/includes/driver-examples/driver-example-query-32.rst +++ b/source/includes/driver-examples/driver-example-query-32.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-find-array-index-embedded-doc.png :alt: Query for array element matching single condition + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 32 + :end-before: End Example 32 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-33.rst b/source/includes/driver-examples/driver-example-query-33.rst index 4160cb5d8c7..c547570adb7 100644 --- a/source/includes/driver-examples/driver-example-query-33.rst +++ b/source/includes/driver-examples/driver-example-query-33.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-find-array-embedded-field-condition.png :alt: Query for embedded field matching single condition + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 33 + :end-before: End Example 33 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-34.rst b/source/includes/driver-examples/driver-example-query-34.rst index 2af0d3075af..6336750633a 100644 --- a/source/includes/driver-examples/driver-example-query-34.rst +++ b/source/includes/driver-examples/driver-example-query-34.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-array-multiple-cond-single-doc.png :alt: Query for single document matching multiple conditions + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 34 + :end-before: End Example 34 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-35.rst b/source/includes/driver-examples/driver-example-query-35.rst index 0762e7dd9cd..09d8ab20e4a 100644 --- a/source/includes/driver-examples/driver-example-query-35.rst +++ b/source/includes/driver-examples/driver-example-query-35.rst @@ -20,6 +20,15 @@ .. figure:: /images/compass-array-multiple-cond-single-doc-2.png :alt: Query for single document matching multiple conditions + + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 35 + :end-before: End Example 35 - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-36.rst b/source/includes/driver-examples/driver-example-query-36.rst index 70d93f061d2..400a7cb2999 100644 --- a/source/includes/driver-examples/driver-example-query-36.rst +++ b/source/includes/driver-examples/driver-example-query-36.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-array-match-combination-of-elements.png :alt: Query quantity value within range + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 36 + :end-before: End Example 36 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-37.rst b/source/includes/driver-examples/driver-example-query-37.rst index 589510576fc..1fa7801c08f 100644 --- a/source/includes/driver-examples/driver-example-query-37.rst +++ b/source/includes/driver-examples/driver-example-query-37.rst @@ -21,6 +21,15 @@ .. figure:: /images/compass-array-match-combination-of-elements-2.png :alt: Query matching quantity and warehouse location + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 37 + :end-before: End Example 37 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-38.rst b/source/includes/driver-examples/driver-example-query-38.rst index cb9f625ac30..2057bd7a462 100644 --- a/source/includes/driver-examples/driver-example-query-38.rst +++ b/source/includes/driver-examples/driver-example-query-38.rst @@ -23,6 +23,16 @@ For instructions on inserting documents in MongoDB Compass, see :ref:`Insert Documents `. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 38 + :end-before: End Example 38 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-39.rst b/source/includes/driver-examples/driver-example-query-39.rst index 4ab58bd5947..84d680b432c 100644 --- a/source/includes/driver-examples/driver-example-query-39.rst +++ b/source/includes/driver-examples/driver-example-query-39.rst @@ -22,6 +22,16 @@ .. figure:: /images/compass-find-null-field.png :alt: Query null value or missing field + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 39 + :end-before: End Example 39 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-40.rst b/source/includes/driver-examples/driver-example-query-40.rst index 22bf4c69a17..ff4d3519d16 100644 --- a/source/includes/driver-examples/driver-example-query-40.rst +++ b/source/includes/driver-examples/driver-example-query-40.rst @@ -22,6 +22,16 @@ .. figure:: /images/compass-find-null-type-check.png :alt: Find null type + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 40 + :end-before: End Example 40 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-41.rst b/source/includes/driver-examples/driver-example-query-41.rst index 7f4ab958bb0..6844c21cc8f 100644 --- a/source/includes/driver-examples/driver-example-query-41.rst +++ b/source/includes/driver-examples/driver-example-query-41.rst @@ -22,6 +22,17 @@ .. figure:: /images/compass-find-null-existence-check.png :alt: Query for null value + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 41 + :end-before: End Example 41 + + .. include:: /includes/driver-examples/driver-example-c-cleanup.rst + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-42.rst b/source/includes/driver-examples/driver-example-query-42.rst index 09d39939bdc..aaba2bfa3f9 100644 --- a/source/includes/driver-examples/driver-example-query-42.rst +++ b/source/includes/driver-examples/driver-example-query-42.rst @@ -29,7 +29,15 @@ For instructions on inserting documents in MongoDB Compass, see :doc:`Insert Documents `. + - id: c + content: | + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 42 + :end-before: End Example 42 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-43.rst b/source/includes/driver-examples/driver-example-query-43.rst index f1a628c18c5..15f0c5db9b0 100644 --- a/source/includes/driver-examples/driver-example-query-43.rst +++ b/source/includes/driver-examples/driver-example-query-43.rst @@ -19,6 +19,16 @@ #. Click :guilabel:`Find`. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 43 + :end-before: End Example 43 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-44.rst b/source/includes/driver-examples/driver-example-query-44.rst index c07902a8837..33d60d3da24 100644 --- a/source/includes/driver-examples/driver-example-query-44.rst +++ b/source/includes/driver-examples/driver-example-query-44.rst @@ -30,6 +30,17 @@ #. Click :guilabel:`Find`. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 44 + :end-before: End Example 44 + + .. include:: /includes/driver-examples/driver-example-c-cleanup.rst + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-45.rst b/source/includes/driver-examples/driver-example-query-45.rst index 16583448e6a..a5e8bd794e8 100644 --- a/source/includes/driver-examples/driver-example-query-45.rst +++ b/source/includes/driver-examples/driver-example-query-45.rst @@ -29,6 +29,15 @@ #. Click :guilabel:`Find`. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 45 + :end-before: End Example 45 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-46.rst b/source/includes/driver-examples/driver-example-query-46.rst index dad905b5069..9bb8264df25 100644 --- a/source/includes/driver-examples/driver-example-query-46.rst +++ b/source/includes/driver-examples/driver-example-query-46.rst @@ -29,6 +29,15 @@ #. Click :guilabel:`Find`. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 46 + :end-before: End Example 46 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-47.rst b/source/includes/driver-examples/driver-example-query-47.rst index fae59a5a246..dc13d21c30b 100644 --- a/source/includes/driver-examples/driver-example-query-47.rst +++ b/source/includes/driver-examples/driver-example-query-47.rst @@ -32,6 +32,15 @@ #. Click :guilabel:`Find`. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 47 + :end-before: End Example 47 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-48.rst b/source/includes/driver-examples/driver-example-query-48.rst index f2c28be543e..d710fb4b03a 100644 --- a/source/includes/driver-examples/driver-example-query-48.rst +++ b/source/includes/driver-examples/driver-example-query-48.rst @@ -32,6 +32,15 @@ #. Click :guilabel:`Find`. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 48 + :end-before: End Example 48 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-49.rst b/source/includes/driver-examples/driver-example-query-49.rst index 63f5dd26e3c..6a6d9962fa3 100644 --- a/source/includes/driver-examples/driver-example-query-49.rst +++ b/source/includes/driver-examples/driver-example-query-49.rst @@ -28,6 +28,15 @@ { item: 1, status: 1, "instock.qty": 1 } #. Click :guilabel:`Find`. + + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 49 + :end-before: End Example 49 - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-50.rst b/source/includes/driver-examples/driver-example-query-50.rst index 3f7645b57d6..f72d7e4cad7 100644 --- a/source/includes/driver-examples/driver-example-query-50.rst +++ b/source/includes/driver-examples/driver-example-query-50.rst @@ -30,7 +30,14 @@ #. Click :guilabel:`Find`. - + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 50 + :end-before: End Example 50 - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-6.rst b/source/includes/driver-examples/driver-example-query-6.rst index 7e24f28bea7..6ad44f09f44 100644 --- a/source/includes/driver-examples/driver-example-query-6.rst +++ b/source/includes/driver-examples/driver-example-query-6.rst @@ -29,6 +29,15 @@ For instructions on inserting documents in MongoDB Compass, see :ref:`Insert Documents `. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 6 + :end-before: End Example 6 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-7.rst b/source/includes/driver-examples/driver-example-query-7.rst index 4cbbd40d8b1..bcdbc8a2a94 100644 --- a/source/includes/driver-examples/driver-example-query-7.rst +++ b/source/includes/driver-examples/driver-example-query-7.rst @@ -14,6 +14,17 @@ .. figure:: /images/compass-select-all.png :alt: Compass select all documents in collection + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 7 + :end-before: End Example 7 + + .. include:: /includes/driver-examples/driver-example-c-cleanup.rst + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-9.rst b/source/includes/driver-examples/driver-example-query-9.rst index 176e4f0f70a..50f13cbfa49 100644 --- a/source/includes/driver-examples/driver-example-query-9.rst +++ b/source/includes/driver-examples/driver-example-query-9.rst @@ -21,6 +21,16 @@ .. figure:: /images/compass-find-filter-inventory.png :alt: Query using equality condition + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 9 + :end-before: End Example 9 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-query-find-method.rst b/source/includes/driver-examples/driver-example-query-find-method.rst index 9e467cdcb23..3afb1b39826 100644 --- a/source/includes/driver-examples/driver-example-query-find-method.rst +++ b/source/includes/driver-examples/driver-example-query-find-method.rst @@ -15,6 +15,12 @@ :ref:`query filter parameter ` determines the select criteria: + - id: c + content: | + To select all documents in the collection, pass an empty + document as the query filter parameter to the find method. The + query filter parameter determines the select criteria: + - id: python content: | To select all documents in the collection, pass an empty diff --git a/source/includes/driver-examples/driver-example-query-intro-no-perl.rst b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst index ed9ab4e5a83..a39e135b0ef 100644 --- a/source/includes/driver-examples/driver-example-query-intro-no-perl.rst +++ b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst @@ -15,6 +15,15 @@ This page provides examples of |query_operations| using :ref:`MongoDB Compass `. + .. include:: /includes/driver-examples/examples-intro.rst + + - id: c + content: | + + This page provides examples of |query_operations| using + `mongoc_collection_find_with_opts `__. + + .. include:: /includes/driver-examples/examples-intro.rst - id: python diff --git a/source/includes/driver-examples/driver-example-query-intro.rst b/source/includes/driver-examples/driver-example-query-intro.rst index 3ecf928cd97..5d083b3e9d0 100644 --- a/source/includes/driver-examples/driver-example-query-intro.rst +++ b/source/includes/driver-examples/driver-example-query-intro.rst @@ -8,6 +8,13 @@ .. include:: /includes/driver-examples/examples-intro.rst + - id: c + content: | + This page provides examples of |query_operations| using + `mongoc_collection_find_with_opts `__. + + .. include:: /includes/driver-examples/examples-intro.rst + - id: compass content: | This page provides examples of |query_operations| using diff --git a/source/includes/driver-examples/driver-example-update-51.rst b/source/includes/driver-examples/driver-example-update-51.rst index 058870010cb..93141232fd3 100644 --- a/source/includes/driver-examples/driver-example-update-51.rst +++ b/source/includes/driver-examples/driver-example-update-51.rst @@ -39,6 +39,15 @@ For instructions on inserting documents using |compass|, see :ref:`Insert Documents `. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 51 + :end-before: End Example 51 + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-update-52.rst b/source/includes/driver-examples/driver-example-update-52.rst index e4405a7dc24..d4f16398c54 100644 --- a/source/includes/driver-examples/driver-example-update-52.rst +++ b/source/includes/driver-examples/driver-example-update-52.rst @@ -107,6 +107,16 @@ :ref:`Field Update Operators `, you must manually enter the date value in Compass. + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 52 + :end-before: End Example 52 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-update-53.rst b/source/includes/driver-examples/driver-example-update-53.rst index 00bf3e88f6d..b3a8e6a273a 100644 --- a/source/includes/driver-examples/driver-example-update-53.rst +++ b/source/includes/driver-examples/driver-example-update-53.rst @@ -16,6 +16,16 @@ .. include:: /includes/fact-update-many-operation-uses.rst + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 53 + :end-before: End Example 53 + + - id: python content: | diff --git a/source/includes/driver-examples/driver-example-update-54.rst b/source/includes/driver-examples/driver-example-update-54.rst index 06b82b9d78d..68436526e65 100644 --- a/source/includes/driver-examples/driver-example-update-54.rst +++ b/source/includes/driver-examples/driver-example-update-54.rst @@ -11,6 +11,17 @@ { item: "paper", instock: [ { warehouse: "A", qty: 60 }, { warehouse: "B", qty: 40 } ] } ) + - id: c + content: | + + .. literalinclude:: /driver-examples/test-mongoc-sample-commands.c + :language: c + :dedent: 3 + :start-after: Start Example 54 + :end-before: End Example 54 + + .. include:: /includes/driver-examples/driver-example-c-cleanup.rst + - id: python content: | diff --git a/source/includes/extracts-filter.yaml b/source/includes/extracts-filter.yaml index 31dfb0ab1d4..6bf3df79eed 100644 --- a/source/includes/extracts-filter.yaml +++ b/source/includes/extracts-filter.yaml @@ -24,11 +24,21 @@ content: | { : , ... } - - id: python - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: + - id: c + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: + + .. code-block:: c + + { : , ... } + + - id: python + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: .. code-block:: python @@ -137,299 +147,301 @@ content: | ref: filter-equality-embedded content: | - .. tabs-drivers:: - - tabs: - - id: shell - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: compass - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: python - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: motor - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: java-sync - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the filter document - ``eq( , )`` where ```` is the document - to match. - - - id: java-async - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the filter document - ``eq( , )`` where ```` is the document - to match. - - - id: kotlin-coroutine - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the filter document - ``eq( , )``, where ```` is the document - to match. - - - id: nodejs - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ : }`` where ```` is the document - to match. - - - id: php - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``[ => ]`` where ```` is the document - to match. - - - id: perl - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ => }`` where ```` is the document - to match. - - - id: ruby - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the - :ref:`query filter document ` - ``{ => }`` where ```` is the document - to match. - - - id: scala - content: | - To specify an equality condition on a field that is an - embedded/nested document, use the filter document - ``equal( , )`` where ```` is the document - to match. - - - id: csharp - content: | - To specify an equality condition on a field that is an - embedded/nested document, construct a filter using the - :csharp-api:`Eq - ` - method: - - .. code-block:: c# - - Builders.Filter.Eq(, ) + .. tabs-drivers:: + + tabs: + - id: shell + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: compass + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: c + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: python + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: motor + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: java-sync + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the filter document + ``eq( , )`` where ```` is the document + to match. + + - id: java-async + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the filter document + ``eq( , )`` where ```` is the document + to match. + + - id: nodejs + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ : }`` where ```` is the document + to match. + + - id: php + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``[ => ]`` where ```` is the document + to match. + + - id: perl + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ => }`` where ```` is the document + to match. + + - id: ruby + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the + :ref:`query filter document ` + ``{ => }`` where ```` is the document + to match. + + - id: scala + content: | + To specify an equality condition on a field that is an + embedded/nested document, use the filter document + ``equal( , )`` where ```` is the document + to match. + + - id: csharp + content: | + To specify an equality condition on a field that is an + embedded/nested document, construct a filter using the + :csharp-api:`Eq + ` + method: + + .. code-block:: c# + + Builders.Filter.Eq(, ) + + ```` is the document to match. - ```` is the document to match. --- ref: filter-equality-array content: | - .. tabs-drivers:: - - tabs: - - id: shell - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: compass - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: python - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: motor - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: java-sync - content: | - To specify equality condition on an array, use the query - document ``eq(, )`` where ```` is - the exact array to match, including the order of the - elements. - - - id: java-async - content: | - To specify equality condition on an array, use the query - document ``eq(, )`` where ```` is - the exact array to match, including the order of the - elements. - - - id: kotlin-coroutine - content: | - To specify equality condition on an array, use the query - document ``eq(, )``, where ```` is - the exact array to match, including the order of the - elements. - - - id: nodejs - content: | - To specify equality condition on an array, use the query - document ``{ : }`` where ```` is the - exact array to match, including the order of the elements. - - - id: php - content: | - To specify equality condition on an array, use the query - document ``[ => ]`` where ```` is the - exact array to match, including the order of the elements. - - - id: perl - content: | - To specify equality condition on an array, use the query - document ``{ => }`` where ```` is the - exact array to match, including the order of the elements. - - - id: ruby - content: | - To specify equality condition on an array, use the query - document ``{ => }`` where ```` is the - exact array to match, including the order of the elements. + .. tabs-drivers:: + + tabs: + - id: shell + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: compass + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: c + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: python + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: motor + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: java-sync + content: | + To specify equality condition on an array, use the query + document ``eq( , )`` where ```` is + the exact array to match, including the order of the + elements. + + - id: java-async + content: | + To specify equality condition on an array, use the query + document ``eq( , )`` where ```` is + the exact array to match, including the order of the + elements. + + - id: nodejs + content: | + To specify equality condition on an array, use the query + document ``{ : }`` where ```` is the + exact array to match, including the order of the elements. + + - id: php + content: | + To specify equality condition on an array, use the query + document ``[ => ]`` where ```` is the + exact array to match, including the order of the elements. + + - id: perl + content: | + To specify equality condition on an array, use the query + document ``{ => }`` where ```` is the + exact array to match, including the order of the elements. + + - id: ruby + content: | + To specify equality condition on an array, use the query + document ``{ => }`` where ```` is the + exact array to match, including the order of the elements. + + - id: scala + content: | + To specify equality condition on an array, use the query + document ``equal( , )`` where ```` is + the exact array to match, including the order of the + elements. + + - id: csharp + content: | + To specify equality condition on an array, construct a filter + using the :csharp-api:`Eq + ` method: + + .. code-block:: c# + + Builders.Filter.Eq(, ) + + ```` is the exact array to match, including the + order of the elements. - - id: scala - content: | - To specify equality condition on an array, use the query - document ``equal( , )`` where ```` is - the exact array to match, including the order of the - elements. - - - id: csharp - content: | - To specify equality condition on an array, construct a filter - using the :csharp-api:`Eq - ` method: - - .. code-block:: c# - - Builders.Filter.Eq(, ) - - ```` is the exact array to match, including the - order of the elements. --- ref: filter-equality-array-element content: | - .. tabs-drivers:: + .. tabs-drivers:: - tabs: - - id: shell - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ : }`` where ```` is the element value. + tabs: + - id: shell + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ : }`` where ```` is the element value. - - id: python - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ : }`` where ```` is the element value. + - id: c + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ : }`` where ```` is the element value. - - id: motor - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ : }`` where ```` is the element value. + - id: python + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ : }`` where ```` is the element value. - - id: java-sync - content: | + - id: motor + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ : }`` where ```` is the element value. - To query if the array field contains at least *one* element - with the specified value, use the filter - ``eq(, )`` where ```` is the element value. + - id: java-sync + content: | - - id: java-async - content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``eq( , )`` where ```` is the element value. - To query if the array field contains at least *one* element - with the specified value, use the filter - ``eq(, )`` where value is the element value. + - id: java-async + content: | - - id: kotlin-coroutine - content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``eq( , )`` where value is the element value. - To query if the array field contains at least *one* element - with the specified value, use the filter - ``eq(, )``, where ```` is the element value. + - id: nodejs + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ : }`` where ```` is the element value. - - id: nodejs - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ : }`` where ```` is the element value. + - id: php + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``[ => ]`` where ```` is the element value. - - id: php - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``[ => ]`` where ```` is the element value. + - id: perl + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter - - id: perl - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter + ``{ => }`` where value is the element value. - ``{ => }`` where value is the element value. + - id: ruby + content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``{ => }`` where ```` is the element value. - - id: ruby - content: | - To query if the array field contains at least *one* element - with the specified value, use the filter - ``{ => }`` where ```` is the element value. + - id: scala + content: | - - id: scala - content: | + To query if the array field contains at least *one* element + with the specified value, use the filter + ``equal( , )`` where ```` is the element value. - To query if the array field contains at least *one* element - with the specified value, use the filter - ``equal( , )`` where ```` is the element value. + - id: csharp + content: | + To query if the array field contains at least *one* element + with the specified value, construct a filter using the + :csharp-api:`Eq + ` method: - - id: csharp - content: | - To query if the array field contains at least *one* element - with the specified value, construct a filter using the - :csharp-api:`Eq - ` method: + .. code-block:: c# - .. code-block:: c# + Builders.Filter.Eq(, ) - Builders.Filter.Eq(, ) + ```` is the element value to match. - ```` is the element value to match. --- ref: filter-query-operators content: | @@ -457,11 +469,21 @@ content: | { : { : }, ... } - - id: python - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: + - id: c + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: + + .. code-block:: c + + { : { : }, ... } + + - id: python + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: .. code-block:: python @@ -617,11 +639,21 @@ content: | { : { : , ... } } - - id: motor - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: + - id: c + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: + + .. code-block:: c + + { : { : , ... } } + + - id: python + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: .. code-block:: python diff --git a/source/tutorial/insert-documents.txt b/source/tutorial/insert-documents.txt index b08cb066a06..c54b483e3be 100644 --- a/source/tutorial/insert-documents.txt +++ b/source/tutorial/insert-documents.txt @@ -11,11 +11,11 @@ Insert Documents .. facet:: :name: programming_language - :values: shell, csharp, go, java, python, perl, php, ruby, scala, javascript/typescript, kotlin + :values: c, shell, csharp, go, java, python, perl, php, ruby, scala, javascript/typescript, kotlin .. meta:: :description: Examples of how to insert documents using MongoDB, including creating a collection upon first insert. - :keywords: motor, java sync, java async, reactive streams, code example, node.js, compass + :keywords: c, motor, java sync, java async, reactive streams, code example, node.js, compass .. contents:: On this page :local: @@ -137,6 +137,15 @@ Insert a Single Document The following example inserts a new document into the ``test.inventory`` collection: + .. tab:: + :tabid: c + + The following example inserts a new document into the + ``inventory`` collection. If the document does not specify + an ``_id`` field, the C driver adds the ``_id`` field + with an ObjectId value to the new document. For more information, see + :ref:`write-op-insert-behavior`. + .. tab:: :tabid: python @@ -325,6 +334,13 @@ Insert a Single Document For more information on the ``_id`` field, see :ref:`_id Field `. + .. tab:: + :tabid: c + + `mongoc_collection_insert_one `__ + returns ``true`` if successful, or returns ``false`` and sets error if + there are invalid arguments or a server or network error. + .. tab:: :tabid: python @@ -436,13 +452,6 @@ To retrieve the document that you just inserted, :ref:`query the collection Insert Multiple Documents ------------------------- ----------- - -|arrow| Use the **Select your language** drop-down menu in the -upper-right to set the language of the examples on this page. - ----------- - .. tabs-drivers:: .. tab:: @@ -460,6 +469,19 @@ upper-right to set the language of the examples on this page. .. tab:: :tabid: compass + + .. tab:: + :tabid: c + + `mongoc_bulk_operation_insert_with_opts `__ + inserts *multiple* :ref:`documents ` into a + collection. You must pass an iterable of documents to the method. + + The following example inserts three new documents into the + ``inventory`` collection. If the documents do not specify an + ``_id`` field, the C driver adds the ``_id`` field with + an ObjectId value to each document. See :ref:`write-op-insert-behavior`. + .. tab:: :tabid: python @@ -627,6 +649,16 @@ upper-right to set the language of the examples on this page. To retrieve the inserted documents, :ref:`query the collection `: + .. tab:: + :tabid: c + + `mongoc_bulk_operation_insert_with_opts `__ + returns ``true`` on success, or ``false`` if passed invalid arguments. + + To retrieve the inserted documents, use + `mongoc_collection_find_with_opts `__ to + :ref:`query the collection `: + .. tab:: :tabid: python @@ -802,6 +834,15 @@ requested from MongoDB for write operations. For details, see - :ref:`additional-inserts` + .. tab:: + :tabid: c + + .. seealso:: + + - `mongoc_bulk_operation_insert_with_opts `__ + + - :ref:`additional-inserts` + .. tab:: :tabid: python diff --git a/source/tutorial/query-documents.txt b/source/tutorial/query-documents.txt index 4ca54ded140..673ad73bc19 100644 --- a/source/tutorial/query-documents.txt +++ b/source/tutorial/query-documents.txt @@ -12,7 +12,7 @@ Query Documents .. facet:: :name: programming_language - :values: csharp, go, java, go, javascript/typescript, perl, php, python, ruby, scala, shell, kotlin + :values: c, csharp, go, java, go, javascript/typescript, perl, php, python, ruby, scala, shell, kotlin .. meta:: :description: MongoDB Manual: how to query documents and top-level fields, perform equality match, query with query operators, and specify compound query conditions. @@ -67,6 +67,11 @@ the following SQL statement: For more information on the MongoDB Compass query bar, see :ref:`Query Bar `. + - id: c + content: | + For more information on the syntax of the method, see + `mongoc_collection_find_with_opts `__. + - id: python content: | For more information on the syntax of the method, see @@ -334,6 +339,12 @@ Cursor For more information on sampling in MongoDB Compass, see the :ref:`Compass FAQ `. + - id: c + content: | + The `mongoc_collection_find `__ + method returns a :doc:`cursor ` to the + matching documents. + - id: python content: | The :py:meth:`pymongo.collection.Collection.find` method @@ -438,215 +449,202 @@ Additional Methods and Options .. tabs-drivers:: - tabs: - - id: shell - content: | + .. tab:: + :tabid: shell - The following methods can also read documents from a collection: + The following can also read documents from a collection: - - :method:`db.collection.findOne` + - The :method:`db.collection.findOne` method - - In :ref:`aggregation pipeline `, the - :pipeline:`$match` pipeline stage provides access to MongoDB - queries. + - The :pipeline:`$match` pipeline stage in an + :ref:`aggregation pipeline `. The + ``$match`` pipeline stage provides access to MongoDB + queries - .. note:: - The :method:`db.collection.findOne()` method also performs a read - operation to return a single document. Internally, the - :method:`db.collection.findOne()` method is the - :method:`db.collection.find()` method with a limit of 1. + .. note:: - - id: compass - content: | + The :method:`db.collection.findOne()` method performs the same + operation as the :method:`db.collection.find()` method with a limit of 1. - In addition to ``filter``, MongoDB Compass also allows the - following options to be passed to the query bar: + .. tab:: + :tabid: compass + + In addition to ``filter``, MongoDB Compass also allows you to pass the + following options to the query bar: - .. list-table:: - :widths: 25 75 + .. list-table:: + :widths: 25 75 - * - :compass:`Project ` + * - :compass:`Project ` - - Specify which fields to return in the resulting data. + - Specify which fields to return in the resulting data. - * - :compass:`Sort ` + * - :compass:`Sort ` - - Specify the sort order of the returned documents. + - Specify the sort order of the returned documents. - * - :compass:`Skip ` + * - :compass:`Skip ` - - Specify the first n-number of document to skip before returning the result set. + - Specify the first n-number of document to skip before returning the result set. - * - :compass:`Limit ` + * - :compass:`Limit ` - - Specify the maximum number of documents to return. + - Specify the maximum number of documents to return. - - id: python - content: | + .. tab:: + :tabid: c - The following methods can also read documents from a collection: + The following method can also read documents from a collection: - - :py:meth:`pymongo.collection.Collection.find_one` + - `mongoc_find_and_modify_opts_t `__ - - In :ref:`aggregation pipeline `, the - :pipeline:`$match` pipeline stage provides access to MongoDB - queries. See the `PyMongo Aggregation Examples `_. + .. tab:: + :tabid: python - .. note:: - The :py:meth:`pymongo.collection.Collection.find_one` - method also performs a read operation to return a single - document. Internally, the - :py:meth:`pymongo.collection.Collection.find_one` method is - the :py:meth:`pymongo.collection.Collection.find` method - with a limit of 1. + The following can also read documents from a collection: - - id: java-sync - content: | + - :py:meth:`pymongo.collection.Collection.find_one` - The following methods can also read documents from a collection: + - In an :ref:`aggregation pipeline `, the + :pipeline:`$match` pipeline stage provides access to MongoDB + queries. See the `PyMongo Aggregation Examples `_. + + .. note:: - - In the :ref:`aggregation pipeline `, - the :pipeline:`$match` pipeline stage provides access to - MongoDB queries. See the `Java Synchronous Driver Aggregation - Examples`_. + The :py:meth:`pymongo.collection.Collection.find_one` + method performs the same operation as the + the :py:meth:`pymongo.collection.Collection.find` method + with a limit of 1. - - id: java-async - content: | + .. tab:: + :tabid: java-sync - The following methods can also read documents from a collection: + The following can also read documents from a collection: - - In :ref:`aggregation pipeline `, - the :pipeline:`$match` pipeline stage provides access to - MongoDB queries. See `com.mongodb.reactivestreams.client.MongoCollection.aggregate - `_ - for more information. + - In the :ref:`aggregation pipeline `, + the :pipeline:`$match` pipeline stage provides access to + MongoDB queries. See the `Java Synchronous Driver Aggregation + Examples`_. - - id: kotlin-coroutine - content: | - The following methods can also read documents from a collection: + .. tab:: + :tabid: kotlin-coroutine - - In an :ref:`aggregation pipeline `, - the :pipeline:`$match` pipeline stage allows you to perform - MongoDB queries. See the :driver:`Kotlin Coroutine Driver - Find Operation Examples - ` - to learn more. + The following methods can also read documents from a collection: - - id: nodejs - content: | + - In an :ref:`aggregation pipeline `, + the :pipeline:`$match` pipeline stage allows you to perform + MongoDB queries. See the :driver:`Kotlin Coroutine Driver + Find Operation Examples + ` + to learn more. - The following methods can also read documents from a collection: + .. tab:: + :tabid: nodejs - - :node-api:`Collection.findOne() ` + The following can also read documents from a collection: - - In :ref:`aggregation pipeline `, the - :pipeline:`$match` pipeline stage provides access to MongoDB - queries. See the MongoDB Node.js Driver's - :node-docs:`aggregation tutorial`. + - :node-api:`Collection.findOne() ` + + - In :ref:`aggregation pipeline `, the + :pipeline:`$match` pipeline stage provides access to MongoDB + queries. See the MongoDB Node.js Driver's + :node-docs:`aggregation tutorial`. + + .. note:: - .. note:: - The :node-api:`Collection.findOne() ` - method also performs a read operation to return a single - document. Internally, the - :node-api:`Collection.findOne() ` - method is the - :node-api:`Collection.find() ` method - with a limit of 1. + The :node-api:`Collection.findOne() ` + method performs the same operation as the + :node-api:`Collection.find() ` method + with a limit of 1. - - id: php - content: | + .. tab:: + :tabid: php - The following methods can also read documents from a collection: + The following can also read documents from a collection: - - :phpmethod:`MongoDB\\Collection::findOne() ` + - :phpmethod:`MongoDB\\Collection::findOne() ` - - In :ref:`aggregation pipeline `, the - :pipeline:`$match` pipeline stage provides access to MongoDB - queries. See the MongoDB PHP Library's - :ref:`aggregation example `. + - In :ref:`aggregation pipeline `, the + :pipeline:`$match` pipeline stage provides access to MongoDB + queries. See the MongoDB PHP Library's + :ref:`aggregation example `. - .. note:: - The :phpmethod:`MongoDB\\Collection::findOne() ` - method also performs a read operation to return a single - document. Internally, the - :phpmethod:`MongoDB\\Collection::findOne() ` - method is the - :phpmethod:`MongoDB\\Collection::find() ` - method with a limit of 1. + .. note:: - - id: perl - content: | + The :phpmethod:`MongoDB\\Collection::findOne() ` + method performs the same operation as the + :phpmethod:`MongoDB\\Collection::find() ` + method with a limit of 1. - The following methods can also read documents from a collection: + .. tab:: + :tabid: perl - - :perl-api:`MongoDB::Collection::find_one()` + The following can also read documents from a collection: - - In :ref:`aggregation pipeline `, the - :pipeline:`$match` pipeline stage provides access to MongoDB - queries. See the MongoDB Perl driver's - `aggregation examples `__. + - :perl-api:`MongoDB::Collection::find_one()` - .. note:: - The :perl-api:`MongoDB::Collection::find_one()` - method also performs a read operation to return a single - document. Internally, the - :perl-api:`MongoDB::Collection::find_one()` - method is the - :perl-api:`MongoDB::Collection::find()` - method with a limit of 1. + - In :ref:`aggregation pipeline `, the + :pipeline:`$match` pipeline stage provides access to MongoDB + queries. See the MongoDB Perl driver's + `aggregation examples `__. - - id: ruby - content: | + .. note:: - The following methods can also read documents from a collection: + The :perl-api:`MongoDB::Collection::find_one()` + method performs the same operation as the + :perl-api:`MongoDB::Collection::find()` + method with a limit of 1. - - In :ref:`aggregation pipeline `, the - :pipeline:`$match` pipeline stage provides access to MongoDB - queries. See the MongoDB Ruby driver's - :ruby:`aggregation examples `. + .. tab:: + :tabid: ruby - - id: scala - content: | + The following can also read documents from a collection: - The following methods can also read documents from a collection: + - In :ref:`aggregation pipeline `, the + :pipeline:`$match` pipeline stage provides access to MongoDB + queries. See the MongoDB Ruby driver's + :ruby:`aggregation examples `. - - In :ref:`aggregation pipeline `, the - :pipeline:`$match` pipeline stage provides access to MongoDB - queries. See the MongoDB Scala driver's :scala-api:`aggregate method `. + .. tab:: + :tabid: scala - - id: csharp - content: | + The following can also read documents from a collection: - The following methods can also read documents from a collection: + - In :ref:`aggregation pipeline `, the + :pipeline:`$match` pipeline stage provides access to MongoDB + queries. See the MongoDB Scala driver's :scala-api:`aggregate method `. - - :csharp-api:`MongoCollection.FindOne() ` + .. tab:: + :tabid: csharp - - In :ref:`aggregation pipeline `, the - :pipeline:`$match` pipeline stage provides access to MongoDB - queries. See the MongoDB C# driver's - :csharp-docs:`LINQ documentation `. + The following can also read documents from a collection: - .. note:: - The :csharp-api:`MongoCollection.FindOne() ` - method also performs a read operation to return a single - document. Internally, the - :csharp-api:`MongoCollection.FindOne() ` - method is the - :csharp-api:`MongoCollection.Find() ` - method with a limit of 1. + - :csharp-api:`MongoCollection.FindOne() ` - - id: go - content: | + - In :ref:`aggregation pipeline `, the + :pipeline:`$match` pipeline stage provides access to MongoDB + queries. See the MongoDB C# driver's + :csharp-docs:`LINQ documentation `. + + .. note:: + + The :csharp-api:`MongoCollection.FindOne() ` + method performs the same operation as the + :csharp-api:`MongoCollection.Find() ` + method with a limit of 1. + + .. tab:: + :tabid: go - The following methods can also read documents from a collection: + The following can also read documents from a collection: - - :go-api:`Collection.FindOne ` + - :go-api:`Collection.FindOne ` - - In :ref:`aggregation pipeline `, - the :pipeline:`$match` pipeline stage provides access to - MongoDB queries. See - :go-api:`Collection.Aggregate`. + - In :ref:`aggregation pipeline `, + the :pipeline:`$match` pipeline stage provides access to + MongoDB queries. See + :go-api:`Collection.Aggregate`. .. toctree:: :titlesonly: diff --git a/source/tutorial/query-for-null-fields.txt b/source/tutorial/query-for-null-fields.txt index 0f4f40dd95e..dad216b4e11 100644 --- a/source/tutorial/query-for-null-fields.txt +++ b/source/tutorial/query-for-null-fields.txt @@ -41,6 +41,12 @@ Different query operators in MongoDB treat ``null`` values differently. .. tabs-drivers:: tabs: + - id: c + content: | + .. important:: + Use ``BCON_NULL`` with the MongoDB C driver to + query for ``null`` or missing fields in MongoDB. + - id: python content: | .. important:: @@ -106,6 +112,12 @@ Equality Filter contain the ``item`` field whose value is ``null`` *or* that do not contain the ``item`` field. + - id: c + content: | + The ``{ item, BCON_NULL }`` query matches documents that either + contain the ``item`` field whose value is ``null`` *or* that + do not contain the ``item`` field. + - id: python content: | The ``{ item : None }`` query matches documents that either @@ -201,6 +213,13 @@ documents where the ``item`` field exists *and* has a non-null value. { item: { $ne : null } } + - id: c + content: | + .. code-block:: c + + filter = BCON_NEW ("item", BCON_NULL); + cursor = mongoc_collection_find_with_opts (collection, filter, NULL, NULL); + - id: python content: | .. code-block:: python @@ -294,6 +313,13 @@ Type Check ``null``; i.e. the value of the ``item`` field is of :ref:`BSON Type ` ``Null`` (BSON Type 10): + - id: c + content: | + The ``{ item, { $type, BCON_NULL } }`` query matches *only* + documents that contain the ``item`` field whose value is + ``null``; i.e. the value of the ``item`` field is of + :ref:`BSON Type ` ``Null`` (BSON Type 10): + - id: python content: | The ``{ item : { $type: 10 } }`` query matches *only* @@ -396,6 +422,11 @@ field. [#type0]_ The ``{ item : { $exists: false } }`` query matches documents that do not contain the ``item`` field: + - id: c + content: | + The ``{ item, { $exists, BCON_BOOL (false) } }`` query matches documents + that do not contain the ``item`` field: + - id: python content: | The ``{ item : { $exists: False } }`` query matches documents diff --git a/source/tutorial/remove-documents.txt b/source/tutorial/remove-documents.txt index 44279bf7d87..9e611ef36d6 100644 --- a/source/tutorial/remove-documents.txt +++ b/source/tutorial/remove-documents.txt @@ -54,6 +54,16 @@ You can delete documents in MongoDB using the following methods: Populate the ``inventory`` collection with the following documents: + - id: c + content: | + This page uses the following `MongoDB C Driver `__ + methods: + + - `mongoc_collection_delete_one `__ + - `mongoc_collection_delete_many `__ + + .. include:: /includes/driver-examples/examples-intro.rst + - id: python content: | This page uses the following @@ -193,6 +203,18 @@ Delete All Documents .. include:: /includes/fact-delete-all-inventory.rst + - id: c + content: | + + To delete all documents from a collection, pass the + `mongoc_collection_t `__ + and a `bson_t `__ + that matches all documents to the + `mongoc_collection_delete_many `__ + method. + + .. include:: /includes/fact-delete-all-inventory.rst + - id: python content: | @@ -329,6 +351,22 @@ Delete All Documents that Match a Condition .. include:: /includes/fact-remove-condition-inv-example.rst + - id: c + content: | + + .. include:: /includes/fact-delete-condition-inventory.rst + + .. include:: /includes/extracts/filter-equality.rst + + .. include:: /includes/extracts/filter-query-operators.rst + + To delete all documents that match a deletion criteria, pass the + `mongoc_collection_t `__ + and a `bson_t `__ + that matches the documents to be deleted to the + `mongoc_collection_delete_many `__ + method. + - id: python content: | @@ -542,6 +580,18 @@ Delete Only One Document that Matches a Condition and List View in Compass, refer to the :ref:`Compass documentation `. + - id: c + content: | + + To delete a single document from a collection, pass the + `mongoc_collection_t `__ + and a `bson_t `__ + that matches the document you want to delete to the + `mongoc_collection_delete_one `__ + method. + + .. include:: /includes/fact-delete-all-inventory.rst + - id: python content: | @@ -766,6 +816,16 @@ requested from MongoDB for write operations. For details, see - :ref:`Compass Query Bar ` + - id: c + content: | + .. seealso:: + + - `mongoc_collection_delete_one `__ + + - `mongoc_collection_delete_many `__ + + - :ref:`additional-deletes` + - id: python content: | .. seealso:: diff --git a/source/tutorial/update-documents.txt b/source/tutorial/update-documents.txt index ffd59dc7d8b..12732c7ca8b 100644 --- a/source/tutorial/update-documents.txt +++ b/source/tutorial/update-documents.txt @@ -69,6 +69,17 @@ upper-right to set the language of the following examples. Populate the ``inventory`` collection with the following documents: + .. tab:: + :tabid: c + + This page uses the following `MongoDB C Driver `__ + methods: + + - `mongoc_collection_update_one `__ + - `mongoc_collection_replace_one `__ + + |populate-inventory| + .. tab:: :tabid: python From bfbc8eb4a053faef00501165644e61df96899011 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 28 Feb 2024 09:31:52 -0800 Subject: [PATCH 181/308] DOCSP-37135 tcmallocAggressiveMemoryDecommit Default Value (#6556) --- source/reference/parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index c47e303f2a4..8a6b1a44a25 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -1802,7 +1802,7 @@ General Parameters *Type*: integer (``0`` or ``1`` only) - Default: 1 + Default: 0 If you enable ``tmallocAggressiveMemoryDecommit``, MongoDB: From 4f3fd8d2b5bbb1e5d015aff426b34886684b9ed7 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 28 Feb 2024 09:32:20 -0800 Subject: [PATCH 182/308] DOCS-16635 Fix Incorrect convertToCapped Sharding Statement (#6564) * DOCS-16635 Fix Incorrect convertToCapped Sharding Statement * warning title --- source/reference/command/convertToCapped.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/reference/command/convertToCapped.txt b/source/reference/command/convertToCapped.txt index 78e8fb8a83e..31e38a65ca5 100644 --- a/source/reference/command/convertToCapped.txt +++ b/source/reference/command/convertToCapped.txt @@ -15,11 +15,11 @@ Definition .. dbcommand:: convertToCapped - .. warning:: Do Not Run This Command In Sharded Clusters + .. warning:: Do Not Run This Command On Sharded Collections MongoDB does **not** support the :dbcommand:`convertToCapped` - command in a sharded cluster. + command on sharded collections. The :dbcommand:`convertToCapped` command converts an existing, non-capped collection to a :term:`capped collection` within the same From 4d19f712cc600bbe4a84f6873e1fd73d12948463 Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Wed, 28 Feb 2024 12:33:09 -0500 Subject: [PATCH 183/308] DOCS-15625-shards-must-be-replica-sets (#6566) * DOCS-15625-shards-must-be-replica-sets * Centralizing content and replacing with includes. --- source/core/sharded-cluster-components.txt | 16 +--------------- .../includes/fact-sharded-cluster-components.rst | 8 ++++---- source/sharding.txt | 14 +------------- .../tutorial/troubleshoot-sharded-clusters.txt | 2 +- 4 files changed, 7 insertions(+), 33 deletions(-) diff --git a/source/core/sharded-cluster-components.txt b/source/core/sharded-cluster-components.txt index 8ecdfc59e16..da17716a09a 100644 --- a/source/core/sharded-cluster-components.txt +++ b/source/core/sharded-cluster-components.txt @@ -16,21 +16,7 @@ Sharded Cluster Components :depth: 1 :class: singlecol -A MongoDB :term:`sharded cluster` consists of the following components: - -* :ref:`shard `: Each shard contains a - subset of the sharded data. As of MongoDB 3.6, shards must be deployed - as a :term:`replica set`. - -* :doc:`/core/sharded-cluster-query-router`: The ``mongos`` acts as a - query router, providing an interface between client applications and - the sharded cluster. Starting in MongoDB 4.4, :binary:`~bin.mongos` - can support :ref:`hedged reads ` to minimize - latencies. - -* :ref:`config servers `: Config - servers store metadata and configuration settings for the cluster. As - of MongoDB 3.4, config servers must be deployed as a replica set (CSRS). +.. include:: /includes/fact-sharded-cluster-components.rst .. _sc-production-configuration: diff --git a/source/includes/fact-sharded-cluster-components.rst b/source/includes/fact-sharded-cluster-components.rst index 3e5078d6755..c723d06c13d 100644 --- a/source/includes/fact-sharded-cluster-components.rst +++ b/source/includes/fact-sharded-cluster-components.rst @@ -1,15 +1,15 @@ A MongoDB :term:`sharded cluster` consists of the following components: - :ref:`shard `: Each shard contains a - subset of the sharded data. Each shard can be deployed as a :term:`replica + subset of the sharded data. Each shard must be deployed as a :term:`replica set`. - :doc:`/core/sharded-cluster-query-router`: The ``mongos`` acts as a query router, providing an interface between client applications and the - sharded cluster. + sharded cluster. Starting in MongoDB 4.4, :binary:`~bin.mongos` + can support :ref:`hedged reads ` to minimize + latencies. - :ref:`config servers `: Config servers store metadata and configuration settings for the cluster. As of MongoDB 3.4, config servers must be deployed as a replica set (CSRS). - -.. COMMENT TODO post code review, use this include file in /core/sharded-cluster-components.txt and /sharding.txt since they had duplicate content. diff --git a/source/sharding.txt b/source/sharding.txt index 7626e6a7e6e..7f5b98ee9d5 100644 --- a/source/sharding.txt +++ b/source/sharding.txt @@ -81,19 +81,7 @@ MongoDB supports *horizontal scaling* through :term:`sharding`. Sharded Cluster --------------- -A MongoDB :term:`sharded cluster` consists of the following components: - -* :ref:`shard `: Each shard contains a - subset of the sharded data. Each shard can be deployed as a :term:`replica - set`. - -* :doc:`/core/sharded-cluster-query-router`: The ``mongos`` acts as a - query router, providing an interface between client applications and - the sharded cluster. Starting in MongoDB 4.4, ``mongos`` can support - :ref:`hedged reads ` to minimize latencies. - -* :ref:`config servers `: Config - servers store metadata and configuration settings for the cluster. +.. include:: /includes/fact-sharded-cluster-components.rst The following graphic describes the interaction of components within a sharded cluster: diff --git a/source/tutorial/troubleshoot-sharded-clusters.txt b/source/tutorial/troubleshoot-sharded-clusters.txt index d34aa9d42f5..2c322992515 100644 --- a/source/tutorial/troubleshoot-sharded-clusters.txt +++ b/source/tutorial/troubleshoot-sharded-clusters.txt @@ -128,7 +128,7 @@ To ensure cluster availability: Config Database String Error ---------------------------- -Config servers can be deployed as replica +Config servers must be deployed as replica sets. The :binary:`~bin.mongos` instances for the sharded cluster must specify the same config server replica set name but can specify hostname and port of different members of the replica set. From 8eba66ebf2a04fa1fcda8fbf5aa59073dd7cc527 Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Wed, 28 Feb 2024 09:57:38 -0800 Subject: [PATCH 184/308] DOCSP-37116 fsync backup clarification (#6539) * DOCSP-37116 fsync Backup Version * Adds notice on mongodump page * Fixes heading * Reworks to existing includes * Fixes build issue * Fixes build issue * Minor edit * Minor edits * Minor edits * Minor edits * Fixes build issue * Minor edits * Adds version limitation to filesystem snapshots. * Fixes text * Reworks include * Reworks include * Fixes build issue * Reworks include * Reworks include * Vale fixes * Vale fixes * Vale fixes * Fixes link * Fixes link * Fixes per Sarah * Fixes per Nandini --- source/includes/fsync-mongos.rst | 6 +- source/reference/command/fsync.txt | 60 +++++++++---------- source/reference/command/fsyncUnlock.txt | 32 +++++----- source/reference/method/db.fsyncLock.txt | 21 ++++--- source/reference/method/db.fsyncUnlock.txt | 10 ++-- ...up-sharded-cluster-with-database-dumps.txt | 10 ++++ ...rded-cluster-with-filesystem-snapshots.txt | 11 ++++ .../backup-with-filesystem-snapshots.txt | 6 +- 8 files changed, 85 insertions(+), 71 deletions(-) diff --git a/source/includes/fsync-mongos.rst b/source/includes/fsync-mongos.rst index 8c2f82447a1..1b3f78dee65 100644 --- a/source/includes/fsync-mongos.rst +++ b/source/includes/fsync-mongos.rst @@ -1,3 +1,5 @@ -When the |fsync| runs on :program:`mongos`, it performs the fysnc operation on the -primary config server as well as the primary members of each shard in the cluster. +Starting in MongoDB 7.1 (also available starting in 7.0.2, +6.0.11, 5.0.22, and 4.4.25) |fsyncLockUnlock| can run on +:program:`mongos` to lock and unlock a sharded cluster. + diff --git a/source/reference/command/fsync.txt b/source/reference/command/fsync.txt index 3461ab59b57..ae1cbf5ff04 100644 --- a/source/reference/command/fsync.txt +++ b/source/reference/command/fsync.txt @@ -17,21 +17,19 @@ fsync .. meta:: :description: fsync, fsynclock, fsync lock, lock :keywords: fsync, fsynclock, fsync lock, lock - + Definition ---------- .. dbcommand:: fsync - Flushes all pending writes from the storage layer to disk. When the ``lock`` + Flushes all pending writes from the storage layer to disk. When the ``lock`` field is set to ``true``, it sets a lock on the server or cluster to prevent additional writes until the lock is released. - - - .. versionadded:: 7.1 - .. |fsync| replace:: ``fsync`` command - .. include:: /includes/fsync-mongos + .. |fsyncLockUnlock| replace:: the ``fsync`` and + :dbcommand:`fsyncUnlock` commands + .. include:: /includes/fsync-mongos As applications write data, MongoDB records the data in the storage layer and then writes the data to disk within the @@ -50,7 +48,7 @@ Definition Compatibility ------------- -This command is available in deployments hosted in the following environments: +This command is available in deployments hosted in the following environments: .. include:: /includes/fact-environments-atlas-only.rst @@ -66,11 +64,11 @@ The command has the following syntax: .. code-block:: javascript db.adminCommand( - { - fsync: 1, - lock: , + { + fsync: 1, + lock: , fsyncLockAcquisitionTimeout: , - comment: + comment: } ) @@ -81,20 +79,20 @@ The command has the following fields: .. list-table:: :header-rows: 1 - :widths: 20 20 60 - + :widths: 20 20 60 + * - Field - Type - Description - + * - ``fsync`` - integer - Enter "1" to apply :dbcommand:`fsync`. - * - ``fsyncLockAcquisitionTimeoutMillis`` + * - ``fsyncLockAcquisitionTimeoutMillis`` - integer - Optional. Specifies the amount of time in milliseconds to wait to - acquire locks. If the lock acquisition operation times out, the + acquire locks. If the lock acquisition operation times out, the command returns a failed response. Default: ``90000`` @@ -106,13 +104,13 @@ The command has the following fields: - Optional. Takes a lock on the server or cluster and blocks all write operations. Each ``fsync`` with ``lock`` operation takes a lock. - + * - ``comment`` - any - .. include:: /includes/extracts/comment-content.rst - + .. versionadded:: 4.4 - + Considerations -------------- @@ -124,8 +122,8 @@ Impact on Larger Deployments .. versionadded:: 7.1 When the ``fsync`` command runs on :program:`mongos`, it performs the fsync -operation on the entire cluster. By setting the ``lock`` field to ``true``, -it sets a lock on the cluster, preventing additional writes. +operation on the entire cluster. By setting the ``lock`` field to ``true``, +it sets a lock on the cluster, preventing additional writes. To take a usable self-managed backup, before locking a sharded cluster: @@ -146,7 +144,7 @@ Lock Count The ``fsync`` command returns a document includes a ``lockCount`` field. When run on :program:`mongod`, the count indicates the number of fsync locks set on -the server. +the server. When run on a sharded cluster, :program:`mongos` sends the fsync operation to each shard and returns the results, which includes the ``lockCount`` for each. @@ -154,9 +152,9 @@ each shard and returns the results, which includes the ``lockCount`` for each. .. note:: - If the ``lockCount`` field is non-zero, all writes are blocked on the server - and cluster. To reduce the lock count, use the :dbcommand:`fsyncUnlock` - command. + If the ``lockCount`` field is greater than zero, all writes + are blocked on the server and cluster. To reduce the lock + count, use the :dbcommand:`fsyncUnlock` command. Fsync Locks after Failures ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -166,7 +164,7 @@ Fsync locks execute on the primary in a replica set or sharded cluster. If the primary goes down or becomes unreachable due to network issues, the cluster :ref:`elects ` a new primary from the available secondaries. If a primary with an fsync lock goes down, the new primary does -**not** retain the fsync lock and can handle write operations. When elections +**not** retain the fsync lock and can handle write operations. When elections occur during backup operations, the resulting backup may be inconsistent or unusable. @@ -181,7 +179,7 @@ To recover from the primary going down: #. Restart the backup. -Additionally, fsync locks are persistent. When the old primary comes online +Additionally, fsync locks are persistent. When the old primary comes online again, you need to use the :dbcommand:`fsyncUnlock` command to release the lock on the node. @@ -197,7 +195,7 @@ Fsync Lock .. include:: /includes/extracts/wt-fsync-lock-compatibility-command.rst The ``fsync`` command can lock an individual :program:`mongod` instance or a -sharded cluster through :program:`mongos`. When run with the ``lock`` field +sharded cluster through :program:`mongos`. When run with the ``lock`` field set to ``true``, the fsync operation flushes all data to the storage layer and blocks all additional write operations until you unlock the instance or cluster. @@ -221,7 +219,7 @@ operation and the ``lockCount``: "ok" : 1 } -When locked, write operations are blocked. Separate connections may continue +When locked, write operations are blocked. Separate connections may continue read operations until the first attempt at a write operation, then they also wait until the sever or cluster is unlocked. @@ -235,7 +233,7 @@ wait until the sever or cluster is unlocked. lock, you must issue a corresponding number of unlock operations to unlock the server or cluster for writes. -Fsync Unlock +Fsync Unlock ~~~~~~~~~~~~ To unlock a server of cluster, use the :dbcommand:`fsyncUnlock` command: diff --git a/source/reference/command/fsyncUnlock.txt b/source/reference/command/fsyncUnlock.txt index a90c26e073d..ceaf522ab57 100644 --- a/source/reference/command/fsyncUnlock.txt +++ b/source/reference/command/fsyncUnlock.txt @@ -23,14 +23,12 @@ Definition .. dbcommand:: fsyncUnlock - Reduces the lock count on the server or cluster. To enable write operations, + Reduces the lock count on the server or cluster. To enable write operations, the lock count must be zero. - - .. versionadded:: 7.1 - - .. |fsync| replace:: ``fsyncUnlock`` command - .. include:: /includes/fsync-mongos + .. |fsyncLockUnlock| replace:: the :dbcommand:`fsync` and + ``fsyncUnlock`` commands + .. include:: /includes/fsync-mongos Use this command to unblock writes after you finish a backup operation. @@ -46,7 +44,7 @@ Definition Compatibility ------------- -This command is available in deployments hosted in the following environments: +This command is available in deployments hosted in the following environments: .. include:: /includes/fact-environments-atlas-only.rst @@ -61,11 +59,11 @@ The command has the following syntax: .. code-block:: javascript - db.adminCommand( - { - fsyncUnlock: 1, - comment: - } + db.adminCommand( + { + fsyncUnlock: 1, + comment: + } ) The ``comment`` field is optional and may contain a comment of any data @@ -79,19 +77,19 @@ The operation returns a document with the following fields: .. list-table:: :header-rows: 1 :widths: 30 70 - + * - Field - Description - + * - ``info`` - Information on the status of the operation - + * - ``lockCount`` (*New in version 3.4*) - The number of locks remaining on the instance after the operation. - + * - ``ok`` - The status code. - + Examples -------- diff --git a/source/reference/method/db.fsyncLock.txt b/source/reference/method/db.fsyncLock.txt index 27ecf10879c..441c7c6222b 100644 --- a/source/reference/method/db.fsyncLock.txt +++ b/source/reference/method/db.fsyncLock.txt @@ -24,13 +24,12 @@ Definition .. method:: db.fsyncLock() Flushes all pending writes from the storage layer to disk and locks the - server to prevent any additional writes until the lock is released. + server to prevent any additional writes until the lock is released. - .. versionadded:: 7.1 + .. |fsyncLockUnlock| replace:: the ``db.fsyncLock()`` and + :method:`db.fsyncUnlock` methods + .. include:: /includes/fsync-mongos - .. |fsync| replace:: ``db.fsyncLock()`` method - .. include:: /includes/fsync-mongos - .. |dbcommand| replace:: :dbcommand:`fsync` command .. include:: /includes/fact-mongosh-shell-method-alt.rst @@ -53,14 +52,14 @@ Definition * - ``info`` - Information on the status of the operation. - * - ``lockCount`` + * - ``lockCount`` - Number of locks currently on the instance. - * - ``seeAlso`` + * - ``seeAlso`` - Link to the :dbcommand:`fsync` command documentation. - * - ``ok`` + * - ``ok`` - The status code. - :method:`db.fsyncLock()` is an administrative command. Use this method to + :method:`db.fsyncLock()` is an administrative command. Use this method to lock a server or cluster before :ref:`backup operations `. Behavior @@ -78,7 +77,7 @@ Fsync locks execute on the primary in a replica set or sharded cluster. If the primary goes down or becomes unreachable due to network issues, the cluster :ref:`elects ` a new primary from the available secondaries. If a primary with an fsync lock goes down, the new primary does -**not** retain the fsync lock and can handle write operations. When elections +**not** retain the fsync lock and can handle write operations. When elections occur during backup operations, the resulting backup may be inconsistent or unusable. @@ -94,7 +93,7 @@ To recover from the primary going down: #. Restart the backup. -Additionally, fsync locks are persistent. When the old primary comes online +Additionally, fsync locks are persistent. When the old primary comes online again, you need to run the :method:`db.fsyncUnlock` command to release the lock on the node. diff --git a/source/reference/method/db.fsyncUnlock.txt b/source/reference/method/db.fsyncUnlock.txt index b99abaa36d7..9c36708ede4 100644 --- a/source/reference/method/db.fsyncUnlock.txt +++ b/source/reference/method/db.fsyncUnlock.txt @@ -25,10 +25,9 @@ Definition Reduces the lock count on the server to renable write operations. - .. versionadded:: 7.1 - - .. |fsync| replace:: ``db.fsyncUnlock()`` method - .. include:: /includes/fsync-mongos + .. |fsyncLockUnlock| replace:: the :method:`db.fsyncLock` and + ``db.fsyncUnlock()`` methods + .. include:: /includes/fsync-mongos .. |dbcommand| replace:: :dbcommand:`fsyncUnlock` command .. include:: /includes/fact-mongosh-shell-method-alt.rst @@ -68,7 +67,7 @@ Compatibility .. |command| replace:: method -This method is available in deployments hosted in the following environments: +This method is available in deployments hosted in the following environments: .. include:: /includes/fact-environments-atlas-only.rst @@ -76,7 +75,6 @@ This method is available in deployments hosted in the following environments: .. include:: /includes/fact-environments-onprem-only.rst - Compatibility with WiredTiger ----------------------------- diff --git a/source/tutorial/backup-sharded-cluster-with-database-dumps.txt b/source/tutorial/backup-sharded-cluster-with-database-dumps.txt index a5225ab7121..d234f4da302 100644 --- a/source/tutorial/backup-sharded-cluster-with-database-dumps.txt +++ b/source/tutorial/backup-sharded-cluster-with-database-dumps.txt @@ -42,6 +42,16 @@ Before you Begin This task uses :program:`mongodump` to back up a sharded cluster. Ensure that you have a cluster running that contains data in sharded collections. +Version Compatibility +~~~~~~~~~~~~~~~~~~~~~ + +This procedure requires a version of MongoDB that supports fsync +locking from :program:`mongos`. + +.. |fsyncLockUnlock| replace:: the :dbcommand:`fsync` and + :dbcommand:`fsyncUnlock` commands +.. include:: /includes/fsync-mongos + Admin Privileges ~~~~~~~~~~~~~~~~ diff --git a/source/tutorial/backup-sharded-cluster-with-filesystem-snapshots.txt b/source/tutorial/backup-sharded-cluster-with-filesystem-snapshots.txt index d5408ca618b..377a671fd6e 100644 --- a/source/tutorial/backup-sharded-cluster-with-filesystem-snapshots.txt +++ b/source/tutorial/backup-sharded-cluster-with-filesystem-snapshots.txt @@ -67,6 +67,17 @@ data files do not change during the backup. .. include:: /includes/fact-backup-snapshots-with-ebs-in-raid10.rst +Version Compatibility +~~~~~~~~~~~~~~~~~~~~~ + +This procedure requires a version of MongoDB that supports fsync +locking from :program:`mongos`. + +.. |fsyncLockUnlock| replace:: the :dbcommand:`fsync` and + :dbcommand:`fsyncUnlock` commands +.. include:: /includes/fsync-mongos + + Steps ----- diff --git a/source/tutorial/backup-with-filesystem-snapshots.txt b/source/tutorial/backup-with-filesystem-snapshots.txt index 17e78603e7f..60486db9f35 100644 --- a/source/tutorial/backup-with-filesystem-snapshots.txt +++ b/source/tutorial/backup-with-filesystem-snapshots.txt @@ -6,8 +6,6 @@ Back Up and Restore with Filesystem Snapshots .. default-domain:: mongodb - - .. contents:: On this page :local: :backlinks: none @@ -73,7 +71,7 @@ that all writes accepted by the database need to be fully written to disk: either to the :term:`journal` or to data files. If there are writes that are not on disk when the backup occurs, the backup -will not reflect these changes. +will not reflect these changes. For the WiredTiger storage engine, the data files reflect a consistent state as of the last :ref:`checkpoint @@ -227,7 +225,7 @@ snapshot image, such as with the following procedure: The above command sequence does the following: -- Ensures that the ``/dev/vg0/mdb-snap01`` device is not mounted. Never +- Ensures that the ``/dev/vg0/mdb-snap01`` device is not mounted. Never take a block level copy of a filesystem or filesystem snapshot that is mounted. From 992c2303a28be980f91f21554127f4d5bc4ea154 Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:02:22 -0800 Subject: [PATCH 185/308] DOCSP-33746 Removes Capped Collection from compact (#6571) --- source/reference/command/compact.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/reference/command/compact.txt b/source/reference/command/compact.txt index e4f3c3add13..9fbb19e278d 100644 --- a/source/reference/command/compact.txt +++ b/source/reference/command/compact.txt @@ -316,12 +316,6 @@ as a maintenance operation. You cannot issue ``compact`` against a :binary:`~bin.mongos` instance. -Capped Collections -~~~~~~~~~~~~~~~~~~ - -On :ref:`WiredTiger `, the ``compact`` -command will attempt to compact the collection. - Index Building ~~~~~~~~~~~~~~ From 176b247a73a610a7e82dd8123771446eeb458263 Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Wed, 28 Feb 2024 11:50:20 -0800 Subject: [PATCH 186/308] DOCSP-37048 7.2.1 Release Notes and Changelog (#6565) * DOCSP-37048 7.2.1 Release Notes and Changelog * adds release date --- source/includes/changelogs/releases/7.2.1.rst | 35 +++++++++++++++++-- source/release-notes/7.2.txt | 4 +-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/source/includes/changelogs/releases/7.2.1.rst b/source/includes/changelogs/releases/7.2.1.rst index ace21e5db72..6d846bfb97a 100644 --- a/source/includes/changelogs/releases/7.2.1.rst +++ b/source/includes/changelogs/releases/7.2.1.rst @@ -31,6 +31,7 @@ rather than listSearchIndexes privilege action as it intended Storage ~~~~~~~ +:issue:`WT-11062` Safe free the ref addr to allow concurrent access WiredTiger `````````` @@ -38,6 +39,7 @@ WiredTiger - :issue:`WT-11845` Fix transaction visibility issue with truncate - :issue:`WT-11911` Fix use-after-free with bounded cursor and search_near +- :issue:`WT-12036` Workaround for lock contention on Windows Internals ~~~~~~~~~ @@ -58,6 +60,8 @@ Internals - :issue:`SERVER-82221` listCollections and listIndexes should include commit-pending namespaces - :issue:`SERVER-82313` Fix cancelling txn api from the caller +- :issue:`SERVER-82353` Multi-document transactions can miss documents + when movePrimary runs concurrently - :issue:`SERVER-82365` Optimize the construction of the balancer's collection distribution status histogram (2nd attempt) - :issue:`SERVER-82437` db.collection.getSearchIndexes() @@ -82,6 +86,8 @@ Internals on macOS - :issue:`SERVER-83369` Index creation does not enforce type of bucketSize field +- :issue:`SERVER-83454` Range Deleter Service registration and + de-registration should not rely on onCommit ordering guarantees - :issue:`SERVER-83492` Remove limit and skip values from SBE plan cache key if possible - :issue:`SERVER-83534` Allow IDL generator to accomodate query_shape @@ -113,11 +119,17 @@ Internals migrations have completed - :issue:`SERVER-84130` Incorrect bucket-level filter optimization when some events in the bucket are missing the field +- :issue:`SERVER-84137` Robustify + batched_multi_deletes_with_write_conflicts.js - :issue:`SERVER-84186` Add benchmark that runs math operations in Timeseries to sys perf - :issue:`SERVER-84241` AsioTransportLayer::stopAcceptingSessions can deadlock if called before listener thread started listening +- :issue:`SERVER-84274` Make InListData sort and dedup its elements + up-front - :issue:`SERVER-84278` Don't generate plan cache entries for EOF plans +- :issue:`SERVER-84336` Timeseries inserts can leave dangling BSONObj in + WriteBatches in certain cases - :issue:`SERVER-84338` Top level $or queries may lead to invalid SBE plan cache entry which returns wrong results - :issue:`SERVER-84353` The test for stepDown deadlock with read ticket @@ -134,16 +146,35 @@ Internals branch - :issue:`SERVER-84546` switch asan statically linked test to dynamic link +- :issue:`SERVER-84548` Using ShardServerCatalogCacheLoader on configsvr + causes excessive WT data handles / memory usage - :issue:`SERVER-84567` writeQueryStats should log an error rather than uassert when the feature flag is disabled - :issue:`SERVER-84731` Resharding aggregation query should not acquire RSTL-IX when waiting lastStableRecoveryTimestamp - :issue:`SERVER-85263` Report escaped client application name -- :issue:`WT-11062` Safe free the ref addr to allow concurrent access +- :issue:`SERVER-85306` Update sys-perf config to use HTTPs github links + rather than SSH +- :issue:`SERVER-85652` Update DSI atlas azure tasks to use an AL2 + compile artifact. +- :issue:`SERVER-85694` $searchMeta aggregation pipeline stage not + passing correct query to mongot after PlanShardedSearch +- :issue:`SERVER-85776` Disable test facet_stats in replicated settings. +- :issue:`SERVER-85792` Backport new variants added to perf.yml over to + sys-perf-7.2 +- :issue:`SERVER-85836` TenantFileImporter service should skip the + feature document while iterating through the donor mdb_catlog table. +- :issue:`SERVER-85959` Remove streams benchmarks from v7.2 +- :issue:`SERVER-86081` Sys-perf missing required parameters due to + Evergreen Redaction +- :issue:`SERVER-86165` Avoid stepdowns in merge_command_options.js +- :issue:`SERVER-86363` Make container registry login silent +- :issue:`SERVER-86381` Delete copybara staging file on v7.2 +- :issue:`SERVER-86481` Jepsen set, register, and read concern majority + tests are not running in Evergreen - :issue:`WT-11669` Create new log record for backup ids - :issue:`WT-11987` Table's version number dropped to version=(major=1,minor=0) -- :issue:`WT-12036` Workaround for lock contention on Windows - :issue:`WT-12043` Remove obsolete HAVE_DIAGNOSTIC ifdefs to avoid memory leak - :issue:`WT-12092` Update the WiredTiger version in dockerfile diff --git a/source/release-notes/7.2.txt b/source/release-notes/7.2.txt index 4da167c8739..9a10f372c96 100644 --- a/source/release-notes/7.2.txt +++ b/source/release-notes/7.2.txt @@ -19,8 +19,8 @@ Patch Releases .. _7.2.1-release-notes: -7.2.1 - Upcoming -~~~~~~~~~~~~~~~~ +7.2.1 - February 27, 2024 +~~~~~~~~~~~~~~~~~~~~~~~~~ Issues fixed: From e29da599f2e5c79bf37391a79e5aceec6e9d7269 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Wed, 28 Feb 2024 11:52:16 -0800 Subject: [PATCH 187/308] Fix indents bug (#6613) * fix indentation errors * another indentation error and missing line * spacing issues within code examples * experimenting removal to track down build error * add back in blocks * fix indentation near bottom of page * more indentation issues found. Updated C# wording to match other languages * throwing darts * two code-blocks mis-indented --- .../driver-example-query-intro-no-perl.rst | 6 +- source/includes/extracts-filter.yaml | 781 +++++++++--------- source/tutorial/query-for-null-fields.txt | 10 +- 3 files changed, 393 insertions(+), 404 deletions(-) diff --git a/source/includes/driver-examples/driver-example-query-intro-no-perl.rst b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst index a39e135b0ef..91a1392c21c 100644 --- a/source/includes/driver-examples/driver-example-query-intro-no-perl.rst +++ b/source/includes/driver-examples/driver-example-query-intro-no-perl.rst @@ -17,13 +17,11 @@ .. include:: /includes/driver-examples/examples-intro.rst - - id: c + - id: c content: | This page provides examples of |query_operations| using - `mongoc_collection_find_with_opts `__. - - + `mongoc_collection_find_with_opts `__. .. include:: /includes/driver-examples/examples-intro.rst - id: python diff --git a/source/includes/extracts-filter.yaml b/source/includes/extracts-filter.yaml index 6bf3df79eed..cb4745837db 100644 --- a/source/includes/extracts-filter.yaml +++ b/source/includes/extracts-filter.yaml @@ -1,148 +1,148 @@ ref: filter-equality content: | - .. tabs-drivers:: - - tabs: - - id: shell - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: - - .. code-block:: javascript - - { : , ... } - - - id: compass - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: - - .. code-block:: javascript - - { : , ... } + .. tabs-drivers:: - - id: c + tabs: + - id: shell content: | To specify equality conditions, use ``:`` expressions in the :ref:`query filter document `: - .. code-block:: c + .. code-block:: javascript { : , ... } - - id: python + - id: compass content: | To specify equality conditions, use ``:`` expressions in the :ref:`query filter document `: - .. code-block:: python - - { : , ... } - - - id: motor - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: - - .. code-block:: python - - { : , ... } - - - id: java-sync - content: | - To specify equality conditions, use the - ``com.mongodb.client.model.Filters.eq_`` method to create the - :ref:`query filter document `: - - .. code-block:: java - - and(eq( , ), eq( , ) ...) - - - id: java-async - content: | - To specify equality conditions, use the - com.mongodb.client.model.Filters.eq_ method to create the - :ref:`query filter document `: - - .. code-block:: java - - and(eq( , ), eq( , ) ...) - - - id: kotlin-coroutine - content: | - To specify equality conditions, use the - ``com.mongodb.client.model.Filters.eq_`` method to create the - :ref:`query filter document `: - - .. code-block:: kotlin - - and(eq( , ), eq( , ) ...) - - - id: nodejs - content: | - To specify equality conditions, use ``:`` - expressions in the - :ref:`query filter document `: - - .. code-block:: javascript - - { : , ... } - - - id: php - content: | - To specify equality conditions, use `` => `` - expressions in the - :ref:`query filter document `: - - .. code-block:: php - - [ => , ... ] - - - id: perl - content: | - To specify equality conditions, use `` => `` - expressions in the - :ref:`query filter document `: - - .. code-block:: perl - - { => , ... } + .. code-block:: javascript - - id: ruby - content: | - To specify equality conditions, use `` => `` - expressions in the - :ref:`query filter document `: - - .. code-block:: ruby + { : , ... } - { => , ... } + - id: c + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: - - id: scala - content: | - To specify equality conditions, use the - ``com.mongodb.client.model.Filters.eq_`` method to create the - :ref:`query filter document `: + .. code-block:: c - .. code-block:: scala + { : , ... } - and(equal(, ), equal(, ) ...) + - id: python + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: - - id: csharp - content: | - To specify equality conditions, construct a filter using the - :csharp-api:`Eq - ` method: + .. code-block:: python - .. code-block:: c# + { : , ... } - Builders.Filter.Eq(, ); + - id: motor + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: + + .. code-block:: python + + { : , ... } + + - id: java-sync + content: | + To specify equality conditions, use the + ``com.mongodb.client.model.Filters.eq_`` method to create the + :ref:`query filter document `: + + .. code-block:: java + + and(eq( , ), eq( , ) ...) + + - id: java-async + content: | + To specify equality conditions, use the + com.mongodb.client.model.Filters.eq_ method to create the + :ref:`query filter document `: + + .. code-block:: java + + and(eq( , ), eq( , ) ...) + + - id: kotlin-coroutine + content: | + To specify equality conditions, use the + ``com.mongodb.client.model.Filters.eq_`` method to create the + :ref:`query filter document `: + + .. code-block:: kotlin + + and(eq( , ), eq( , ) ...) + + - id: nodejs + content: | + To specify equality conditions, use ``:`` + expressions in the + :ref:`query filter document `: + + .. code-block:: javascript + + { : , ... } + + - id: php + content: | + To specify equality conditions, use `` => `` + expressions in the + :ref:`query filter document `: + + .. code-block:: php + + [ => , ... ] + + - id: perl + content: | + To specify equality conditions, use `` => `` + expressions in the + :ref:`query filter document `: + + .. code-block:: perl + + { => , ... } + + - id: ruby + content: | + To specify equality conditions, use `` => `` + expressions in the + :ref:`query filter document `: + + .. code-block:: ruby + + { => , ... } + + - id: scala + content: | + To specify equality conditions, use the + ``com.mongodb.client.model.Filters.eq_`` method to create the + :ref:`query filter document `: + + .. code-block:: scala + + and(equal(, ), equal(, ) ...) + + - id: csharp + content: | + To specify equality conditions, construct a filter using the + :csharp-api:`Eq + ` method: + + .. code-block:: c# + + Builders.Filter.Eq(, ); --- ref: filter-equality-embedded content: | @@ -249,13 +249,12 @@ content: | embedded/nested document, construct a filter using the :csharp-api:`Eq ` - method: + method, where ```` is the document to match: .. code-block:: c# Builders.Filter.Eq(, ) - ```` is the document to match. --- ref: filter-equality-array @@ -343,14 +342,15 @@ content: | content: | To specify equality condition on an array, construct a filter using the :csharp-api:`Eq - ` method: + ` method, + where ```` is the exact array to match, including the + order of the elements: .. code-block:: c# Builders.Filter.Eq(, ) - ```` is the exact array to match, including the - order of the elements. + --- ref: filter-equality-array-element @@ -434,210 +434,201 @@ content: | To query if the array field contains at least *one* element with the specified value, construct a filter using the :csharp-api:`Eq - ` method: + ` method, + where ```` is the element value to match: .. code-block:: c# Builders.Filter.Eq(, ) - ```` is the element value to match. --- ref: filter-query-operators content: | - .. tabs-drivers:: - - tabs: - - id: shell - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: - - .. code-block:: javascript - - { : { : }, ... } - - - id: compass - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: - - .. code-block:: javascript - - { : { : }, ... } - + .. tabs-drivers:: + + tabs: + - id: shell + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: + + .. code-block:: javascript + + { : { : }, ... } + + - id: compass + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: + + .. code-block:: javascript + + { : { : }, ... } + - id: c content: | A :ref:`query filter document ` can use the :ref:`query operators ` to specify conditions in the following form: - + .. code-block:: c - - { : { : }, ... } + + { : { : }, ... } - id: python content: | A :ref:`query filter document ` can use the :ref:`query operators ` to specify conditions in the following form: + + .. code-block:: python + + { : { : }, ... } + + - id: motor + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: + + .. code-block:: python + + { : { : }, ... } + + - id: java-sync + content: | + + In addition to the equality condition, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the + com.mongodb.client.model.Filters_ helper methods to + facilitate the creation of filter documents. For example: + + .. code-block:: java + + and(gte(, ), lt(, ), eq(, )) + + - id: java-async + content: | + + In addition to the equality condition, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the + com.mongodb.client.model.Filters_ helper methods to + facilitate the creation of filter documents. For example: + + .. code-block:: java + + and(gte(, ), lt(, ), eq(, )) + + - id: kotlin-coroutine + content: | + + In addition to the equality condition, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the `com.mongodb.client.model.Filters <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/model/Filters.html>`__ helper methods to + facilitate the creation of filter documents. For example: + + .. code-block:: kotlin + + and(gte(, ), lt(, ), eq(, )) + + - id: nodejs + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: + + .. code-block:: javascript + + { : { : }, ... } + + - id: php + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: + + .. code-block:: php + + [ => [ => ], ... ] + + - id: perl + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: + + .. code-block:: perl + + { => { => }, ... } + + - id: ruby + content: | + A :ref:`query filter document ` can + use the :ref:`query operators ` to specify + conditions in the following form: + + .. code-block:: ruby + + { => { => }, ... } + + - id: scala + content: | + + In addition to the equality condition, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the + ``com.mongodb.client.model.Filters_`` helper methods to + facilitate the creation of filter documents. For example: + + .. code-block:: scala + + and(gte(, ), lt(, ), equal(, )) + + - id: csharp + content: | + In addition to the equality filter, MongoDB provides + various :ref:`query operators ` to specify + filter conditions. Use the + :csharp-api:`FilterDefinitionBuilder ` + methods to create a filter document. For example: + + .. code-block:: c# + + var builder = Builders.Filter; + builder.And(builder.Eq(, ), builder.Lt(, )); - .. code-block:: python - - { : { : }, ... } - - - id: motor - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: - - .. code-block:: python - - { : { : }, ... } - - - id: java-sync - content: | - - In addition to the equality condition, MongoDB provides - various :ref:`query operators ` to specify - filter conditions. Use the - com.mongodb.client.model.Filters_ helper methods to - facilitate the creation of filter documents. For example: - - .. code-block:: java - - and(gte(, ), lt(, ), eq(, )) - - - id: java-async - content: | - - In addition to the equality condition, MongoDB provides - various :ref:`query operators ` to specify - filter conditions. Use the - com.mongodb.client.model.Filters_ helper methods to - facilitate the creation of filter documents. For example: - - .. code-block:: java - - and(gte(, ), lt(, ), eq(, )) - - - id: kotlin-coroutine - content: | - - In addition to the equality condition, MongoDB provides - various :ref:`query operators ` to specify - filter conditions. Use the `com.mongodb.client.model.Filters <{+java-api-docs+}/mongodb-driver-core/com/mongodb/client/model/Filters.html>`__ helper methods to - facilitate the creation of filter documents. For example: - - .. code-block:: kotlin - - and(gte(, ), lt(, ), eq(, )) - - - id: nodejs - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: - - .. code-block:: javascript - - { : { : }, ... } - - - id: php - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: - - .. code-block:: php - - [ => [ => ], ... ] - - - id: perl - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: - - .. code-block:: perl - - { => { => }, ... } - - - id: ruby - content: | - A :ref:`query filter document ` can - use the :ref:`query operators ` to specify - conditions in the following form: - - .. code-block:: ruby - - { => { => }, ... } - - - id: scala - content: | - - In addition to the equality condition, MongoDB provides - various :ref:`query operators ` to specify - filter conditions. Use the - ``com.mongodb.client.model.Filters_`` helper methods to - facilitate the creation of filter documents. For example: - - .. code-block:: scala - - and(gte(, ), lt(, ), equal(, )) - - - id: csharp - content: | - In addition to the equality filter, MongoDB provides - various :ref:`query operators ` to specify - filter conditions. Use the - :csharp-api:`FilterDefinitionBuilder ` - methods to create a filter document. For example: - - .. code-block:: c# - - var builder = Builders.Filter; - builder.And(builder.Eq(, ), builder.Lt(, )); --- ref: filter-query-operators-array content: | - .. tabs-drivers:: - - tabs: - - id: shell - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: - - .. code-block:: javascript - - { : { : , ... } } - - - id: compass - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: - - .. code-block:: javascript - - { : { : , ... } } - - - id: python - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: - - .. code-block:: python - - { : { : , ... } } + .. tabs-drivers:: + + tabs: + - id: shell + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: + + .. code-block:: javascript + + { : { : , ... } } + + - id: compass + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: + + .. code-block:: javascript + + { : { : , ... } } - id: c content: | @@ -655,97 +646,97 @@ content: | use :ref:`query operators ` in the :ref:`query filter document `: - .. code-block:: python - - { : { : , ... } } - - - id: java-sync - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `. For example: - - .. code-block:: java - - and(gte(, ), lt(, ) ...) - - - id: java-async - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `. For example: - - .. code-block:: java - - and(gte(, ), lt(, ) ...) - - - id: kotlin-coroutine - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `. For example: - - .. code-block:: kotlin - - and(gte(, ), lt(, ) ...) - - - id: nodejs - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: - - .. code-block:: javascript - - { : { : , ... } } - - - id: php - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: - - .. code-block:: php - - [ => [ => , ... ] ] - - - id: perl - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: - - .. code-block:: perl - - { => { => , ... } } - - - id: ruby - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: - - .. code-block:: ruby - - { => { => , ... } } - - - id: scala - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `: - - .. code-block:: scala - - and(gte(, ), lt(, ) ...) - - - id: csharp - content: | - To specify conditions on the elements in the array field, - use :ref:`query operators ` in the - :ref:`query filter document `. For example: - - .. code-block:: c# + .. code-block:: python + + { : { : , ... } } - var builder = Builders.Filter; - builder.And(builder.Eq(, ), builder.Lt(, )); + - id: java-sync + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `. For example: + + .. code-block:: java + + and(gte(, ), lt(, ) ...) + + - id: java-async + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `. For example: + + .. code-block:: java + + and(gte(, ), lt(, ) ...) + + - id: kotlin-coroutine + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `. For example: + + .. code-block:: kotlin + + and(gte(, ), lt(, ) ...) + + - id: nodejs + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: + + .. code-block:: javascript + + { : { : , ... } } + + - id: php + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: + + .. code-block:: php + + [ => [ => , ... ] ] + + - id: perl + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: + + .. code-block:: perl + + { => { => , ... } } + + - id: ruby + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: + + .. code-block:: ruby + + { => { => , ... } } + + - id: scala + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `: + + .. code-block:: scala + + and(gte(, ), lt(, ) ...) + + - id: csharp + content: | + To specify conditions on the elements in the array field, + use :ref:`query operators ` in the + :ref:`query filter document `. For example: + + .. code-block:: c# + + var builder = Builders.Filter; + builder.And(builder.Eq(, ), builder.Lt(, )); diff --git a/source/tutorial/query-for-null-fields.txt b/source/tutorial/query-for-null-fields.txt index dad216b4e11..ef279e5f013 100644 --- a/source/tutorial/query-for-null-fields.txt +++ b/source/tutorial/query-for-null-fields.txt @@ -41,11 +41,11 @@ Different query operators in MongoDB treat ``null`` values differently. .. tabs-drivers:: tabs: - - id: c - content: | - .. important:: - Use ``BCON_NULL`` with the MongoDB C driver to - query for ``null`` or missing fields in MongoDB. + - id: c + content: | + .. important:: + Use ``BCON_NULL`` with the MongoDB C driver to + query for ``null`` or missing fields in MongoDB. - id: python content: | From 95e619738ca6f9394e5343c5a4a3432ef4cc7025 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 28 Feb 2024 12:09:53 -0800 Subject: [PATCH 188/308] DOCSP-37242 Fix Project Stage Syntax Rendering (#6585) * DOCSP-37242 Fix Project Stage Syntax Rendering * build errors * Revert "build errors" This reverts commit 7406d4aeec1fdf5ebb9dad30415b630a9156c60e. --- source/reference/operator/aggregation/project.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/reference/operator/aggregation/project.txt b/source/reference/operator/aggregation/project.txt index 6139e853557..eb218e7ac4f 100644 --- a/source/reference/operator/aggregation/project.txt +++ b/source/reference/operator/aggregation/project.txt @@ -55,8 +55,8 @@ The :pipeline:`$project` specifications have the following forms: * - ``: <1 or true>`` - - Specifies the inclusion of a field. Non-zero integers are also - treated as ``true``. + - Specifies the inclusion of a field. Non-zero integers are also treated + as ``true``. * - ``_id: <0 or false>`` - Specifies the suppression of the ``_id`` field. From 98d299ce58ff4f384fd69457acfea997f0823784 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 28 Feb 2024 13:09:12 -0800 Subject: [PATCH 189/308] DOCSP-36733 4.4 to 5.0 Upgrade Performance (#6464) * DOCSP-36733 4.4 to 5.0 Upgrade Performance * * * * * * * add SERVER-60176 to past release limitations * JD feedback * * * SH feedback * add note on wiredTiger idle file handles * add read concern changes * GH feedback, remove idle timeout note --- .../fact-5.0-read-concern-latency.rst | 9 +++ source/reference/parameters.txt | 25 ++++++- source/release-notes/5.0-compatibility.txt | 10 +-- .../release-notes/5.0-upgrade-replica-set.txt | 4 ++ .../5.0-upgrade-sharded-cluster.txt | 4 ++ .../release-notes/5.0-upgrade-standalone.txt | 4 ++ source/release-notes/5.0.txt | 71 +++++++++++++++---- 7 files changed, 101 insertions(+), 26 deletions(-) create mode 100644 source/includes/fact-5.0-read-concern-latency.rst diff --git a/source/includes/fact-5.0-read-concern-latency.rst b/source/includes/fact-5.0-read-concern-latency.rst new file mode 100644 index 00000000000..512b29d6aa2 --- /dev/null +++ b/source/includes/fact-5.0-read-concern-latency.rst @@ -0,0 +1,9 @@ +Starting in MongoDB 5.0, :readconcern:`"local"` is the default read +concern level for read operations against the primary and secondaries. + +This may introduce a significant latency increase for count queries that +use a filter and for :ref:`covered queries `. + +You can opt out of this behavior by setting the cluster-wide +:ref:`read concern ` with +:dbcommand:`setDefaultRWConcern`. \ No newline at end of file diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 8a6b1a44a25..54aeb72ac27 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -5459,8 +5459,29 @@ WiredTiger Parameters "wiredTigerEngineRuntimeConfig": "` - - * - :driver:`Java (Synchronous) ` - - ``3.11.0+`` - - | `Java Driver Quickstart `__ - | `Java Async Driver Quickstart `__ - | :driver:`Client-Side Field Level Encryption Guide ` - - * - `Java Reactive Streams `__ - - ``1.12.0+`` - - `Java RS Documentation `__ - - * - :driver:`Python (PyMongo) ` - - ``3.10.0+`` - - | `Python Driver Quickstart `__ - | :driver:`Client-Side Field Level Encryption Guide ` - - * - :driver:`C#/.NET ` - - ``2.10.0+`` - - `.NET Driver Quickstart `__ - - * - :driver:`C++ ` - - ``3.6.0`` - - `C Driver Client-Side Field Level Encryption `__ - - * - :driver:`C ` - - ``1.17.5`` - - `C Driver Client-Side Field Level Encryption `__ - - * - :driver:`Go ` - - ``1.2+`` - - `Go Driver Quickstart `__ - - * - :driver:`Scala ` - - ``2.7.0+`` - - `Scala Documentation `__ - - * - :driver:`PHP ` - - ``1.6.0+`` - - `PHP Driver Quickstart `__ - - * - `Ruby `__ - - ``2.12.1+`` - - `Ruby Driver Quickstart `__ - -.. _csfle-reference-compatability-key-rotation: - -.. important:: Key Rotation Support - - To use the key rotation API of {+csfle-abbrev+}, such as the - ``rewrapManyDateKey`` method, you must use specific versions - of either your driver's binding package or ``libmongocrypt``. - - The following list details each driver's key rotation API - dependencies: - - - If you're using Node.js driver version 6.0.0 or later, - ``mongodb-client-encryption`` must have the same major version number - as the driver. - Otherwise, use a 2.x.x version of ``mongodb-client-encryption`` that is 2.2.0 or later. - - Java Driver: Use ``mongodb-crypt`` version {+mongodb-crypt-version+} or later. - - pymongo: Use ``pymongocrypt`` version 1.3.1 or later. - - Go Driver: Use ``libmongocrypt`` version 1.5.2 or later. - - C#/.NET Driver: Use the MongoDB C#/.NET Driver version 2.17.1 or later. - -Please refer to the driver reference documentation for syntax and -implementation examples. diff --git a/source/core/csfle/reference/csfle-options-clients.txt b/source/core/csfle/reference/csfle-options-clients.txt index 81a6d2e45e4..c56f7084782 100644 --- a/source/core/csfle/reference/csfle-options-clients.txt +++ b/source/core/csfle/reference/csfle-options-clients.txt @@ -1,7 +1,7 @@ .. _csfle-reference-mongo-client: ============================================= -{+csfle-abbrev+}-Specific MongoClient Options +MongoClient Options for <+csfle-abbrev+> ============================================= .. default-domain:: mongodb @@ -53,7 +53,7 @@ The following table describes the structure of an ``{+auto-encrypt-options+}`` configuration is used as the host of your {+key-vault-long+}. - To learn more about {+key-vault-long+}s, see :ref:`csfle-reference-key-vault`. + To learn more about {+key-vault-long+}s, see :ref:`qe-reference-keys-key-vaults`. * - ``keyVaultNamespace`` @@ -73,9 +73,9 @@ The following table describes the structure of an managing your {+cmk-long+}s (CMKs). To learn more about ``kmsProviders`` objects, see - :ref:`csfle-reference-kms-providers`. + :ref:`qe-fundamentals-kms-providers`. - To learn more about {+cmk-long+}s, see :ref:`csfle-reference-keys-key-vaults`. + To learn more about {+cmk-long+}s, see :ref:`qe-reference-keys-key-vaults`. * - ``tlsOptions`` diff --git a/source/core/csfle/reference/decryption.txt b/source/core/csfle/reference/decryption.txt index f52bcdedf34..51bd5589d16 100644 --- a/source/core/csfle/reference/decryption.txt +++ b/source/core/csfle/reference/decryption.txt @@ -123,7 +123,7 @@ performs the following procedure: {+dek-long+}, decryption fails and the driver returns the encrypted ``BinData`` blob. - .. include:: /includes/csfle-warning-local-keys.rst + .. include:: /includes/queryable-encryption/qe-warning-local-keys.rst #. Decrypt the ``BinData`` value using the decrypted {+dek-long+} and appropriate algorithm. @@ -152,4 +152,4 @@ To learn how to configure the database connection for {+csfle+}, see :ref:`csfle-reference-mongo-client`. To learn more about the relationship between {+dek-long+}s and -{+cmk-long+}s, see :ref:`csfle-reference-keys-key-vaults`. +{+cmk-long+}s, see :ref:`qe-reference-keys-key-vaults`. diff --git a/source/core/csfle/reference/encryption-components.txt b/source/core/csfle/reference/encryption-components.txt index d5a5f243264..d33b7f2f692 100644 --- a/source/core/csfle/reference/encryption-components.txt +++ b/source/core/csfle/reference/encryption-components.txt @@ -64,7 +64,7 @@ your {+key-vault-long+} on a different MongoDB cluster than the cluster storing your encrypted application data. To learn more about the {+key-vault-long+}, see -:ref:`csfle-reference-keys-key-vaults`. +:ref:`qe-reference-keys-key-vaults`. {+kms-long+} ~~~~~~~~~~~~~~~~~~~~~ @@ -73,7 +73,7 @@ The {+kms-long+} ({+kms-abbr+}) stores the {+cmk-long+} ({+cmk-abbr+}) used to encrypt {+dek-long+}s. To view a list of all {+kms-abbr+} providers MongoDB supports, -see :ref:`csfle-reference-kms-providers`. +see :ref:`qe-fundamentals-kms-providers`. MongoDB Cluster ~~~~~~~~~~~~~~~ diff --git a/source/core/csfle/reference/encryption-schemas.txt b/source/core/csfle/reference/encryption-schemas.txt index 5d16a50808b..f6a3fbd63b7 100644 --- a/source/core/csfle/reference/encryption-schemas.txt +++ b/source/core/csfle/reference/encryption-schemas.txt @@ -1,3 +1,6 @@ +.. meta:: + :keywords: client-side field level encryption, encryption + .. _csfle-reference-encryption-schemas: .. _field-level-encryption-json-schema: @@ -210,7 +213,7 @@ Definition Official MongoDB 4.2+ compatible drivers have language-specific requirements for specifying the UUID. Defer to the - :ref:`driver documentation ` + :ref:`driver documentation ` for complete documentation on implementing client-side field level encryption. @@ -298,14 +301,14 @@ Definition part of the automatic encryption :ref:`configuration options `. The specified configuration options must *also* include appropriate access to the - :ref:`Key Management Service (KMS) ` and + :ref:`Key Management Service (KMS) ` and {+cmk-long+} (CMK) used to create the data key. Automatic encryption fails if the {+dek-long+} does not exist *or* if the client cannot decrypt the key with the specified KMS and CMK. Official MongoDB 4.2+ compatible drivers have language-specific requirements for specifying the UUID. Defer to the - :ref:`driver documentation ` + :ref:`driver documentation ` for complete documentation on implementing client-side field level encryption. @@ -427,7 +430,7 @@ and ``medicalRecords`` fields for encryption. - The ``medicalRecords`` field requires randomized encryption using the specified key. -.. include:: /includes/fact-csfle-compatibility-drivers.rst +.. include:: /includes/queryable-encryption/fact-csfle-compatibility-drivers.rst .. _field-level-encryption-auto-encrypt-multiple-fields-inheritance: @@ -542,10 +545,10 @@ and ``medicalRecords`` fields for encryption. specified key. The ``encrypt`` options override those specified in the parent ``encryptMetadata`` field. -.. include:: /includes/fact-csfle-compatibility-drivers.rst +.. include:: /includes/queryable-encryption/fact-csfle-compatibility-drivers.rst To learn more about your CMK and {+key-vault-long+}, -see the :ref:`key vaults ` page. +see the :ref:`key vaults ` page. To learn more about encryption algorithms, see the :ref:`Encryption algorithms ` page. diff --git a/source/core/csfle/reference/kms-providers.txt b/source/core/csfle/reference/kms-providers.txt deleted file mode 100644 index 9152aad09cb..00000000000 --- a/source/core/csfle/reference/kms-providers.txt +++ /dev/null @@ -1,183 +0,0 @@ -.. _csfle-reference-kms-providers: -.. _field-level-encryption-kms: - -=================== -CSFLE KMS Providers -=================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - -Overview --------- - -Learn about the {+kms-long+} ({+kms-abbr+}) providers {+csfle+} -({+csfle-abbrev+}) supports. - -{+kms-long+} Tasks -------------------------------- - -In {+csfle-abbrev+}, your {+kms-long+} performs the following -tasks: - -- :ref:`Creates and stores your {+cmk-long+} ` -- :ref:`Create and Encrypt your {+dek-long+}s ` - -To learn more about {+cmk-long+}s and {+dek-long+}s, see -:ref:`csfle-reference-keys-key-vaults`. - -.. _csfle-reference-kms-providers-create-and-store: - -Create and Store your {+cmk-long+} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To create a {+cmk-long+}, you must configure your {+kms-long+} -to generate your {+cmk-long+} as follows: - -.. image:: /images/CSFLE_Master_Key_KMS.png - :alt: Diagram - -To view a tutorial demonstrating how to create and store your -{+cmk-abbr+} in your preferred {+kms-abbr+}, -see :ref:`csfle-tutorial-automatic-encryption`. - -.. _csfle-reference-kms-providers-encrypt: - -Create and Encrypt a {+dek-long+} -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -When you create a {+dek-long+}, you must perform the following actions: - -- Instantiate a ``ClientEncryption`` instance in your - {+csfle-abbrev+}-enabled application: - - * Provide a ``kmsProviders`` object that specifies the credentials - your {+csfle-abbrev+}-enabled application uses to authenticate with - your {+kms-abbr+} provider. - -- Create a {+dek-long+} with the ``CreateDataKey`` method of the - ``ClientEncryption`` object in your {+csfle-abbrev+}-enabled application. - - * Provide a ``dataKeyOpts`` object that specifies with which key - your {+kms-abbr+} should encrypt your new {+dek-long+}. - -To view a tutorial demonstrating how to create and encrypt a -{+dek-long+}, see the following resources: - -- :ref:`csfle-quick-start` -- :ref:`csfle-tutorial-automatic-encryption` - -To view the structure of ``kmsProviders`` and ``dataKeyOpts`` objects -for all supported {+kms-abbr+} providers, see -:ref:`csfle-reference-kms-providers-supported-kms`. - -.. _csfle-reference-kms-providers-supported-kms: - -Supported Key Management Services ---------------------------------- - -The following sections of this page present the following information -for all {+kms-long+} providers: - -- Architecture of {+csfle-abbrev+}-enabled client -- Structure of ``kmsProviders`` objects -- Structure of ``dataKeyOpts`` objects - -{+csfle-abbrev+} supports the following {+kms-long+} -providers: - -- :ref:`csfle-reference-kms-providers-aws` -- :ref:`csfle-reference-kms-providers-azure` -- :ref:`csfle-reference-kms-providers-gcp` -- :ref:`csfle-reference-kms-providers-kmip` -- :ref:`csfle-reference-kms-providers-local` - -.. _csfle-reference-kms-providers-aws: -.. _field-level-encryption-aws-kms: - -Amazon Web Services KMS -~~~~~~~~~~~~~~~~~~~~~~~ - -This section provides information related to using -`AWS Key Management Service `_ -in your {+csfle-abbrev+}-enabled application. - -To view a tutorial demonstrating how to use AWS KMS in your -{+csfle-abbrev+}-enabled application, see -:ref:`csfle-tutorial-automatic-aws`. - -.. include:: /includes/reference/kms-providers/aws.rst - -.. _csfle-reference-kms-providers-azure: -.. _field-level-encryption-azure-keyvault: - -Azure Key Vault -~~~~~~~~~~~~~~~ - -This section provides information related to using -`Azure Key Vault -`_ -in your {+csfle-abbrev+}-enabled application. - -To view a tutorial demonstrating how to use Azure Key Vault in your -{+csfle-abbrev+}-enabled application, see -:ref:`csfle-tutorial-automatic-azure`. - -.. include:: /includes/reference/kms-providers/azure.rst - -.. _csfle-reference-kms-providers-gcp: -.. _field-level-encryption-gcp-kms: - -Google Cloud Platform KMS -~~~~~~~~~~~~~~~~~~~~~~~~~ - -This section provides information related to using -`Google Cloud Key Management `_ -in your {+csfle-abbrev+}-enabled application. - -To view a tutorial demonstrating how to use GCP KMS in your -{+csfle-abbrev+}-enabled application, see -:ref:`csfle-tutorial-automatic-gcp`. - -.. include:: /includes/reference/kms-providers/gcp.rst - -.. _csfle-reference-kms-providers-kmip: - -KMIP -~~~~ - -This section provides information related to using a -`KMIP `_ -compliant {+kms-long+} in your {+csfle-abbrev+}-enabled application. - -To view a tutorial demonstrating how to use a KMIP compliant -{+kms-long+} in your {+csfle-abbrev+}-enabled application, see -:ref:`csfle-tutorial-automatic-kmip`. - -To learn how to set up KMIP with HashiCorp Vault, see the `How to Set Up HashiCorp Vault KMIP Secrets Engine with MongoDB CSFLE or Queryable Encryption -`__ -blog post. - -.. include:: /includes/reference/kms-providers/kmip.rst - -.. _csfle-reference-kms-providers-local: -.. _field-level-encryption-local-kms: - -Local Key Provider -~~~~~~~~~~~~~~~~~~ - -This section provides information related to using a Local Key Provider (your filesystem) -in your {+csfle-abbrev+}-enabled application. - -.. include:: /includes/csfle-warning-local-keys.rst - -To view a tutorial demonstrating how to use a Local Key Provider -for testing {+csfle+}, see -:ref:`csfle-quick-start`. - -.. include:: /includes/reference/kms-providers/local.rst diff --git a/source/core/csfle/tutorials.txt b/source/core/csfle/tutorials.txt index 624e87fdb01..3fa69992906 100644 --- a/source/core/csfle/tutorials.txt +++ b/source/core/csfle/tutorials.txt @@ -1,4 +1,16 @@ +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: csharp, go, java, javascript/typescript, php, python, ruby, rust, scala + +.. meta:: + :keywords: client-side field level encryption, encryption + .. _csfle-tutorials: +.. _csfle-driver-tutorials: .. _csfle-tutorial-automatic-encryption: .. _csfle-tutorial-manual-encryption: .. _fle-convert-to-a-remote-master-key: @@ -15,6 +27,10 @@ Tutorials :depth: 2 :class: singlecol + +Key Management Tutorials +------------------------ + Read the following pages to learn how to use {+csfle+} with your preferred {+kms-long+}: @@ -75,6 +91,14 @@ access to all sample applications. | `KMIP <{+sample-app-url-csfle+}/dotnet/kmip/reader/>`__ | `Local <{+sample-app-url-csfle+}/dotnet/local/reader/>`__ + +Driver Tutorials +---------------- + +For {+csfle-abbrev+} driver tutorials, see the following: + +.. include:: /includes/queryable-encryption/csfle-driver-tutorial-table.rst + .. toctree:: :titlesonly: diff --git a/source/core/csfle/tutorials/aws/aws-automatic.txt b/source/core/csfle/tutorials/aws/aws-automatic.txt index eb53fcde707..4495eb474b1 100644 --- a/source/core/csfle/tutorials/aws/aws-automatic.txt +++ b/source/core/csfle/tutorials/aws/aws-automatic.txt @@ -264,5 +264,5 @@ To learn more about the topics mentioned in this guide, see the following links: - Learn more about CSFLE components on the :ref:`Reference ` page. -- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page -- See how KMS Providers manage your CSFLE keys on the :ref:`` page. +- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page +- See how KMS Providers manage your CSFLE keys on the :ref:`` page. diff --git a/source/core/csfle/tutorials/azure/azure-automatic.txt b/source/core/csfle/tutorials/azure/azure-automatic.txt index 0670ced583c..eb46c6986e8 100644 --- a/source/core/csfle/tutorials/azure/azure-automatic.txt +++ b/source/core/csfle/tutorials/azure/azure-automatic.txt @@ -261,5 +261,5 @@ To learn more about the topics mentioned in this guide, see the following links: - Learn more about CSFLE components on the :ref:`Reference ` page. -- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page -- See how KMS Providers manage your CSFLE keys on the :ref:`` page. +- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page +- See how KMS Providers manage your CSFLE keys on the :ref:`` page. diff --git a/source/core/csfle/tutorials/gcp/gcp-automatic.txt b/source/core/csfle/tutorials/gcp/gcp-automatic.txt index 31b0404057e..27321cb3d0b 100644 --- a/source/core/csfle/tutorials/gcp/gcp-automatic.txt +++ b/source/core/csfle/tutorials/gcp/gcp-automatic.txt @@ -261,5 +261,5 @@ To learn more about the topics mentioned in this guide, see the following links: - Learn more about CSFLE components on the :ref:`Reference ` page. -- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page -- See how KMS Providers manage your CSFLE keys on the :ref:`` page. +- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page +- See how KMS Providers manage your CSFLE keys on the :ref:`` page. diff --git a/source/core/csfle/tutorials/kmip/kmip-automatic.txt b/source/core/csfle/tutorials/kmip/kmip-automatic.txt index ca351cfddbc..331a4608b03 100644 --- a/source/core/csfle/tutorials/kmip/kmip-automatic.txt +++ b/source/core/csfle/tutorials/kmip/kmip-automatic.txt @@ -273,5 +273,5 @@ To learn more about the topics mentioned in this guide, see the following links: - Learn more about CSFLE components on the :ref:`Reference ` page. -- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page. -- See how KMS Providers manage your CSFLE keys on the :ref:`` page. +- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page. +- See how KMS Providers manage your CSFLE keys on the :ref:`` page. diff --git a/source/core/queryable-encryption.txt b/source/core/queryable-encryption.txt index 2be938bb89b..97c1b4da7c1 100644 --- a/source/core/queryable-encryption.txt +++ b/source/core/queryable-encryption.txt @@ -1,3 +1,10 @@ +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: queryable encryption, encryption + .. _qe-manual-feature-qe: ==================== @@ -95,7 +102,7 @@ Install ------- To learn what you must install to use {+qe+}, see -the :ref:`` page. +the :ref:`` and :ref:`` pages. Quick Start ----------- @@ -134,16 +141,14 @@ The reference section contains the following pages: - :ref:`qe-reference-encryption-limits` - :ref:`qe-reference-automatic-encryption-supported-operations` - :ref:`qe-reference-mongo-client` -- :ref:`qe-reference-shared-library` +- :ref:`qe-csfle-install-library` - :ref:`qe-reference-libmongocrypt` -- :ref:`qe-reference-mongocryptd` .. toctree:: :titlesonly: /core/queryable-encryption/features - /core/queryable-encryption/install /core/queryable-encryption/quick-start /core/queryable-encryption/fundamentals /core/queryable-encryption/tutorials - /core/queryable-encryption/reference + /core/queryable-encryption/reference \ No newline at end of file diff --git a/source/core/queryable-encryption/about-qe-csfle.txt b/source/core/queryable-encryption/about-qe-csfle.txt new file mode 100644 index 00000000000..ea9a02e857e --- /dev/null +++ b/source/core/queryable-encryption/about-qe-csfle.txt @@ -0,0 +1,150 @@ +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: queryable encryption, in-use encryption, client-side field level encryption + +.. _about-qe-csfle: + +====================================== +Choosing an In-Use Encryption Approach +====================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +MongoDB provides two approaches to :term:`In-Use Encryption`: +:ref:`{+qe+} ` and :ref:`{+csfle+} ` +({+csfle-abbrev+}). When using either approach, you can also choose +between automatic and {+manual-enc+}. + +About {+qe+} and {+csfle-abbrev+} +------------------------------------------------------------------------ + +Both {+qe+} and {+csfle+} ({+csfle-abbrev+}) enable a client application +to encrypt data before transporting it over the network. Sensitive data is +transparently encrypted and decrypted by the client and only +communicated to and from the server in encrypted form. + +For more information, see :ref:`{+qe+} Features ` and +:ref:`{+csfle-abbrev+} Features `. + +Querying Encrypted Fields +~~~~~~~~~~~~~~~~~~~~~~~~~ +{+qe+} supports equality queries on encrypted fields. +Support for ranged queries is upcoming, and support for prefix, suffix, +and substring queries with {+qe+} is under development. + +{+csfle+} supports equality queries on deterministically encrypted fields. + +For more information about supported query operators, see :ref:`Supported Query +Operators for {+qe+} ` and +:ref:`Supported Query Operators for {+csfle-abbrev+} +`. For the full list of MongoDB query +operators, see :ref:`query-projection-operators-top`. + +Encryption Algorithms +~~~~~~~~~~~~~~~~~~~~~ + +The new encryption algorithm for {+qe+} uses randomized encryption based on +`structured encryption +`__, which +produces different encrypted output values from the same input. This +prevents attackers from reverse-engineering the encryption. + +For detailed information on MongoDB's approach to {+qe+}, see the +`Overview of {+qe+} +`__ +and +`Design and Analysis of a Stateless +Document Database Encryption Scheme `__ whitepapers. + +The {+csfle-abbrev+} encryption algorithm supports both randomized +encryption and :ref:`deterministic encryption +`. However, it only supports +**querying** fields that are encrypted deterministically. + +With deterministic encryption, a given input value always encrypts to +the same output value. Deterministic encryption is suitable for high +:term:`cardinality` data. If a field has many potential unique values, +such as street addresses, then it is difficult for potential attackers +to reverse engineer encrypted values to plaintext. Conversely, if a +field has very few values, like sex, then attackers can reasonably guess +them and use that information to help to decipher the cryptographic +algorithm. + +Using {+qe+} and {+csfle-abbrev+} +------------------------------------------------------------------------ +You can use {+qe+}, {+csfle+}, or both in your application. However, +you can't use both approaches in the same collection. + +Consider using {+qe+} in the following scenarios: + +- You are developing a new application and want to use the latest + cryptographic advancements from MongoDB. +- You expect users to run ranged, prefix, suffix, or substring queries + against encrypted data. +- Your application can use a single key for a given field, rather than + requiring separate keys on a per-user or per-tenant basis. +- You value read performance over storage requirements. {+qe+} generates + internal :ref:`metadata collections ` and + indexes to improve query performance. As a result, a collection + encrypted with {+qe+} uses 2-4 times the storage space that it would + if it were plaintext or encrypted with {+csfle-abbrev+}. + +There are situations where {+csfle-abbrev+} may be a preferable solution: + +- Your application already uses {+csfle-abbrev+}. +- You need to use different keys for the same field. This is commonly + encountered when separating tenants or using user-specific keys. +- You need to be flexible with your data schema and potentially add more + encrypted fields. Adding encrypted fields for {+qe+} + requires rebuilding metadata collections and indexes. +- The increased storage requirements of {+qe+} are a concern. +- Your company or industry prefers mature products over emerging + technologies. + +Compatibility +~~~~~~~~~~~~~ +{+qe+} and {+csfle+} are compatible with different MongoDB server and +driver versions. Both {+qe+} and {+csfle-abbrev+} are supported for the +foreseeable future. For details, see :ref:`Compatibility +`. + +Private Querying +~~~~~~~~~~~~~~~~ + +MongoDB encrypts queries for both {+qe+} and {+csfle+} so that the +server has no information on cleartext document or query values. +With {+qe+}, private querying goes a step further and redacts logs and +metadata to scrub information around the query's existence. This ensures +stronger privacy and confidentiality. + +Limitations +~~~~~~~~~~~ + +For the limitations of each approach, see :ref:`{+qe+} limitations +` or :ref:`{+csfle-abbrev+} limitations +`. + +Choosing Between Automatic and {+manual-enc-title+} +--------------------------------------------------------- + +Using Automatic Encryption +~~~~~~~~~~~~~~~~~~~~~~~~~~ +We recommend automatic encryption in most situations, as it streamlines +the process of writing your client application. With automatic +encryption, MongoDB automatically encrypts and decrypts fields in read +and write operations. + +Using {+manual-enc-title+} +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/queryable-encryption/qe-csfle-manual-enc-overview.rst + +For details, see :ref:`{+manual-enc-title+} with {+qe+} +` or :ref:`{+manual-enc-title+} with {+csfle-abbrev+} `. \ No newline at end of file diff --git a/source/core/queryable-encryption/enable-qe.txt b/source/core/queryable-encryption/enable-qe.txt new file mode 100644 index 00000000000..e21577f00ad --- /dev/null +++ b/source/core/queryable-encryption/enable-qe.txt @@ -0,0 +1,77 @@ +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: javascript/typescript + +.. meta:: + :keywords: queryable encryption, code example, node.js + +.. _qe-fundamentals-enable-qe: + +======================================================================== +Enabling {+qe+} when Creating Collections +======================================================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Overview +-------- + +.. include:: /includes/queryable-encryption/qe-enable-qe-at-collection-creation.rst + +.. include:: /includes/queryable-encryption/qe-explicitly-create-collection.rst + +Enable {+qe+} on a Collection +------------------------------------------------------------------------ + +You can enable {+qe+} on fields in one of two ways. The following +examples use Node.js to enable {+qe+}: + +- Pass the {+enc-schema+}, represented by the ``encryptedFieldsObject`` + constant, to the client that the application uses to create the collection: + + .. code-block:: javascript + :emphasize-lines: 8-10 + + const client = new MongoClient(uri, { + autoEncryption: { + keyVaultNameSpace: "", + kmsProviders: "", + extraOptions: { + cryptSharedLibPath: "" + }, + encryptedFieldsMap: { + "": { encryptedFieldsObject } + } + } + + ... + + await client.db("").createCollection(""); + } + + For more information on ``autoEncryption`` configuration options, see the + section on :ref:`qe-reference-mongo-client`. + +- Pass the {+enc-schema+} ``encryptedFieldsObject`` to + ``createCollection()``: + + .. code-block:: javascript + + await encryptedDB.createCollection("", { + encryptedFields: encryptedFieldsObject + }); + + .. tip:: + + Specify the ``encryptedFieldsObject`` when you create the + collection, and also when you create a client to access the + collection. This ensures that if the server's security is + compromised, the information is still encrypted through the client. \ No newline at end of file diff --git a/source/core/queryable-encryption/fundamentals.txt b/source/core/queryable-encryption/fundamentals.txt index 337b4365832..35cbfa640f8 100644 --- a/source/core/queryable-encryption/fundamentals.txt +++ b/source/core/queryable-encryption/fundamentals.txt @@ -15,18 +15,18 @@ Fundamentals Read the following sections to learn how {+qe+} works and how to use it: - :ref:`qe-fundamentals-encrypt-query` +- :ref:`qe-create-encryption-schema` - :ref:`qe-fundamentals-collection-management` -- :ref:`qe-reference-keys-key-vaults` -- :ref:`qe-fundamentals-manage-keys` - :ref:`qe-fundamentals-manual-encryption` -- :ref:`qe-fundamentals-kms-providers` +- :ref:`qe-fundamentals-manage-keys` +- :ref:`qe-overview-enable-qe` +- :ref:`qe-overview-use-qe` .. toctree:: :titlesonly: /core/queryable-encryption/fundamentals/encrypt-and-query + /core/queryable-encryption/qe-create-encryption-schema /core/queryable-encryption/fundamentals/manage-collections /core/queryable-encryption/fundamentals/manual-encryption - /core/queryable-encryption/fundamentals/keys-key-vaults /core/queryable-encryption/fundamentals/manage-keys - /core/queryable-encryption/fundamentals/kms-providers diff --git a/source/core/queryable-encryption/fundamentals/encrypt-and-query.txt b/source/core/queryable-encryption/fundamentals/encrypt-and-query.txt index fe82fe81a8c..32e08217ab3 100644 --- a/source/core/queryable-encryption/fundamentals/encrypt-and-query.txt +++ b/source/core/queryable-encryption/fundamentals/encrypt-and-query.txt @@ -6,15 +6,14 @@ :keywords: code example, node.js .. meta:: - :keywords: Queryable Encryption, contention + :keywords: queryable encryption, contention .. _qe-fundamentals-encrypt-query: +.. _qe-encryption-schema: -================================= -Field Encryption and Queryability -================================= - -.. default-domain:: mongodb +============================ +Encrypted Fields and Queries +============================ .. contents:: On this page :local: @@ -25,199 +24,35 @@ Field Encryption and Queryability Overview -------- -Learn about the following {+qe+} topics: +When you use {+qe+}, you define encrypted fields at the collection level +using an {+enc-schema+}. Encrypting a field and enabling queries +increases storage requirements and impacts query performance. -- Considerations when enabling queries on an encrypted field. -- How to specify fields for encryption. -- How to configure an encrypted field so that it is queryable. -- Query types and which ones you can use on encrypted fields. -- How to optimize query performance on encrypted fields. +For instructions on creating an {+enc-schema+} and configuring +querying, see :ref:`qe-create-encryption-schema` Considerations when Enabling Querying ------------------------------------- -When you use {+qe+}, you can choose whether to make an encrypted field queryable. -If you don't need to perform CRUD operations that require you -to query an encrypted field, you may not need to enable querying on that field. -You can still retrieve the entire document by querying other fields that are queryable or not encrypted. +.. warning:: + + .. include:: /includes/queryable-encryption/qe-enable-qe-at-collection-creation.rst + +You can choose to make an encrypted field queryable. If you +don't need to perform CRUD operations that require you to query an +encrypted field, you may not need to enable querying on that field. You +can still retrieve the entire document by querying other fields that are +queryable or unencrypted. -When you make encrypted fields queryable, {+qe+} creates an index for each encrypted field, which -can make write operations on that field take longer. When a write operation updates -an indexed field, MongoDB also updates the related index. +When you make encrypted fields queryable, MongoDB creates an index for +each encrypted field, which can make write operations on that field take +longer. When a write operation updates an indexed field, MongoDB also +updates the related index. When you create an encrypted collection, MongoDB creates :ref:`two metadata collections `, increasing the storage space requirements. -.. _qe-specify-fields-for-encryption: - -Specify Fields for Encryption ------------------------------ - -.. _qe-encryption-schema: - -With {+qe+}, you specify which fields you want to automatically -encrypt in your MongoDB document using a JSON {+enc-schema+}. The -{+enc-schema+} defines which fields are encrypted and which queries -are available for those fields. - -.. important:: - - You can specify any field for encryption except the - ``_id`` field. - -To specify fields for encryption and querying, create an {+enc-schema+} that includes the following properties: - -.. list-table:: - :header-rows: 1 - :widths: 30 30 40 - - * - Key Name - - Type - - Required - - * - ``path`` - - String - - Required - - * - ``bsonType`` - - String - - Required - - * - ``keyId`` - - Binary - - Optional. Use only if you want to use {+manual-enc+}, which - requires you to generate a key for each field in advance. - - * - ``queries`` - - Object - - Optional. Include to make the field queryable. - -Example -~~~~~~~ - -This example shows how to create the {+enc-schema+}. - -Consider the following document that contains personally identifiable information -(PII), credit card information, and sensitive medical information: - -.. code-block:: json - - { - "firstName": "Jon", - "lastName": "Snow", - "patientId": 12345187, - "address": "123 Cherry Ave", - "medications": [ - "Adderall", - "Lipitor" - ], - "patientInfo": { - "ssn": "921-12-1234", - "billing": { - "type": "visa", - "number": "1234-1234-1234-1234" - } - } - } - -To ensure the PII and sensitive medical information stays secure, create -the {+enc-schema+} and configure those fields for automatic -encryption. For example: - -.. code-block:: javascript - - const encryptedFieldsObject = { - fields: [ - { - path: "patientId", - bsonType: "int" - }, - { - path: "patientInfo.ssn", - bsonType: "string" - }, - { - path: "medications", - bsonType: "array" - }, - { - path: "patientInfo.billing", - bsonType: "object" - } - ] - } - -MongoDB creates encryption keys for each field automatically. -Configure ``AutoEncryptionSettings`` on the client, then use the -``createEncryptedCollection`` helper method to create your collections. - -If you are using :ref:`explicit encryption -`, you must create a unique -{+dek-long+} for each encrypted field in advance. Add a ``keyId`` field -to each entry that includes the key: - -.. code-block:: javascript - :emphasize-lines: 5, 10 - - const encryptedFieldsObject = { - fields: [ - { - path: "patientId", - keyId: "", - bsonType: "int" - }, - { - path: "patientInfo.ssn", - keyId: "", - bsonType: "string" - }, - . . . - ] - } - -.. _qe-enable-queries: - -Configure Fields for Querying ------------------------------ - -Include the ``queries`` property on fields to make them queryable. This -enables an authorized client to issue read and write queries against -those fields. Omitting the ``queries`` property prevents clients from querying a field. - - -Example -~~~~~~~ - -Add the ``queries`` property to the previous example schema to make the -``patientId`` and ``patientInfo.ssn`` fields queryable. - -.. code-block:: javascript - :emphasize-lines: 6, 11 - - const encryptedFieldsObject = { - fields: [ - { - path: "patientId", - bsonType: "int", - queries: { queryType: "equality" } - }, - { - path: "patientInfo.ssn", - bsonType: "string", - queries: { queryType: "equality" } - }, - { - path: "medications", - bsonType: "array" - }, - { - path: "patientInfo.billing", - bsonType: "object" - }, - ] - } - .. _qe-contention: Configure Contention Factor @@ -228,17 +63,11 @@ find performance, or write and update performance. .. include:: /includes/queryable-encryption/qe-csfle-contention.rst -Example -+++++++ - -.. include:: /includes/example-qe-csfle-contention.rst .. _qe-query-types: -Query Types -~~~~~~~~~~~ - -Passing a query type to the ``queries`` option in your encrypted fields -object sets the allowed query types for the field. Querying non-encrypted fields or encrypted fields with a supported query +Supported Query Types and Behavior +---------------------------------- +Querying non-encrypted fields or encrypted fields with a supported query type returns encrypted data that is then decrypted at the client. @@ -278,97 +107,25 @@ Client and Server Schemas .. content copied from source/core/csfle/fundamentals/automatic-encryption.txt -MongoDB supports using -:ref:`schema validation ` -to enforce encryption of specific fields -in a collection. Clients using automatic {+qe+} have -specific behavior depending on the database connection -configuration: +MongoDB supports using :ref:`schema validation ` +to enforce encryption of specific fields in a collection. Clients using +automatic {+qe+} behave differently depending on the database connection configuration: -- If the connection - ``encryptedFieldsMap`` object contains a key for the specified collection, the - client uses that object to perform automatic {+qe+}, - rather than using the remote schema. At a minimum, the local rules **must** - encrypt those fields that the remote schema marks as requiring - encryption. +- If the connection ``encryptedFieldsMap`` object contains a key for the + specified collection, the client uses that object to perform + automatic {+qe+}, rather than using the remote schema. At minimum, + the local rules must encrypt all fields that the remote schema does. -- If the connection - ``encryptedFieldsMap`` object does *not* contain a key for the specified - collection, the client downloads the server-side remote schema for - the collection and uses it to perform automatic {+qe+}. +- If the connection ``encryptedFieldsMap`` object doesn't contain a + key for the specified collection, the client downloads the + server-side remote schema for the collection and uses it instead. - .. important:: Behavior Considerations + .. important:: Remote Schema Behavior - When a client does not have an encryption schema for the - specified collection, the following occurs: + When using a remote schema: - - The client trusts that the server has a valid schema with respect - to automatic {+qe+}. + - The client trusts that the server has a valid schema - - The client uses the remote schema to perform automatic - {+qe+} only. The client does not enforce any other - validation rules specified in the schema. - -To learn more about automatic {+qe+}, see the following resources: - -- :ref:`{+qe+} Introduction ` -- :ref:`` - -.. _qe-fundamentals-enable-qe: - -Enable {+qe+} ---------------------------- - -Enable {+qe+} before creating a collection. Enabling {+qe+} after -creating a collection does not encrypt fields on documents already in -that collection. You can enable {+qe+} on fields in one of two ways: - -- Pass the {+enc-schema+}, represented by the - ``encryptedFieldsObject`` - constant, to the client that the application uses to create the collection: - - -.. code-block:: javascript - :emphasize-lines: 8-10 - - const client = new MongoClient(uri, { - autoEncryption: { - keyVaultNameSpace: "", - kmsProviders: "", - extraOptions: { - cryptSharedLibPath: "" - }, - encryptedFieldsMap: { - "": { encryptedFieldsObject } - } - } - - ... - - await client.db("").createCollection(""); - } - -For more information on ``autoEncryption`` configuration options, see the -section on :ref:`qe-reference-mongo-client`. - -- Pass the encrypted fields object to ``createCollection()`` to create a new collection: - -.. code-block:: javascript - - await encryptedDB.createCollection("", { - encryptedFields: encryptedFieldsObject - }); - -.. tip:: - - Specify the encrypted fields when you create the collection, and also - when you create a client to access the collection. This ensures that - if the server's security is compromised, the information is still - encrypted through the client. - -.. important:: - - Explicitly create your collection, rather than creating it implicitly - with an insert operation. When you create a collection using - ``createCollection()``, MongoDB creates an index on the encrypted - fields. Without this index, queries on encrypted fields may run slowly. + - The client uses the remote schema to perform automatic {+qe+} + only. The client does not enforce any other validation rules + specified in the schema. \ No newline at end of file diff --git a/source/core/queryable-encryption/fundamentals/keys-key-vaults.txt b/source/core/queryable-encryption/fundamentals/keys-key-vaults.txt index 08386b03af3..158074de68a 100644 --- a/source/core/queryable-encryption/fundamentals/keys-key-vaults.txt +++ b/source/core/queryable-encryption/fundamentals/keys-key-vaults.txt @@ -1,8 +1,8 @@ .. _qe-reference-keys-key-vaults: -=================== -Keys and Key Vaults -=================== +============================== +Encryption Keys and Key Vaults +============================== .. default-domain:: mongodb @@ -16,7 +16,7 @@ Overview -------- In this guide, you can learn details about the following components of -{+qe+}: +{+in-use-encryption+}: - {+dek-long+}s ({+dek-abbr+})s - {+cmk-long+}s ({+cmk-abbr+})s @@ -24,13 +24,14 @@ In this guide, you can learn details about the following components of - {+kms-long+} ({+kms-abbr+}) To view step by step guides demonstrating how to use the preceding -components to set up a {+qe+} enabled client, see the following resources: +components to set up a {+qe+} or {+csfle+} enabled client, see the +following resources: -- :ref:`` -- :ref:`` - -.. _qe-envelope-encryption: -.. _qe-key-architecture: +- :ref:`{+qe+} Quick Start ` +- :ref:`{+qe+} Automatic Encryption Tutorial + ` +- :ref:`{+csfle-abbrev+} Quick Start ` +- :ref:`{+csfle-abbrev+} Automatic Encryption Tutorial ` Data Encryption Keys and the Customer Master Key ------------------------------------------------ @@ -49,7 +50,6 @@ Key Rotation For details on rotating keys, see :ref:`Rotate Encryption Keys `. .. _qe-reference-key-vault: -.. _qe-field-level-encryption-keyvault: {+key-vault-long-title+}s --------------------- @@ -71,7 +71,9 @@ Permissions .. include:: /includes/queryable-encryption/qe-csfle-key-vault-permissions.rst To learn how to grant your application access to your {+cmk-long+}, see the -:ref:`` tutorial. +:ref:`{+qe+} Automatic Encryption Tutorial +` or :ref:`{+csfle-abbrev+} +Automatic Encryption Tutorial `. Key Vault Cluster ~~~~~~~~~~~~~~~~~ @@ -80,8 +82,10 @@ Key Vault Cluster To specify the cluster that hosts your {+key-vault-long+}, use the ``keyVaultClient`` field of your client's ``MongoClient`` object. -To learn more about the {+qe+}-specific configuration options in your -client's ``MongoClient`` object, see :ref:``. +To learn more about the specific configuration options in your +client's ``MongoClient`` object, see the :ref:`MongoClient Options for +{+qe+} ` or :ref:`MongoClient Options for +{+csfle-abbrev+} `. Update a {+key-vault-long-title+} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -89,4 +93,10 @@ Update a {+key-vault-long-title+} .. include:: /includes/in-use-encryption/update-a-key.rst To view a tutorial that shows how to create a {+dek-long+}, see -the :ref:`Quick Start `. \ No newline at end of file +the :ref:`{+qe+} Quick Start ` or the +:ref:`{+csfle-abbrev+} Quick Start `. + +.. toctree:: + :titlesonly: + + /core/queryable-encryption/fundamentals/kms-providers \ No newline at end of file diff --git a/source/core/queryable-encryption/fundamentals/kms-providers.txt b/source/core/queryable-encryption/fundamentals/kms-providers.txt index cca8cd28176..4c0deafff2f 100644 --- a/source/core/queryable-encryption/fundamentals/kms-providers.txt +++ b/source/core/queryable-encryption/fundamentals/kms-providers.txt @@ -15,7 +15,7 @@ KMS Providers Overview -------- -Learn about the {+kms-long+} ({+kms-abbr+}) providers {+qe+} +Learn about the {+kms-long+} ({+kms-abbr+}) providers {+in-use-encryption+} supports. .. _qe-reasons-to-use-remote-kms: @@ -35,7 +35,7 @@ it: Additionally, for the following {+kms-abbr+} providers, your {+kms-abbr+} remotely encrypts and decrypts your {+dek-long+}, ensuring -your {+cmk-long+} is never exposed to your {+qe+} enabled +your {+cmk-long+} is never exposed to your {+qe+} or {+csfle-abbrev+} enabled application: - {+aws-long+} KMS @@ -45,7 +45,7 @@ application: {+kms-long+} Tasks ---------------------------- -In {+qe+}, your {+kms-long+}: +In {+in-use-encryption+}, your {+kms-long+}: - Creates and encrypts the {+cmk-long+} - Encrypts the {+dek-long+}s created by your application @@ -54,7 +54,7 @@ In {+qe+}, your {+kms-long+}: To learn more about {+cmk-long+}s and {+dek-long+}s, see :ref:`qe-reference-keys-key-vaults`. -.. _qe-reference-kms-providers-create-and-store: +.. _qe-fundamentals-kms-providers-create-and-store: Create and Store your {+cmk-long+} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -66,9 +66,11 @@ To create a {+cmk-long+}, configure your {+kms-long+} to generate your {+cmk-lon To view a tutorial that demonstrates how to create and store a {+cmk-abbr+} in your preferred {+kms-abbr+}, -see :ref:`qe-tutorial-automatic-encryption`. +see the :ref:`{+qe+} Automatic Encryption Tutorial +` or :ref:`{+csfle-abbrev+} +Automatic Encryption Tutorial `. -.. _qe-reference-kms-providers-encrypt: +.. _qe-fundamentals-kms-providers-encrypt: Create and Encrypt a {+dek-long+} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -76,14 +78,13 @@ Create and Encrypt a {+dek-long+} To create a {+dek-long+}: - Instantiate a ``ClientEncryption`` instance in your - {+qe+} enabled application: + {+qe+} or {+csfle-abbrev+} enabled application: * Provide a ``kmsProviders`` object that specifies the credentials - your {+qe+} enabled application uses to authenticate with - your {+kms-abbr+} provider. + your application uses to authenticate with your {+kms-abbr+} provider. - Create a {+dek-long+} with the ``CreateDataKey`` method of the - ``ClientEncryption`` object in your {+qe+} enabled application. + ``ClientEncryption`` object in your application. * Provide a ``dataKeyOpts`` object that specifies with which key your {+kms-abbr+} should encrypt your new {+dek-long+}. @@ -91,14 +92,17 @@ To create a {+dek-long+}: To view a tutorial demonstrating how to create and encrypt a {+dek-long+}, see the following resources: -- :ref:`qe-quick-start` -- :ref:`qe-tutorial-automatic-encryption` +- :ref:`{+qe+} Quick Start ` +- :ref:`{+qe+} Automatic Encryption Tutorial + ` +- :ref:`{+csfle-abbrev+} Quick Start ` +- :ref:`{+csfle-abbrev+} Automatic Encryption Tutorial ` To view the structure of ``kmsProviders`` and ``dataKeyOpts`` objects for all supported {+kms-abbr+} providers, see -:ref:`qe-reference-kms-providers-supported-kms`. +:ref:`qe-fundamentals-kms-providers-supported-kms`. -.. _qe-reference-kms-providers-supported-kms: +.. _qe-fundamentals-kms-providers-supported-kms: Supported Key Management Services --------------------------------- @@ -106,37 +110,35 @@ Supported Key Management Services The following sections of this page present the following information for all {+kms-long+} providers: -- Architecture of {+qe+} enabled client +- Architecture of {+in-use-encryption+} enabled client - Structure of ``kmsProviders`` objects - Structure of ``dataKeyOpts`` objects -{+qe+} supports the following {+kms-long+} +Both {+qe+} and {+csfle-abbrev+} support the following {+kms-long+} providers: -- :ref:`qe-reference-kms-providers-aws` -- :ref:`qe-reference-kms-providers-azure` -- :ref:`qe-reference-kms-providers-gcp` -- :ref:`qe-reference-kms-providers-kmip` -- :ref:`qe-reference-kms-providers-local` +- :ref:`qe-fundamentals-kms-providers-aws` +- :ref:`qe-fundamentals-kms-providers-azure` +- :ref:`qe-fundamentals-kms-providers-gcp` +- :ref:`qe-fundamentals-kms-providers-kmip` +- :ref:`qe-fundamentals-kms-providers-local` -.. _qe-reference-kms-providers-aws: -.. _qe-field-level-encryption-aws-kms: +.. _qe-fundamentals-kms-providers-aws: Amazon Web Services KMS ~~~~~~~~~~~~~~~~~~~~~~~ This section provides information related to using `AWS Key Management Service `_ -in your {+qe+} enabled application. +in your {+qe+} or {+csfle-abbrev+} enabled application. To view a tutorial demonstrating how to use AWS KMS in your -{+qe+} enabled application, see -:ref:`qe-tutorial-automatic-aws`. +application, see :ref:`Overview: Enable Queryable Encryption +` or :ref:`csfle-tutorial-automatic-aws`. .. include:: /includes/queryable-encryption/reference/kms-providers/aws.rst -.. _qe-reference-kms-providers-azure: -.. _qe-field-level-encryption-azure-keyvault: +.. _qe-fundamentals-kms-providers-azure: Azure Key Vault ~~~~~~~~~~~~~~~ @@ -144,38 +146,37 @@ Azure Key Vault This section provides information related to using `Azure Key Vault `_ -in your {+qe+} enabled application. +in your {+qe+} or {+csfle-abbrev+} enabled application. To view a tutorial demonstrating how to use Azure Key Vault in your -{+qe+} enabled application, see -:ref:`qe-tutorial-automatic-azure`. +application, see :ref:`Overview: Enable Queryable Encryption +` or :ref:`csfle-tutorial-automatic-azure`. .. include:: /includes/queryable-encryption/reference/kms-providers/azure.rst -.. _qe-reference-kms-providers-gcp: -.. _qe-field-level-encryption-gcp-kms: +.. _qe-fundamentals-kms-providers-gcp: Google Cloud Platform KMS ~~~~~~~~~~~~~~~~~~~~~~~~~ This section provides information related to using `Google Cloud Key Management `_ -in your {+qe+} enabled application. +in your {+qe+} or {+csfle-abbrev+} enabled application. To view a tutorial demonstrating how to use GCP KMS in your -{+qe+} enabled application, see -:ref:`qe-tutorial-automatic-gcp`. +application, see :ref:`Overview: Enable Queryable Encryption +` or :ref:`csfle-tutorial-automatic-gcp`. .. include:: /includes/queryable-encryption/reference/kms-providers/gcp.rst -.. _qe-reference-kms-providers-kmip: +.. _qe-fundamentals-kms-providers-kmip: KMIP ~~~~ This section provides information related to using a `KMIP `_ -compliant {+kms-long+} in your {+qe+} enabled application. +compliant {+kms-long+} in your {+qe+} or {+csfle-abbrev+} enabled application. To learn how to set up KMIP with HashiCorp Vault, see the `How to Set Up HashiCorp Vault KMIP Secrets Engine with MongoDB CSFLE or Queryable Encryption `__ @@ -183,19 +184,18 @@ blog post. .. include:: /includes/queryable-encryption/reference/kms-providers/kmip.rst -.. _qe-reference-kms-providers-local: -.. _qe-field-level-encryption-local-kms: +.. _qe-fundamentals-kms-providers-local: Local Key Provider ~~~~~~~~~~~~~~~~~~ This section provides information related to using a Local Key Provider (your filesystem) -in your {+qe+} enabled application. +in your {+qe+} or {+csfle-abbrev+} enabled application. .. include:: /includes/queryable-encryption/qe-warning-local-keys.rst To view a tutorial demonstrating how to use a Local Key Provider -for testing {+qe+}, see -:ref:`qe-quick-start`. +for testing {+qe+}, see the :ref:`{+qe+} Quick Start ` +or :ref:`{+csfle-abbrev+} Quick Start `. .. include:: /includes/queryable-encryption/reference/kms-providers/local.rst diff --git a/source/core/queryable-encryption/fundamentals/manage-collections.txt b/source/core/queryable-encryption/fundamentals/manage-collections.txt index b11fc52cbe2..ca8c0c699b0 100644 --- a/source/core/queryable-encryption/fundamentals/manage-collections.txt +++ b/source/core/queryable-encryption/fundamentals/manage-collections.txt @@ -1,10 +1,18 @@ -.. _qe-fundamentals-collection-management: +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: queryable encryption, encrypted collections, metadata collections -=============================== -Encrypted Collection Management -=============================== +.. meta:: + :keywords: code example, node.js, shell + +.. _qe-fundamentals-collection-management: -.. default-domain:: mongodb +===================== +Encrypted Collections +===================== .. contents:: On this page :local: @@ -12,14 +20,16 @@ Encrypted Collection Management :depth: 2 :class: singlecol -It is important that you understand the performance and storage costs of field level encryption. Each encrypted field: +Field level encryption comes with performance and storage costs. Every +field you choose to encrypt: - Adds writes to insert and update operations. -- Requires additional storage, because MongoDB maintains an encrypted field index. +- Requires additional storage, because MongoDB maintains an index of + encrypted fields to improve query performance. This section lists the writes per operation and explains how to compact encrypted collection indexes so that you can minimize write and storage -costs. +costs. If you want to encrypt fields and configure them for querying, see :ref:``. Overview -------- @@ -146,7 +156,7 @@ collections and reduces their size. Run compaction when the size of ``ECOC`` exceeds 1 GB. You can check the size of your collections using :binary:`~bin.mongosh` -and issuing the :method:`db.collection.totalSize()` command. +and running the :method:`db.collection.totalSize()` command. .. example:: diff --git a/source/core/queryable-encryption/fundamentals/manage-keys.txt b/source/core/queryable-encryption/fundamentals/manage-keys.txt index 7c6a53a264b..6d7248cb8fa 100644 --- a/source/core/queryable-encryption/fundamentals/manage-keys.txt +++ b/source/core/queryable-encryption/fundamentals/manage-keys.txt @@ -48,12 +48,8 @@ To view a list of supported {+kms-abbr+} providers, see the :ref:`qe-fundamentals-kms-providers` page. For tutorials detailing how to set up a {+qe+} enabled -application with each of the supported {+kms-abbr+} providers, see the -following pages: - -- :ref:`qe-tutorial-automatic-aws` -- :ref:`qe-tutorial-automatic-azure` -- :ref:`qe-tutorial-automatic-gcp` +application with each of the supported {+kms-abbr+} providers, see +:ref:`Overview: Enable Queryable Encryption `. Procedure --------- diff --git a/source/core/queryable-encryption/fundamentals/manual-encryption.txt b/source/core/queryable-encryption/fundamentals/manual-encryption.txt index 6cdff72fc39..91e795a4a96 100644 --- a/source/core/queryable-encryption/fundamentals/manual-encryption.txt +++ b/source/core/queryable-encryption/fundamentals/manual-encryption.txt @@ -15,12 +15,7 @@ Overview -------- -Learn how to use the {+manual-enc+} mechanism of {+qe+}. {+manual-enc-first+} -lets you specify the key material used to encrypt fields. It provides -fine-grained control over security, at the cost of increased complexity -when configuring collections and writing code for MongoDB Drivers. - -.. include:: /includes/fact-manual-enc-definition.rst +.. include:: /includes/queryable-encryption/qe-csfle-manual-enc-overview.rst {+manual-enc-first+} is available in the following MongoDB products: diff --git a/source/core/queryable-encryption/install-library.txt b/source/core/queryable-encryption/install-library.txt new file mode 100644 index 00000000000..7de358d6780 --- /dev/null +++ b/source/core/queryable-encryption/install-library.txt @@ -0,0 +1,168 @@ +.. _qe-csfle-install-library: + +======================================================================== +Install and Configure a {+qe+} Library +======================================================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +MongoDB uses one of two libraries for translating queries into +encrypted queries, and for encrypting and decrypting data. The latest is +the {+shared-library+}. + + +Before You Start +---------------- + +Follow the preceding tasks to :ref:`install a {+qe+} compatible driver +and dependencies ` before continuing. + +Choose a Library +---------------- + +.. _qe-reference-shared-library: + +{+shared-library+} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The {+shared-library+} is a **dynamic library** that enables your client +application to perform automatic encryption. A dynamic library is a set +of functionality accessed by an application at runtime rather than +compile time. The {+shared-library+} performs the following tasks: + +- Reads the :ref:`{+enc-schema+} ` to determine which fields to encrypt or decrypt +- Prevents your application from executing unsupported operations on + encrypted fields + +The {+shared-library+} *does not* do any of the following: + +- Perform data encryption or decryption +- Access the encryption key material +- Listen for data over the network + +The {+shared-library+} is a preferred alternative to ``mongocryptd`` and doesn't require you to start another process to perform automatic encryption. + +.. _qe-reference-mongocryptd: +.. _qe-mongocryptd: + +mongocryptd +~~~~~~~~~~~ + +.. important:: Use the {+shared-library+} + + If you are starting a new project, use the {+shared-library+}. The + {+shared-library+} replaces ``mongocryptd`` and does not require + you to start a new process. + +``mongocryptd`` is installed with `MongoDB Enterprise +Server <{+enterprise-download-link+}>`__. + +When you create a MongoDB client with {+in-use-encryption+}, the +``mongocryptd`` process starts automatically by default. + +.. include:: /includes/queryable-encryption/qe-facts-mongocryptd-process.rst + +Procedure +--------- + +.. tabs:: + + .. tab:: {+shared-library+} + :tabid: {+shared-library+} + + .. _qe-csfle-shared-library-download: + + To download the {+shared-library+} from the `MongoDB Download + Center `__, + select the version and platform, then the library. + + .. tip:: + + To view an expanded list of available releases and packages, see + `MongoDB Enterprise Downloads `__. + + .. procedure:: + :style: normal + + .. step:: + + In the :guilabel:`Version` dropdown, select ``{+shared-library-version-drop-down+}``. + + .. step:: + + In the :guilabel:`Platform` dropdown, select your platform. + + .. step:: + + In the :guilabel:`Package` dropdown, select ``crypt_shared``. + + .. step:: + + Click :guilabel:`Download`. + + .. _qe-csfle-configure-shared-library: + + To configure how your driver searches for the {+shared-library+}, + use the following parameters: + + .. list-table:: + :header-rows: 1 + :stub-columns: 1 + :widths: 30 70 + + * - Name + - Description + + * - cryptSharedLibPath + - Specifies the absolute path to the {+shared-library+} + package, {+shared-library-package+}. + + *Default*: ``undefined`` + + * - cryptSharedLibRequired + - Specifies if the driver must use the {+shared-library+}. If + ``true``, the driver returns an error if the + {+shared-library+} is unavailable. If ``false``, the driver + performs the following sequence of actions: + + #. Attempts to use the {+shared-library+}. + #. If the {+shared-library+} is unavailable, the driver + attempts to start and connect to ``mongocryptd``. + + *Default*: ``false`` + + To view an example demonstrating how to configure these + parameters, see the :ref:`Quick Start `. + + .. tab:: mongocryptd + :tabid: mongocryptd + + .. procedure:: + :style: normal + + .. step:: + + Install ``mongocryptd``: + + .. include:: /includes/queryable-encryption/qe-csfle-install-mongocryptd.rst + + .. step:: + + Configure the library: + + .. include:: /includes/queryable-encryption/qe-csfle-configure-mongocryptd.rst + + Examples + ~~~~~~~~ + + .. include:: /includes/queryable-encryption/qe-csfle-mongocryptd-examples.rst + +Next Steps +---------- + +After installing a library, :ref:`create a {+cmk-long+} ` +in your {+kms-long+} of choice. diff --git a/source/core/queryable-encryption/install.txt b/source/core/queryable-encryption/install.txt index 6d175857d24..c847c0d5f18 100644 --- a/source/core/queryable-encryption/install.txt +++ b/source/core/queryable-encryption/install.txt @@ -1,11 +1,9 @@ .. _qe-install: .. _qe-implementation: -========================= -Installation Requirements -========================= - -.. default-domain:: mongodb +======================================================================== +Install a {+qe+} Compatible Driver +======================================================================== .. contents:: On this page :local: @@ -16,68 +14,34 @@ Installation Requirements Overview -------- -Learn about the applications and libraries you must install to use -{+qe+}. - -What You Need -------------- - -Before you can use {+qe+}, set up the following items -in your development environment: - -- (Optional) Download the :ref:`{+shared-library+} `. - The {+shared-library+} replaces :ref:`mongocryptd ` and - does not require spawning a new process. - -- Install a :ref:`MongoDB Driver Compatible with {+qe+} `. -- Start an - :atlas:`Atlas Cluster ` - or a - :manual:`MongoDB Enterprise instance - ` - - .. warning:: - - You can use {+qe+} only with MongoDB 7.0 and later, which - may not yet be available in MongoDB Atlas. - -- Install specific driver dependencies. To see the list of - dependencies for your driver, select the tab corresponding to the language you - would like to use to complete this guide: +To enable {+qe+} in your development environment, you must first install +a compatible driver and dependencies. .. _qe-quick-start-driver-dependencies: -.. tabs-drivers:: +Procedure +--------- - .. tab:: - :tabid: java-sync +.. procedure:: - .. include:: /includes/queryable-encryption/set-up/java.rst + .. step:: Install a {+qe+} compatible driver - .. tab:: - :tabid: nodejs + Install a :ref:`MongoDB Driver Compatible with {+qe+} `. + + .. step:: Install driver dependencies - .. include:: /includes/queryable-encryption/set-up/node.rst + See the :ref:`Drivers compatibility table ` for a list of + dependencies for your driver. - .. tab:: - :tabid: python + .. step:: Start a MongoDB Atlas Cluster or Enterprise instance. - .. include:: /includes/queryable-encryption/set-up/python.rst + Start an :atlas:`Atlas Cluster ` or a + :manual:`MongoDB Enterprise instance + `. - .. tab:: - :tabid: csharp - - .. include:: /includes/queryable-encryption/set-up/csharp.rst - - .. tab:: - :tabid: go - - .. include:: /includes/queryable-encryption/set-up/go.rst - - -Learn More +Next Steps ---------- -To start using {+qe+}, see :ref:`qe-quick-start`. - -To learn how to use {+qe+} with a remote {+kms-long+}, see :ref:`qe-tutorial-automatic-encryption`. +Once you have installed a compatible driver and dependencies, +:ref:`install and configure a {+qe+} library ` +to continue setting up your deployment and development environment. diff --git a/source/core/queryable-encryption/overview-enable-qe.txt b/source/core/queryable-encryption/overview-enable-qe.txt new file mode 100644 index 00000000000..62ba99970eb --- /dev/null +++ b/source/core/queryable-encryption/overview-enable-qe.txt @@ -0,0 +1,61 @@ +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: queryable encryption, in-use encryption + +.. _qe-overview-enable-qe: + +===================================== +Overview: Enable Queryable Encryption +===================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +This page summarizes the tasks required to set up your MongoDB +deployment and your development environment for {+qe+}. + +Enable {+qe+} +--------------------------- + +.. procedure:: + :style: normal + + .. step:: Install a compatible MongoDB driver and dependencies + + :ref:`Install a {+qe+} compatible driver ` + + :ref:`Install libmongocrypt ` + + .. step:: Install and configure a {+qe+} library + + :ref:`Install and configure a {+qe+} library ` + + .. step:: Create a {+cmk-long+} + + :ref:`Create a {+cmk-long+} ` + + .. step:: Create your {+qe+} enabled application + + :ref:`Create a {+qe+} enabled application ` + +Use {+qe+} +--------------------------- + +After you install a {+qe+} driver and libraries, create a {+cmk-long+}, and +create your application, you can start encrypting and querying data. See +:ref:`Overview: Use {+qe+} ` for instructions. + +.. toctree:: + :titlesonly: + + /core/queryable-encryption/install + /core/queryable-encryption/reference/libmongocrypt + /core/queryable-encryption/install-library + /core/queryable-encryption/qe-create-cmk + /core/queryable-encryption/qe-create-application \ No newline at end of file diff --git a/source/core/queryable-encryption/overview-use-qe.txt b/source/core/queryable-encryption/overview-use-qe.txt new file mode 100644 index 00000000000..792ab548d41 --- /dev/null +++ b/source/core/queryable-encryption/overview-use-qe.txt @@ -0,0 +1,49 @@ +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: queryable encryption, in-use encryption + +.. _qe-overview-use-qe: + +================================== +Overview: Use Queryable Encryption +================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +This page summarizes the tasks required to create a {+qe+}-enabled +collection, insert a document with encrypted fields, and query encrypted +data. + +Enable {+qe+} +--------------------------- + +Before encrypting and querying data, you must install a {+qe+}-enabled driver +and libraries, create a {+cmk-long+}, and create your application. See +:ref:`Overview: Enable {+qe+} ` for instructions. + +Use {+qe+} +--------------------------- + +.. procedure:: + :style: normal + + .. step:: Create an encrypted collection and insert a document with encrypted fields + + :ref:`Create an encrypted collection and insert documents ` + + .. step:: Query a document with encrypted fields + + :ref:`Query a document with encrypted fields ` + +.. toctree:: + :titlesonly: + + /core/queryable-encryption/qe-create-encrypted-collection + /core/queryable-encryption/qe-retrieve-encrypted-document \ No newline at end of file diff --git a/source/core/queryable-encryption/qe-create-application.txt b/source/core/queryable-encryption/qe-create-application.txt new file mode 100644 index 00000000000..53afff0906f --- /dev/null +++ b/source/core/queryable-encryption/qe-create-application.txt @@ -0,0 +1,960 @@ +.. _qe-create-application: + +======================================================================== +Create your {+qe+} Enabled Application +======================================================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Overview +-------- + +This guide shows you how to build an application that implements {+qe+} +to automatically encrypt and decrypt document fields. + +After you complete the steps in this guide, you should have a working +client application that is ready for inserting documents with fields encrypted +with your {+cmk-long+}. + +Before You Start +---------------- + +Ensure you have completed the following prerequisite tasks before creating your application: + +#. :ref:`Install a {+qe+} compatible driver and dependencies ` + +#. :ref:`Install and configure a {+qe+} library ` + +#. :ref:`Create a {+cmk-long+} ` + +.. see:: Full Application + + To see the complete code for this sample application, select the tab + corresponding to your programming language and follow the provided + link. Each sample application repository includes a ``README.md`` + file that you can use to learn how to set up your environment and run + the application. + + .. tabs:: + + .. tab:: mongosh + :tabid: shell + + `Complete mongosh Application <{+sample-app-url-qe+}/mongosh/>`__ + + .. tab:: Node.js + :tabid: nodejs + + `Complete Node.js Application <{+sample-app-url-qe+}/node/>`__ + + .. tab:: Python + :tabid: python + + `Complete Python Application <{+sample-app-url-qe+}/python/>`__ + + .. tab:: Java + :tabid: java-sync + + `Complete Java Application <{+sample-app-url-qe+}/java/>`__ + + .. tab:: Go + :tabid: go + + `Complete Go Application <{+sample-app-url-qe+}/go/>`__ + + .. tab:: C# + :tabid: csharp + + `Complete C# Application <{+sample-app-url-qe+}/csharp/>`__ + +.. tabs-selector:: drivers + +Procedure +--------- + +Select the tab for your key provider below. + +.. tabs:: + + + .. tab:: {+aws-long+} + :tabid: create-app-aws + + .. procedure:: + + .. step:: Assign application variables + + .. include:: /includes/queryable-encryption/tutorials/assign-app-variables.rst + + .. step:: Add your KMS credentials + + Create a variable containing your KMS credentials with the + following structure. Use the Access Key ID and Secret Access + Key you used in step 2.2 when you :ref:`created an AWS IAM user `. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js + :start-after: start-aws-kms-credentials + :end-before: end-aws-kms-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-aws-kms-credentials + :end-before: end-aws-kms-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-aws-kms-credentials + :end-before: end-aws-kms-credentials + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java + :start-after: start-aws-kms-credentials + :end-before: end-aws-kms-credentials + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-aws-kms-credentials + :end-before: end-aws-kms-credentials + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-aws-kms-credentials + :end-before: end-aws-kms-credentials + :language: csharp + :dedent: + + .. include:: /includes/queryable-encryption/tutorials/automatic/aws/role-authentication.rst + + .. step:: Add your CMK credentials + + Create a variable containing your {+cmk-long+} credentials + with the following structure. Use the {+aws-arn-abbr+} and + Region you recorded in step 1.3 when you :ref:`created a CMK `. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js + :start-after: start-aws-cmk-credentials + :end-before: end-aws-cmk-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-aws-cmk-credentials + :end-before: end-aws-cmk-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-aws-cmk-credentials + :end-before: end-aws-cmk-credentials + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java + :start-after: start-aws-cmk-credentials + :end-before: end-aws-cmk-credentials + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-aws-cmk-credentials + :end-before: end-aws-cmk-credentials + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-aws-cmk-credentials + :end-before: end-aws-cmk-credentials + :language: csharp + :dedent: + + .. step:: Set automatic encryption options + + .. include:: /includes/queryable-encryption/shared-lib-learn-more.rst + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + Create an ``autoEncryptionOptions`` object with the following + options: + + - The namespace of your {+key-vault-long+} + - The ``kmsProviderCredentials`` object, which + contains your AWS KMS credentials + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js + :start-after: start-auto-encryption-options + :end-before: end-auto-encryption-options + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + Create an ``autoEncryptionOptions`` object with the following + options: + + - The namespace of your {+key-vault-long+} + - The ``kmsProviders`` object, which contains your AWS KMS credentials + - The ``sharedLibraryPathOptions`` object, which + contains the path to your {+shared-library+} + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-auto-encryption-options + :end-before: end-auto-encryption-options + :emphasize-lines: 5-9 + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + Create an ``AutoEncryptionOpts`` object with the following + options: + + - The ``kms_provider_credentials`` object, which + contains your AWS KMS credentials + - The namespace of your {+key-vault-long+} + - The path to your {+shared-library+} + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-auto-encryption-options + :end-before: end-auto-encryption-options + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + Create an ``AutoEncryptionSettings`` object with the following + options: + + - The namespace of your {+key-vault-long+} + - The ``kmsProviderCredentials`` object, which + contains your AWS KMS credentials + - The ``extraOptions`` object, which contains the path + to your {+shared-library+} + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java + :start-after: start-auto-encryption-options + :end-before: end-auto-encryption-options + :emphasize-lines: 4-8 + :language: java + :dedent: + + .. tab:: + :tabid: go + + Create an ``AutoEncryption`` object with the following + options: + + - The namespace of your {+key-vault-long+} + - The ``kmsProviderCredentials`` object, which + contains your AWS KMS credentials + - The ``cryptSharedLibraryPath`` object, which + contains the path to your {+shared-library+} + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-auto-encryption-options + :end-before: end-auto-encryption-options + :emphasize-lines: 5-8 + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + Create an ``AutoEncryptionOptions`` object with the following + options: + + - The namespace of your {+key-vault-long+} + - The ``kmsProviderCredentials`` object, which + contains your AWS KMS credentials + - The ``extraOptions`` object, which contains the path + to your {+shared-library+} + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-auto-encryption-options + :end-before: end-auto-encryption-options + :emphasize-lines: 7-10 + :language: csharp + :dedent: + + + + + + + + + + + .. tab:: {+azure-kv+} + :tabid: create-app-azure + + .. procedure:: + + .. step:: Assign application variables + + .. include:: /includes/queryable-encryption/tutorials/assign-app-variables.rst + + .. _qe-tutorials-automatic-encryption-azure-kms-providers: + + .. step:: Add your KMS credentials + + Create a variable containing your KMS credentials with the + following structure. Use the {+azure-kv+} credentials you + recorded in the when you :ref:`registered your application with Azure `. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js + :start-after: start-azure-kms-credentials + :end-before: end-azure-kms-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-azure-kms-credentials + :end-before: end-azure-kms-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-azure-kms-credentials + :end-before: end-azure-kms-credentials + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java + :start-after: start-azure-kms-credentials + :end-before: end-azure-kms-credentials + :language: python + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-azure-kms-credentials + :end-before: end-azure-kms-credentials + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-azure-kms-credentials + :end-before: end-azure-kms-credentials + :language: csharp + :dedent: + + + .. step:: Add your CMK credentials + + Create a variable containing your {+cmk-long+} credentials + with the following structure. Use the CMK details you + recorded when you :ref:`created a CMK `. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js + :start-after: start-azure-cmk-credentials + :end-before: end-azure-cmk-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-azure-cmk-credentials + :end-before: end-azure-cmk-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-azure-cmk-credentials + :end-before: end-azure-cmk-credentials + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java + :start-after: start-azure-cmk-credentials + :end-before: end-azure-cmk-credentials + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-azure-cmk-credentials + :end-before: end-azure-cmk-credentials + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-azure-cmk-credentials + :end-before: end-azure-cmk-credentials + :language: csharp + :dedent: + + + .. step:: Create an encryption client + + To create a client for encrypting and decrypting data in + encrypted collections, instantiate a new ``MongoClient`` + using your connection URI and automatic encryption + options. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js + :start-after: start-create-client + :end-before: end-create-client + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js + :start-after: start-create-client + :end-before: end-create-client + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py + :start-after: start-create-client + :end-before: end-create-client + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-create-client + :end-before: end-create-client + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go + :start-after: start-create-client + :end-before: end-create-client + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs + :start-after: start-create-client + :end-before: end-create-client + :language: csharp + :dedent: + + + + + + + + + + + .. tab:: {+gcp-kms-abbr+} + :tabid: create-app-gcp + + .. procedure:: + + .. step:: Assign application variables + + .. include:: /includes/queryable-encryption/tutorials/assign-app-variables.rst + + + .. step:: Add your KMS credentials + + Create a variable containing your KMS credentials with the + following structure. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js + :start-after: start-gcp-kms-credentials + :end-before: end-gcp-kms-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-gcp-kms-credentials + :end-before: end-gcp-kms-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-gcp-kms-credentials + :end-before: end-gcp-kms-credentials + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java + :start-after: start-gcp-kms-credentials + :end-before: end-gcp-kms-credentials + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-gcp-kms-credentials + :end-before: end-gcp-kms-credentials + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-gcp-kms-credentials + :end-before: end-gcp-kms-credentials + :language: csharp + :dedent: + + + .. step:: Add your CMK credentials + + Create a variable containing your {+cmk-long+} credentials + with the following structure. Use the credentials you recorded + when you :ref:`created a CMK `. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js + :start-after: start-gcp-cmk-credentials + :end-before: end-gcp-cmk-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-gcp-cmk-credentials + :end-before: end-gcp-cmk-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-gcp-cmk-credentials + :end-before: end-gcp-cmk-credentials + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java + :start-after: start-gcp-cmk-credentials + :end-before: end-gcp-cmk-credentials + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-gcp-cmk-credentials + :end-before: end-gcp-cmk-credentials + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-gcp-cmk-credentials + :end-before: end-gcp-cmk-credentials + :language: csharp + :dedent: + + + .. step:: Create an encryption client + + To create a client for encrypting and decrypting data in + encrypted collections, instantiate a new ``MongoClient`` + using your connection URI and automatic encryption + options. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js + :start-after: start-create-client + :end-before: end-create-client + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js + :start-after: start-create-client + :end-before: end-create-client + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py + :start-after: start-create-client + :end-before: end-create-client + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-create-client + :end-before: end-create-client + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go + :start-after: start-create-client + :end-before: end-create-client + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs + :start-after: start-create-client + :end-before: end-create-client + :language: csharp + :dedent: + + + + + + + + + + + .. tab:: {+kmip-kms-no-hover+} + :tabid: create-app-kmip + + .. procedure:: + + .. step:: Assign application variables + + .. include:: /includes/queryable-encryption/tutorials/assign-app-variables.rst + + .. step:: Add your KMS credentials + + Create a variable containing the endpoint of your + {+kmip-kms-no-hover+} with the following structure: + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js + :start-after: start-kmip-kms-credentials + :end-before: end-kmip-kms-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-kmip-kms-credentials + :end-before: end-kmip-kms-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-kmip-kms-credentials + :end-before: end-kmip-kms-credentials + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java + :start-after: start-kmip-kms-credentials + :end-before: end-kmip-kms-credentials + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-kmip-kms-credentials + :end-before: end-kmip-kms-credentials + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-kmip-kms-credentials + :end-before: end-kmip-kms-credentials + :language: csharp + :dedent: + + + .. step:: Add your CMK credentials + + Create an empty object as shown in the following code example. + This prompts your {+kmip-kms+} to generate a new {+cmk-long+}. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js + :start-after: start-kmip-local-cmk-credentials + :end-before: end-kmip-local-cmk-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-kmip-local-cmk-credentials + :end-before: end-kmip-local-cmk-credentials + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-kmip-local-cmk-credentials + :end-before: end-kmip-local-cmk-credentials + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java + :start-after: start-kmip-local-cmk-credentials + :end-before: end-kmip-local-cmk-credentials + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-kmip-local-cmk-credentials + :end-before: end-kmip-local-cmk-credentials + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-kmip-local-cmk-credentials + :end-before: end-kmip-local-cmk-credentials + :language: csharp + :dedent: + + + .. step:: Create an encryption client + + To create a client for encrypting and decrypting data in + encrypted collections, instantiate a new ``MongoClient`` + using your connection URI and automatic encryption + options. + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js + :start-after: start-create-client + :end-before: end-create-client + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js + :start-after: start-create-client + :end-before: end-create-client + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py + :start-after: start-create-client + :end-before: end-create-client + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-create-client + :end-before: end-create-client + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go + :start-after: start-create-client + :end-before: end-create-client + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs + :start-after: start-create-client + :end-before: end-create-client + :language: csharp + :dedent: + + +Next Steps +---------- + +After installing a driver and dependencies, creating a {+cmk-long+}, and +creating your application, see :ref:`Overview: Use {+qe+} +` to encrypt and query data. \ No newline at end of file diff --git a/source/core/queryable-encryption/qe-create-cmk.txt b/source/core/queryable-encryption/qe-create-cmk.txt new file mode 100644 index 00000000000..020fe36d9d4 --- /dev/null +++ b/source/core/queryable-encryption/qe-create-cmk.txt @@ -0,0 +1,110 @@ +.. _qe-create-cmk: + +============================ +Create a {+cmk-long+} +============================ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Overview +-------- + +In this guide, you will learn how to generate a {+cmk-long+} in your {+kms-long+} of choice. Generate a {+cmk-long+} before creating your {+qe+}-enabled application. + +.. tip:: Customer Master Keys + + To learn more about the {+cmk-long+}, see + :ref:`qe-reference-keys-key-vaults` + + +Before You Start +---------------- + +Complete the preceding tasks before continuing: + +#. :ref:`Install a {+qe+} compatible driver and dependencies ` + +#. :ref:`Install and configure a {+qe+} library ` + + +Procedure +--------- + +Select the tab for your key provider below. + +.. tabs:: + + .. tab:: {+aws-long+} + :tabid: cmk-aws + + .. procedure:: + + .. _qe-create-cmk-aws: + + .. step:: Create the {+cmk-long+} + + .. include:: /includes/queryable-encryption/tutorials/automatic/aws/cmk.rst + + .. _qe-create-aws-iam-user: + + .. step:: Create an AWS IAM User + + .. include:: /includes/queryable-encryption/tutorials/automatic/aws/user.rst + + .. tab:: {+azure-kv+} + :tabid: cmk-azure + + .. procedure:: + + .. _qe-register-cmk-azure: + + .. step:: Register your Application with Azure + + .. include:: /includes/queryable-encryption/tutorials/automatic/azure/register.rst + + .. _qe-create-cmk-azure: + + .. step:: Create the {+cmk-long+} + + .. include:: /includes/queryable-encryption/tutorials/automatic/azure/cmk.rst + + .. tab:: {+gcp-kms-abbr+} + :tabid: cmk-gcp + + .. procedure:: + + .. step:: Register a {+gcp-abbr+} Service Account + + .. include:: /includes/queryable-encryption/tutorials/automatic/gcp/register.rst + + .. _qe-create-cmk-gcp: + + .. step:: Create a {+gcp-abbr+} {+cmk-long+} + + .. include:: /includes/queryable-encryption/tutorials/automatic/gcp/cmk.rst + + .. tab:: {+kmip-kms-no-hover+} + :tabid: cmk-kmip + + .. procedure:: + + .. step:: Configure your {+kmip-kms-title+} + + .. include:: /includes/queryable-encryption/tutorials/automatic/kmip/configure.rst + + .. step:: Specify your Certificates + + .. _qe-kmip-tutorial-specify-your-certificates: + + .. include:: /includes/queryable-encryption/tutorials/automatic/kmip/certificates.rst + +Next Steps +---------- + +After installing drivers and dependencies and creating a {+cmk-long+}, +you can :ref:`create your {+qe+} enabled application `. + \ No newline at end of file diff --git a/source/core/queryable-encryption/qe-create-encrypted-collection.txt b/source/core/queryable-encryption/qe-create-encrypted-collection.txt new file mode 100644 index 00000000000..fe3893ced45 --- /dev/null +++ b/source/core/queryable-encryption/qe-create-encrypted-collection.txt @@ -0,0 +1,469 @@ +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: javascript/typescript + +.. meta:: + :keywords: queryable encryption, in-use encryption, code example, node.js + +.. _qe-create-encrypted-collection: + +=================================================== +Create an Encrypted Collection and Insert Documents +=================================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Overview +-------- + +This guide shows you how to create a {+qe+}-enabled collection and insert a +document with encrypted fields. + +After you complete the steps in this guide, you should be able to create +an encrypted collection and insert a document with fields that are encrypted +with your {+cmk-long+}. + +Before You Start +---------------- + +:ref:`Create your {+qe+}-enabled application ` +before creating an encrypted collection. + +If you are using :ref:`{+manual-enc+} +`, you must also create a unique +{+dek-long+} for each encrypted field in advance. For more information, +see :ref:`qe-reference-keys-key-vaults`. + +.. tabs-selector:: drivers + +Procedure +--------- + +.. procedure:: + + .. step:: Specify Fields to Encrypt + + To encrypt a field, add it to the {+enc-schema+}. To enable + queries on a field, add the ``queries`` property. + + Create the {+enc-schema+} as follows. This code sample encrypts + both the ``ssn`` and ``billing`` fields, but only the ``ssn`` + field is queryable: + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js + :start-after: start-encrypted-fields-map + :end-before: end-encrypted-fields-map + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js + :start-after: start-encrypted-fields-map + :end-before: end-encrypted-fields-map + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py + :start-after: start-encrypted-fields-map + :end-before: end-encrypted-fields-map + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-encrypted-fields-map + :end-before: end-encrypted-fields-map + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go + :start-after: start-encrypted-fields-map + :end-before: end-encrypted-fields-map + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs + :start-after: start-encrypted-fields-map + :end-before: end-encrypted-fields-map + :language: csharp + :dedent: + + For an extended version of this step, see :ref:`Create an + {+enc-schema-title+} `. + + .. step:: Instantiate ``ClientEncryption`` to access the API for the encryption helper methods + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js + :start-after: start-client-encryption + :end-before: end-client-encryption + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-client-encryption + :end-before: end-client-encryption + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py + :start-after: start-client-encryption + :end-before: end-client-encryption + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-client-encryption + :end-before: end-client-encryption + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go + :start-after: start-client-encryption + :end-before: end-client-encryption + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs + :start-after: start-client-encryption + :end-before: end-client-encryption + :language: csharp + :dedent: + + .. step:: Create the collection + + .. include:: /includes/queryable-encryption/qe-explicitly-create-collection.rst + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + Create your encrypted collection by using the encryption + helper method accessed through the ``ClientEncryption`` class. + This method automatically generates data encryption keys for your + encrypted fields and creates the encrypted collection: + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js + :start-after: start-create-encrypted-collection + :end-before: end-create-encrypted-collection + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. include:: /includes/tutorials/automatic/node-include-clientEncryption.rst + + Create your encrypted collection by using the encryption + helper method accessed through the ``ClientEncryption`` class. + This method automatically generates data encryption keys for your + encrypted fields and creates the encrypted collection: + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js + :start-after: start-create-encrypted-collection + :end-before: end-create-encrypted-collection + :language: javascript + :dedent: + + .. tip:: Database vs. Database Name + + The method that creates the encrypted collection requires a reference + to a database *object* rather than the database *name*. + + .. tab:: + :tabid: python + + Create your encrypted collection by using the encryption + helper method accessed through the ``ClientEncryption`` class. + This method automatically generates data encryption keys for your + encrypted fields and creates the encrypted collection: + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py + :start-after: start-create-encrypted-collection + :end-before: end-create-encrypted-collection + :language: python + :dedent: + + .. tip:: Database vs. Database Name + + The method that creates the encrypted collection requires a reference + to a database *object* rather than the database *name*. You can + obtain this reference by using a method on your client object. + + .. tab:: + :tabid: java-sync + + Create your encrypted collection by using the encryption + helper method accessed through the ``ClientEncryption`` class. + This method automatically generates data encryption keys for your + encrypted fields and creates the encrypted collection: + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-create-encrypted-collection + :end-before: end-create-encrypted-collection + :language: java + :dedent: + + .. tip:: Database vs. Database Name + + The method that creates the encrypted collection requires a reference + to a database *object* rather than the database *name*. You can + obtain this reference by using a method on your client object. + + .. tab:: + :tabid: go + + The Golang version of this tutorial uses data models to + represent the document structure. Add the following + structs to your project to represent the data in your + collection: + + .. literalinclude:: /includes/qe-tutorials/go/models.go + :start-after: start-patient-document + :end-before: end-patient-document + :language: go + :dedent: + + .. literalinclude:: /includes/qe-tutorials/go/models.go + :start-after: start-patient-record + :end-before: end-patient-record + :language: go + :dedent: + + .. literalinclude:: /includes/qe-tutorials/go/models.go + :start-after: start-payment-info + :end-before: end-payment-info + :language: go + :dedent: + + After you've added these classes, create your encrypted + collection by using the encryption helper method accessed + through the ``ClientEncryption`` class. + This method automatically generates data encryption keys for your + encrypted fields and creates the encrypted collection: + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go + :start-after: start-create-encrypted-collection + :end-before: end-create-encrypted-collection + :language: go + :dedent: + + .. tip:: Database vs. Database Name + + The method that creates the encrypted collection requires a reference + to a database *object* rather than the database *name*. You can + obtain this reference by using a method on your client object. + + .. tab:: + :tabid: csharp + + The C# version of this tutorial uses separate classes as data models + to represent the document structure. + Add the following ``Patient``, ``PatientRecord``, and ``PatientBilling`` + classes to your project: + + .. literalinclude:: /includes/qe-tutorials/csharp/Patient.cs + :start-after: start-patient + :end-before: end-patient + :language: csharp + :dedent: + + .. literalinclude:: /includes/qe-tutorials/csharp/PatientRecord.cs + :start-after: start-patient-record + :end-before: end-patient-record + :language: csharp + :dedent: + + .. literalinclude:: /includes/qe-tutorials/csharp/PatientBilling.cs + :start-after: start-patient-billing + :end-before: end-patient-billing + :language: csharp + :dedent: + + After you've added these classes, create your encrypted collection by + using the encryption helper method accessed through the + ``ClientEncryption`` class. + This method automatically generates data encryption keys for your + encrypted fields and creates the encrypted collection: + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs + :start-after: start-create-encrypted-collection + :end-before: end-create-encrypted-collection + :language: csharp + :dedent: + + .. tip:: Database vs. Database Name + + The method that creates the collection requires a reference + to a database *object* rather than the database *name*. + + For additional information, see :ref:`Enable {+qe+} when Creating a + Collection ` + + .. step:: Insert a Document with Encrypted Fields + + .. _qe-aws-insert: + .. _qe-azure-insert: + .. _qe-gcp-insert: + .. _qe-kmip-insert: + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + Create a sample document that describes a patient's personal information. + Use the encrypted client to insert it into the ``patients`` collection, + as shown in the following example: + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js + :start-after: start-insert-document + :end-before: end-insert-document + :emphasize-lines: 15 + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + Create a sample document that describes a patient's personal information. + Use the encrypted client to insert it into the ``patients`` collection, + as shown in the following example: + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js + :start-after: start-insert-document + :end-before: end-insert-document + :emphasize-lines: 17 + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + Create a sample document that describes a patient's personal information. + Use the encrypted client to insert it into the ``patients`` collection, + as shown in the following example: + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py + :start-after: start-insert-document + :end-before: end-insert-document + :emphasize-lines: 15 + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + This tutorial uses POJOs as data models + to represent the document structure. To set up your application to + use POJOs, add the following code: + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-setup-application-pojo + :end-before: end-setup-application-pojo + :language: java + :dedent: + + To learn more about Java POJOs, see the `Plain Old Java Object + wikipedia article `__. + + This tutorial uses the following POJOs: + + - ``Patient`` + - ``PatientRecord`` + - ``PatientBilling`` + + You can view these classes in the `models package of the complete Java application + <{+sample-app-url-qe+}/java/src/main/java/com/mongodb/tutorials/qe/models>`__. + + Add these POJO classes to your application. Then, create an instance + of a ``Patient`` that describes a patient's personal information. Use + the encrypted client to insert it into the ``patients`` collection, + as shown in the following example: + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-insert-document + :end-before: end-insert-document + :emphasize-lines: 8 + :language: java + :dedent: + + .. tab:: + :tabid: go + + Create a sample document that describes a patient's personal information. + Use the encrypted client to insert it into the ``patients`` collection, + as shown in the following example: + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go + :start-after: start-insert-document + :end-before: end-insert-document + :emphasize-lines: 15 + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + Create a sample document that describes a patient's personal information. + Use the encrypted client to insert it into the ``patients`` collection, + as shown in the following example: + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs + :start-after: start-insert-document + :end-before: end-insert-document + :emphasize-lines: 19 + :language: csharp + :dedent: + +Next Steps +---------- + +After creating a {+qe+}-enabled collection, you can :ref:`query the +encrypted fields `. \ No newline at end of file diff --git a/source/core/queryable-encryption/qe-create-encryption-schema.txt b/source/core/queryable-encryption/qe-create-encryption-schema.txt new file mode 100644 index 00000000000..93965899cb8 --- /dev/null +++ b/source/core/queryable-encryption/qe-create-encryption-schema.txt @@ -0,0 +1,205 @@ +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: javascript/typescript + +.. meta:: + :keywords: queryable encryption, code example, node.js + +.. _qe-create-encryption-schema: + +======================================================================== +Create an {+enc-schema-title+} +======================================================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +About this Task +--------------- + +To make encrypted fields queryable, create an :term:`{+enc-schema+}`. +This schema defines which fields are queryable, and which +query types are permitted. For more information, see :ref:`qe-fundamentals-encrypt-query`. + +.. _qe-specify-fields-for-encryption: + +Steps +----- + +.. procedure:: + :style: normal + + .. step:: + Create a JSON {+enc-schema+} document + + Include an ``encryptedFieldsObject`` with a nested ``fields`` array: + + .. code-block:: javascript + + const encryptedFieldsObject = { + fields: [] + } + + .. step:: + Specify encryption parameters for each field you want to encrypt: + + a. Add the ``path`` and ``bsonType`` strings to the ``fields`` array: + + .. code-block:: javascript + :emphasize-lines: 4, 5 + + const encryptedFieldsObject = { + fields: [ + { + path: "myDocumentField", + bsonType: "int" + } + ] + } + + .. important:: + + You can specify any field for encryption except the + ``_id`` field. + + #. If you are using :ref:`{+manual-enc+} + `, add a ``keyId`` field + with the {+dek-abbr+} + + .. code-block:: javascript + :emphasize-lines: 4 + + { + path: "myDocumentField", + bsonType: "int", + keyId: "" + } + + .. tip:: + + With Automatic Encryption, MongoDB creates encryption keys for + each field. You configure ``AutoEncryptionSettings`` on the + client, then use the ``createEncryptedCollection`` helper method + to create your collections. + + #. If you want a field to be queryable, add the ``queries`` property + and list allowed ``queryTypes`` + + .. _qe-enable-queries: + + {+qe+} currently supports ``equality`` queries only. + + .. code-block:: javascript + :emphasize-lines: 4 + + { + path: "myDocumentField", + bsonType: "int", + queries: { queryType: "equality" } + } + + #. (Optional) Include the ``contention`` property on queryable fields + to favor either find performance, or write and update performance + + .. code-block:: javascript + :emphasize-lines: 5 + + { + path: "myDocumentField", + bsonType: "int", + queries: { queryType: "equality", + contention: "0"} + } + + For more information, see :ref:`qe-contention`. + +Example +------- +This example shows how to create an {+enc-schema+} for hospital data. + +Consider the following document that contains personally identifiable information +(PII), credit card information, and sensitive medical information: + +.. code-block:: json + + { + "firstName": "Jon", + "lastName": "Snow", + "patientId": 12345187, + "address": "123 Cherry Ave", + "medications": [ + "Adderall", + "Lipitor" + ], + "patientInfo": { + "ssn": "921-12-1234", + "billing": { + "type": "visa", + "number": "1234-1234-1234-1234" + } + } + } + +To ensure the PII and sensitive medical information stays secure, this +{+enc-schema+} adds the relevant fields: + +.. code-block:: javascript + + const encryptedFieldsObject = { + fields: [ + { + path: "patientId", + bsonType: "int" + }, + { + path: "patientInfo.ssn", + bsonType: "string" + }, + { + path: "medications", + bsonType: "array" + }, + { + path: "patientInfo.billing", + bsonType: "object" + } + ] + } + +Adding the ``queries`` property makes the ``patientId`` and +``patientInfo.ssn`` fields queryable. This example enables equality queries: + +.. code-block:: javascript + :emphasize-lines: 6, 11 + + const encryptedFieldsObject = { + fields: [ + { + path: "patientId", + bsonType: "int", + queries: { queryType: "equality" } + }, + { + path: "patientInfo.ssn", + bsonType: "string", + queries: { queryType: "equality" } + }, + { + path: "medications", + bsonType: "array" + }, + { + path: "patientInfo.billing", + bsonType: "object" + }, + ] + } + +.. include:: /includes/queryable-encryption/example-qe-csfle-contention.rst \ No newline at end of file diff --git a/source/core/queryable-encryption/qe-retrieve-encrypted-document.txt b/source/core/queryable-encryption/qe-retrieve-encrypted-document.txt new file mode 100644 index 00000000000..fef7034112e --- /dev/null +++ b/source/core/queryable-encryption/qe-retrieve-encrypted-document.txt @@ -0,0 +1,116 @@ +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: javascript/typescript + +.. meta:: + :keywords: queryable encryption, in-use encryption, code example, node.js + +.. _qe-query-encrypted-document: + +======================================= +Query a Document with Encrypted Fields +======================================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Overview +-------- + +This guide shows you how to use a {+qe+}-enabled application to retrieve +a document that has encrypted fields. + +After you complete the steps in this guide, you should be able to use +your application to query data in encrypted fields, and to decrypt those +fields as an authorized user. + +Before You Start +---------------- + +:ref:`Create an encrypted collection and insert documents +` before continuing. + +.. tabs-selector:: drivers + +Procedure +--------- + +.. procedure:: + + .. step:: Query an Encrypted Field + + The following code sample executes a find query on an encrypted field and + prints the decrypted data: + + .. tabs-drivers:: + + .. tab:: + :tabid: shell + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js + :start-after: start-find-document + :end-before: end-find-document + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js + :start-after: start-find-document + :end-before: end-find-document + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py + :start-after: start-find-document + :end-before: end-find-document + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-find-document + :end-before: end-find-document + :language: java + :dedent: + + .. tab:: + :tabid: go + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go + :start-after: start-find-document + :end-before: end-find-document + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs + :start-after: start-find-document + :end-before: end-find-document + :language: csharp + :dedent: + + The output of the preceding code sample should look similar to the + following: + + .. literalinclude:: /includes/qe-tutorials/encrypted-document.json + :language: json + :copyable: false + :dedent: + + .. include:: /includes/queryable-encryption/safe-content-warning.rst \ No newline at end of file diff --git a/source/core/queryable-encryption/reference.txt b/source/core/queryable-encryption/reference.txt index 739b660f0cb..03aa518bc85 100644 --- a/source/core/queryable-encryption/reference.txt +++ b/source/core/queryable-encryption/reference.txt @@ -15,21 +15,13 @@ Reference Read the following sections to learn about components of {+qe+}: -- :ref:`qe-compatibility-reference` - :ref:`qe-reference-encryption-limits` - :ref:`qe-reference-automatic-encryption-supported-operations` - :ref:`qe-reference-mongo-client` -- :ref:`qe-reference-shared-library` -- :ref:`qe-reference-libmongocrypt` -- :ref:`qe-reference-mongocryptd` .. toctree:: :titlesonly: - /core/queryable-encryption/reference/compatibility /core/queryable-encryption/reference/limitations /core/queryable-encryption/reference/supported-operations /core/queryable-encryption/reference/qe-options-clients - /core/queryable-encryption/reference/shared-library - /core/queryable-encryption/reference/libmongocrypt - /core/queryable-encryption/reference/mongocryptd diff --git a/source/core/queryable-encryption/reference/compatibility.txt b/source/core/queryable-encryption/reference/compatibility.txt index 26c31b884c0..7a784e59624 100644 --- a/source/core/queryable-encryption/reference/compatibility.txt +++ b/source/core/queryable-encryption/reference/compatibility.txt @@ -1,84 +1,245 @@ -.. facet:: - :name: genre - :values: reference - .. facet:: :name: programming_language :values: csharp, go, java, javascript/typescript, php, python, ruby, rust, scala -.. _qe-driver-compatibility: +.. _qe-csfle-compatibility: + +============= +Compatibility +============= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +This page describes the MongoDB editions and driver versions compatible +with {+qe+} and {+csfle+} to help you determine whether your deployment +supports each in-use encryption feature. + .. _qe-compatibility-reference: - -================================== + + {+qe+} Compatibility -================================== +------------------------------------ + +You can use {+qe+} on a MongoDB 7.0 or later replica set or sharded +cluster, but not a standalone instance. The following table shows which +MongoDB server products support which {+qe+} mechanisms: + +.. list-table:: + :header-rows: 1 + :widths: 25 15 30 30 -This page describes the MongoDB and driver versions with which {+qe+} -is compatible. + * - Product Name + - Minimum Version + - Supports {+qe+} with Automatic Encryption + - Supports {+qe+} with {+manual-enc-title+} -MongoDB Edition, Topology, and Version Compatibility ----------------------------------------------------- + * - MongoDB Atlas [1]_ + - 7.0 + - Yes + - Yes -{+qe+} with automatic encryption is only available with MongoDB Enterprise -Edition and MongoDB Atlas. You can use {+qe+} on a -MongoDB replica set or sharded cluster, but not a standalone instance. + * - MongoDB Enterprise Advanced + - 7.0 + - Yes + - Yes -:ref:`Explicit encryption ` is -available with MongoDB Community and Enterprise Edition. + * - MongoDB Community Edition + - 7.0 + - No + - Yes -.. _qe-driver-compatibility-table: +.. [1] {+qe+} is compatible with MongoDB Atlas but not :atlas:`MongoDB Atlas Search `. -Driver Compatibility Table --------------------------- +.. _qe-driver-compatibility: + +{+qe+} Driver Compatibility +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -{+qe-equality-ga+} requires the following minimum versions for +{+qe+} requires the following minimum versions for compatible MongoDB drivers: .. list-table:: - :widths: 50 50 + :widths: 25 25 50 :header-rows: 1 * - Driver + - Minimum Version - Encryption Library - * - :driver:`Node.js ` versions ``5.5.0`` through ``5.8.1`` - - `mongodb-client-encryption `__ version ``2.8.0`` or later - - * - :driver:`Node.js ` version ``6.0.0`` or later - - `mongodb-client-encryption - `__ with the - same major version number as the Node.js driver. - - For example, Node.js driver v6.x.x requires ``mongodb-client-encryption`` + * - :driver:`C ` + - 1.24.0 + - :ref:`libmongocrypt ` version 1.8.0 or later. + + * - :driver:`C++ ` + - 3.8.0 + - :ref:`libmongocrypt ` version 1.8.0 or later. + + * - :driver:`C#/.NET ` + - 2.20.0 + - No additional dependency. + + * - :driver:`Go ` + - 1.12 + - :ref:`libmongocrypt ` version 1.8.0 + or later. + + * - :driver:`C ` + - 1.24.0 + - :ref:`libmongocrypt ` version 1.8.0 or later. + + * - :driver:`C++ ` + - 3.8.0 + - :ref:`libmongocrypt ` version 1.8.0 or later. + + * - :driver:`C#/.NET ` + - 2.20.0 + - No additional dependency. + + * - :driver:`Go ` + - 1.12 + - :ref:`libmongocrypt ` version 1.8.0 + or later. + + * - :driver:`Java (Synchronous)` and `Java Reactive + Streams `__ + - 4.10.0 + - `mongodb-crypt `__ version 1.8.0 or later + + * - :driver:`Node.js ` + - 5.5.0 + - `mongodb-client-encryption `__ + version 2.8.0 or later. + + Node 6.0.0 or later requires ``mongodb-client-encryption`` with the + same major version number as the Node.js driver. For example, + Node.js driver v6.x.x requires ``mongodb-client-encryption`` v6.x.x. + + * - :driver:`PHP ` + - 1.16 + - No additional dependency. + + * - :driver:`PyMongo ` + - 4.4 + - `pymongocrypt `__ version + 1.6 or later. + + * - :driver:`Ruby ` + - 2.19 + - `libmongocrypt-helper `__ version 1.8.0 or later. + + * - :driver:`Rust ` + - 2.6.0 + - :ref:`libmongocrypt ` version 1.8.0 + or later. + + * - :driver:`Scala ` + - 4.10.0 + - `mongodb-crypt `__ version 1.8.0 or later + +MongoDB Support Limitations +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/queryable-encryption/qe-supportability.rst + +.. _csfle-compatibility-reference: + +{+csfle+} Compatibility +------------------------------------------------------------------------ + +You can use {+csfle+}({+csfle-abbrev+}) on a MongoDB 4.2 or later +replica set or sharded cluster, but not a standalone instance. The +following table shows which MongoDB server products support which +{+csfle+} mechanisms: - * - :driver:`C#/.NET ` version ``2.20.0`` or later - - No additional dependency - - * - :driver:`Java (Synchronous) and Java Reactive Streams ` version ``4.10.0`` or later - - `mongodb-crypt `__ version ``1.8.0`` or later - - * - :driver:`PyMongo ` version ``4.4`` or later - - `pymongocrypt `__ version ``1.6`` or later +.. list-table:: + :header-rows: 1 + :widths: 25 15 30 30 - * - :driver:`Go ` version ``1.12`` or later - - :ref:`libmongocrypt ` version ``1.8.0`` or later - - * - :driver:`C ` version ``1.24.0`` or later - - :ref:`libmongocrypt ` version ``1.8.0`` or later + * - Product Name + - Minimum Version + - Supports {+csfle-abbrev+} with Automatic Encryption + - Supports {+csfle-abbrev+} with {+manual-enc-title+} - * - :driver:`C++ ` version ``3.8.0`` or later - - :ref:`libmongocrypt ` version ``1.8.0`` or later + * - MongoDB Enterprise Advanced + - 4.2 + - Yes + - Yes - * - :driver:`PHP ` version ``1.16`` or later - - No additional dependency + * - MongoDB Community Edition + - 4.2 + - No + - Yes - * - :driver:`Ruby ` version ``2.19`` or later - - `libmongocrypt-helper `__ version ``1.8.0`` or later +.. _csfle-driver-compatibility: - * - :driver:`Rust ` version ``2.6.0`` or later - - :ref:`libmongocrypt ` version ``1.8.0`` or later +{+csfle+} Driver Compatibility +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +{+csfle+} requires the following minimum versions for +compatible MongoDB drivers. - * - :driver:`Scala ` version ``4.10.0`` or later - - `mongodb-crypt `__ version ``1.8.0`` or later +.. important:: Key Rotation Support + + To use the Key Rotation API, you must use specific versions + of either your driver's binding package or ``libmongocrypt``. + +.. _csfle-reference-compatibility-key-rotation: + +.. list-table:: + :widths: 25 25 50 + :header-rows: 1 + * - Driver + - Minimum Version + - Key Rotation Requirements + + * - :driver:`C ` + - 1.17.5 + - No additional requirements. + + * - :driver:`C++ ` + - 3.6.0 + - No additional requirements. + + * - :driver:`C#/.NET ` + - 2.10.0 + - Driver version 2.17.1 or later. + + * - :driver:`Go ` + - 1.2 + - ``libmongocrypt`` version 1.5.2 or later. + + * - :driver:`Java ` + - 3.11.0 + - ``mongodb-crypt`` version {+mongodb-crypt-version+} or later. + + * - `Java Reactive Streams + `__ + - 1.12.0 + - ``mongodb-crypt`` version {+mongodb-crypt-version+} or later. + + * - :driver:`Node.js ` + - 3.4.0 + - For driver version 6.0 or later, use the same ``mongodb-client-encryption`` + major version as the driver. + Otherwise, use ``mongodb-client-encryption`` 2.2.0 - 2.x. + + * - :driver:`PHP ` + - 1.6.0 + - No additional requirements. + + * - :driver:`Python (PyMongo) ` + - 3.10.0 + - ``pymongocrypt`` version 1.3.1 or later. + + * - `Ruby `__ + - 2.12.1 + - No additional requirements. + + * - :driver:`Scala ` + - 2.7.0 + - No additional requirements. \ No newline at end of file diff --git a/source/core/queryable-encryption/reference/libmongocrypt.txt b/source/core/queryable-encryption/reference/libmongocrypt.txt index c42e4a9d750..11e74912ab2 100644 --- a/source/core/queryable-encryption/reference/libmongocrypt.txt +++ b/source/core/queryable-encryption/reference/libmongocrypt.txt @@ -1,10 +1,8 @@ .. _qe-reference-libmongocrypt: -============================================== -Install libmongocrypt for Queryable Encryption -============================================== - -.. default-domain:: mongodb +===================== +Install libmongocrypt +===================== .. contents:: On this page :local: @@ -15,14 +13,13 @@ Install libmongocrypt for Queryable Encryption Overview -------- -Learn how to install ``libmongocrypt``, a core component of {+qe+}. -This library performs encryption and decryption and manages communication -between the driver and the {+kms-long+} ({+kms-abbr+}). +The ``libmongocrypt`` library performs encryption and decryption, and +manages communication between the driver and the {+kms-long+} +({+kms-abbr+}). It is packaged with some drivers, but others require you +to install it. -You *do not* need to install this library if it is packaged with the -driver that you are using. To learn which drivers require installation of -``libmongocrypt``, check that it is listed as a dependency in the -:ref:`qe-driver-compatibility-table`. +To see if you need to install ``libmongocrypt``, check if +it is listed as a dependency in the :ref:`Drivers compatibility table `. .. warning:: @@ -247,3 +244,10 @@ Suse .. code-block:: sh sudo zypper -n install libmongocrypt + +Next Steps +---------- + +Once you have installed your driver dependencies, :ref:`install and +configure a library ` to continue setting up +your deployment and development environment. diff --git a/source/core/queryable-encryption/reference/mongocryptd.txt b/source/core/queryable-encryption/reference/mongocryptd.txt deleted file mode 100644 index dc60c5eeccc..00000000000 --- a/source/core/queryable-encryption/reference/mongocryptd.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _qe-reference-mongocryptd: -.. _qe-field-level-encryption-mongocryptd: -.. _qe-mongocryptd: - -========================================================== -Install and Configure mongocryptd for {+qe+} -========================================================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - -Overview --------- - -.. tip:: Use the {+shared-library+} - - If you are starting a new project, use the - ``crypt_shared`` encryption helper, :ref:`referred to as the Shared - Library `. The {+shared-library+} replaces - ``mongocryptd`` and does not require spawning a new process. - -``mongocryptd`` is installed with `MongoDB Enterprise -Server <{+enterprise-download-link+}>`__. - - -When you create a {+qe+} enabled MongoDB client, the ``mongocryptd`` -process starts automatically by default. - -.. include:: /includes/queryable-encryption/qe-facts-mongocryptd-process.rst - -.. _qe-mongocryptd-installation: - -Installation ------------- - -.. include:: /includes/queryable-encryption/qe-csfle-install-mongocryptd.rst - - -Configuration -------------- - -.. include:: /includes/queryable-encryption/qe-csfle-configure-mongocryptd.rst - -Examples -~~~~~~~~ - -.. include:: /includes/queryable-encryption/qe-csfle-mongocryptd-examples.rst diff --git a/source/core/queryable-encryption/reference/shared-library.txt b/source/core/queryable-encryption/reference/shared-library.txt deleted file mode 100644 index c4c2222681d..00000000000 --- a/source/core/queryable-encryption/reference/shared-library.txt +++ /dev/null @@ -1,107 +0,0 @@ -.. _qe-reference-shared-library: - -============================================================ -{+shared-library+} for {+qe+} -============================================================ - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - -Overview --------- - -The {+shared-library+} is a **dynamic library** that enables your client -application to perform automatic {+qe+}. -A dynamic library is a set of functionality accessed -by an application at runtime rather than compile time. -The {+shared-library+} performs the following tasks: - -- Reads the :ref:`{+enc-schema+} ` to determine which fields to encrypt or decrypt -- Prevents your application from executing unsupported operations on - encrypted fields - -The {+shared-library+} *does not* do any of the following: - -- Perform data encryption or decryption -- Access the encryption key material -- Listen for data over the network - -.. important:: Supported MongoDB Server Products - - Automatic {+qe+} is only available in the following MongoDB server products: - - - MongoDB Atlas 7.0 or later clusters - - MongoDB Enterprise 7.0 or later - - Automatic {+qe+} is not available in any version of MongoDB - Community Server. - -The {+shared-library+} is a preferred alternative to ``mongocryptd`` and does -not require you to spawn another process to perform automatic encryption. - -.. tip:: - - While we recommend using the {+shared-library+}, ``mongocryptd`` is still supported. - - To learn more about ``mongocryptd``, see :ref:``. - -To learn more about automatic encryption, see -:ref:``. - -.. _qe-reference-shared-library-download: - -Download the {+shared-library+} ------------------------------------------------- - -Download the {+shared-library+} from the `MongoDB Download Center `__ by selecting the -version and platform, then the library: - -#. In the :guilabel:`Version` dropdown, select the version labeled as "current." -#. In the :guilabel:`Platform` dropdown, select your platform. -#. In the :guilabel:`Package` dropdown, select ``crypt_shared``. -#. Click :guilabel:`Download`. - -.. tip:: - - To view an expanded list of available releases and packages, see - `MongoDB Enterprise Downloads `__. - -.. _qe-reference-shared-library-configuration: - -Configuration -------------- - -You can configure how your driver searches for the {+shared-library+} -through the following parameters: - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 30 70 - - * - Name - - Description - - * - cryptSharedLibPath - - | Specifies the absolute path to the {+shared-library+} package, - | {+shared-library-package+}. - | **Default**: ``undefined`` - - * - cryptSharedLibRequired - - | Specifies if the driver must use the {+shared-library+}. If ``true``, - | the driver raises an error if the {+shared-library+} is unavailable. - | If ``false``, the driver performs the following sequence of actions: - - #. Attempts to use the {+shared-library+}. - #. If the {+shared-library+} is unavailable, the driver attempts to - spawn and connect to ``mongocryptd``. - - | **Default**: ``false`` - -To view an example demonstrating how to configure these parameters, see -the :ref:`Quick Start `. diff --git a/source/core/queryable-encryption/tutorials.txt b/source/core/queryable-encryption/tutorials.txt index ce7cff4c499..07052f86b12 100644 --- a/source/core/queryable-encryption/tutorials.txt +++ b/source/core/queryable-encryption/tutorials.txt @@ -15,24 +15,11 @@ Tutorials :depth: 2 :class: singlecol -Read the following pages to learn how to use {+qe+} with your preferred -{+kms-long+}: - -- AWS - - - :ref:`qe-tutorial-automatic-aws` - -- Azure - - - :ref:`qe-tutorial-automatic-azure` - -- GCP - - - :ref:`qe-tutorial-automatic-gcp` - -- Any {+kmip-kms-title+} - - - :ref:`qe-tutorial-automatic-kmip` +Read the :ref:`Overview: Enable Queryable Encryption +` section to set up your development environment and +data keys, then the :ref:`Overview: Use Queryable Encryption +` section to learn how to use {+qe+} with your +preferred {+kms-long+}. To learn how to use {+qe+} with a local key (not for production), see the :ref:`qe-quick-start`. @@ -41,8 +28,7 @@ To learn how to use {+manual-enc+} with {+qe+}, read :ref:``. Each tutorial provides a sample application in multiple languages for -each supported {+kms-long+}. See the table below for quick -access to all sample applications. +each supported {+kms-long+}. Code samples for specific language drivers: @@ -56,8 +42,6 @@ Code samples for specific language drivers: .. toctree:: :titlesonly: - /core/queryable-encryption/tutorials/aws/aws-automatic - /core/queryable-encryption/tutorials/azure/azure-automatic - /core/queryable-encryption/tutorials/gcp/gcp-automatic - /core/queryable-encryption/tutorials/kmip/kmip-automatic + /core/queryable-encryption/overview-enable-qe + /core/queryable-encryption/overview-use-qe /core/queryable-encryption/tutorials/explicit-encryption diff --git a/source/core/queryable-encryption/tutorials/aws/aws-automatic.txt b/source/core/queryable-encryption/tutorials/aws/aws-automatic.txt deleted file mode 100644 index 004d616f1da..00000000000 --- a/source/core/queryable-encryption/tutorials/aws/aws-automatic.txt +++ /dev/null @@ -1,1093 +0,0 @@ -.. _qe-tutorial-automatic-aws: -.. _qe-tutorial-automatic-dek-aws: - -========================================================= -Use Automatic {+qe+} with AWS -========================================================= - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - -Overview --------- - -This guide shows you how to build an application that implements the MongoDB -{+qe+} feature to automatically encrypt and decrypt document fields and use -Amazon Web Services (AWS) {+kms-abbr+} for key management. - -After you complete the steps in this guide, you should have: - -- A {+cmk-long+} managed by AWS KMS -- An AWS IAM user with permissions to access the {+cmk-long+} - in AWS KMS -- A working client application that inserts {+in-use-docs+} - using your {+cmk-long+} - -.. tip:: Customer Master Keys - - To learn more about the {+cmk-long+}, read the - :ref:`qe-reference-keys-key-vaults` - documentation. - -Before You Get Started ----------------------- - -.. include:: /includes/queryable-encryption/set-up-section.rst - -.. see:: Full Application - - To see the complete code for this sample application, - select the tab corresponding to your programming language and follow - the provided link. Each sample application repository includes a - ``README.md`` file that you can use to learn how to set up your environment - and run the application. - - .. tabs:: - - .. tab:: mongosh - :tabid: shell - - `Complete mongosh Application <{+sample-app-url-qe+}/mongosh/>`__ - - .. tab:: Node.js - :tabid: nodejs - - `Complete Node.js Application <{+sample-app-url-qe+}/node/>`__ - - .. tab:: Python - :tabid: python - - `Complete Python Application <{+sample-app-url-qe+}/python/>`__ - - .. tab:: Java - :tabid: java-sync - - `Complete Java Application <{+sample-app-url-qe+}/java/>`__ - - .. tab:: Go - :tabid: go - - `Complete Go Application <{+sample-app-url-qe+}/go/>`__ - - .. tab:: C# - :tabid: csharp - - `Complete C# Application <{+sample-app-url-qe+}/csharp/>`__ - -.. tabs-selector:: drivers - -Set Up the KMS --------------- - -.. procedure:: - :style: normal - - .. step:: Create the {+cmk-long+} - - .. include:: /includes/queryable-encryption/tutorials/automatic/aws/cmk.rst - - .. step:: Create an AWS IAM User - - .. include:: /includes/queryable-encryption/tutorials/automatic/aws/user.rst - -Create the Application ----------------------- - -.. procedure:: - :style: normal - - .. step:: Assign Your Application Variables - - The code samples in this tutorial use the following variables to perform - the {+qe+} workflow: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"aws"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"aws"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - - **kms_provider_name** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"aws"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **key_vault_database_name** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **key_vault_collection_name** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **key_vault_namespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``key_vault_database_name`` - and ``key_vault_collection_name`` variables, separated by a period. - - **encrypted_database_name** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encrypted_collection_name** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"aws"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: java - :dedent: - - .. tab:: - :tabid: go - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"aws"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this value to ``"aws"`` for this tutorial. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set the value of ``keyVaultDatabaseName`` - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set the value of ``keyVaultCollectionName`` to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set ``keyVaultNamespace`` to a new ``CollectionNamespace`` object whose name - is the values of the ``keyVaultDatabaseName`` and ``keyVaultCollectionName`` variables, - separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set the value of ``encryptedDatabaseName`` to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set the value of ``encryptedCollectionName`` to ``"patients"``. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``appsettings.json`` file or replace the value - directly. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: csharp - :dedent: - - .. important:: {+key-vault-long-title+} Namespace Permissions - - The {+key-vault-long+} is in the ``encryption.__keyVault`` - namespace. Ensure that the database user your application uses to connect - to MongoDB has :ref:`ReadWrite ` - permissions on this namespace. - - .. include:: /includes/queryable-encryption/env-variables.rst - - .. step:: Create your Encrypted Collection - - .. procedure:: - :style: connected - - .. step:: Add Your AWS KMS Credentials - - Create a variable containing your AWS {+kms-abbr+} credentials with the - following structure. Use the Access Key ID and Secret Access Key you created - in the :ref:`Create an IAM User ` step of - this tutorial. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-aws-kms-credentials - :end-before: end-aws-kms-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-aws-kms-credentials - :end-before: end-aws-kms-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-aws-kms-credentials - :end-before: end-aws-kms-credentials - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-aws-kms-credentials - :end-before: end-aws-kms-credentials - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-aws-kms-credentials - :end-before: end-aws-kms-credentials - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-aws-kms-credentials - :end-before: end-aws-kms-credentials - :language: csharp - :dedent: - - .. include:: /includes/queryable-encryption/tutorials/automatic/aws/role-authentication.rst - - .. step:: Add your {+cmk-long+} Credentials - - Create a variable containing your {+cmk-long+} credentials with the - following structure. Use the {+aws-arn-abbr+} and Region you recorded - in the :ref:`Create a {+cmk-long+} ` - step of this tutorial. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-aws-cmk-credentials - :end-before: end-aws-cmk-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-aws-cmk-credentials - :end-before: end-aws-cmk-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-aws-cmk-credentials - :end-before: end-aws-cmk-credentials - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-aws-cmk-credentials - :end-before: end-aws-cmk-credentials - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-aws-cmk-credentials - :end-before: end-aws-cmk-credentials - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-aws-cmk-credentials - :end-before: end-aws-cmk-credentials - :language: csharp - :dedent: - - .. step:: Set Your Automatic Encryption Options - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create an ``autoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your AWS KMS - credentials - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - Create an ``autoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviders`` object, which contains your - AWS KMS credentials - - The ``sharedLibraryPathOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 5-9 - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - Create an ``AutoEncryptionOpts`` object that contains the following - options: - - - The ``kms_provider_credentials`` object, which contains your - AWS KMS credentials - - The namespace of your {+key-vault-long+} - - The path to your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - Create an ``AutoEncryptionSettings`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - AWS KMS credentials - - The ``extraOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 4-8 - :language: java - :dedent: - - .. tab:: - :tabid: go - - Create an ``AutoEncryption`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - AWS KMS credentials - - The ``cryptSharedLibraryPath`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 5-8 - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - Create an ``AutoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - AWS KMS credentials - - The ``extraOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 7-10 - :language: csharp - :dedent: - - .. include:: /includes/queryable-encryption/shared-lib-learn-more.rst - - .. step:: Create a Client to Set Up an Encrypted Collection - - To create a client used to encrypt and decrypt data in - your collection, instantiate a new ``MongoClient`` by using your - connection URI and your automatic encryption options. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-create-client - :end-before: end-create-client - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-create-client - :end-before: end-create-client - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-create-client - :end-before: end-create-client - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-create-client - :end-before: end-create-client - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-create-client - :end-before: end-create-client - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-create-client - :end-before: end-create-client - :language: csharp - :dedent: - - .. step:: Specify Fields to Encrypt - - To encrypt a field, add it to the {+enc-schema+}. - To enable queries on a field, add the "queries" - property. Create the {+enc-schema+} as follows: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: csharp - :dedent: - - .. note:: - - In the previous code sample, both the "ssn" and - "billing" fields are encrypted, but only the "ssn" - field can be queried. - - .. step:: Create the Collection - - Instantiate ``ClientEncryption`` to access the API for the - encryption helper methods. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: csharp - :dedent: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. include:: /includes/tutorials/automatic/node-include-clientEncryption.rst - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: javascript - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: python - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: python - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: java-sync - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: java - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: go - - The Golang version of this tutorial uses data models to - represent the document structure. Add the following - structs to your project to represent the data in your - collection: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-patient-document - :end-before: end-patient-document - :language: go - :dedent: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-patient-record - :end-before: end-patient-record - :language: go - :dedent: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-payment-info - :end-before: end-payment-info - :language: go - :dedent: - - After you've added these classes, create your encrypted - collection by using the encryption helper method accessed - through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: go - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: csharp - - The C# version of this tutorial uses separate classes as data models - to represent the document structure. - Add the following ``Patient``, ``PatientRecord``, and ``PatientBilling`` - classes to your project: - - .. literalinclude:: /includes/qe-tutorials/csharp/Patient.cs - :start-after: start-patient - :end-before: end-patient - :language: csharp - :dedent: - - .. literalinclude:: /includes/qe-tutorials/csharp/PatientRecord.cs - :start-after: start-patient-record - :end-before: end-patient-record - :language: csharp - :dedent: - - .. literalinclude:: /includes/qe-tutorials/csharp/PatientBilling.cs - :start-after: start-patient-billing - :end-before: end-patient-billing - :language: csharp - :dedent: - - After you've added these classes, create your encrypted collection by - using the encryption helper method accessed through the - ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: csharp - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. _qe-aws-insert: - - .. step:: Insert a Document with Encrypted Fields - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 17 - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - This tutorial uses POJOs as data models - to represent the document structure. To set up your application to - use POJOs, add the following code: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-setup-application-pojo - :end-before: end-setup-application-pojo - :language: java - :dedent: - - To learn more about Java POJOs, see the `Plain Old Java Object - wikipedia article `__. - - This tutorial uses the following POJOs: - - - ``Patient`` - - ``PatientRecord`` - - ``PatientBilling`` - - You can view these classes in the `models package of the complete Java application - <{+sample-app-url-qe+}/java/src/main/java/com/mongodb/tutorials/qe/models>`__. - - Add these POJO classes to your application. Then, create an instance - of a ``Patient`` that describes a patient's personal information. Use - the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 8 - :language: java - :dedent: - - .. tab:: - :tabid: go - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 19 - :language: csharp - :dedent: - - .. step:: Query on an Encrypted Field - - The following code sample executes a find query on an encrypted field and - prints the decrypted data: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-find-document - :end-before: end-find-document - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-find-document - :end-before: end-find-document - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-find-document - :end-before: end-find-document - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-find-document - :end-before: end-find-document - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-find-document - :end-before: end-find-document - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-find-document - :end-before: end-find-document - :language: csharp - :dedent: - - The output of the preceding code sample should look similar to the - following: - - .. literalinclude:: /includes/qe-tutorials/encrypted-document.json - :language: json - :copyable: false - :dedent: - - .. include:: /includes/queryable-encryption/safe-content-warning.rst - -Learn More ----------- - -To learn how {+qe+} works, see -:ref:``. - -To learn more about the topics mentioned in this guide, see the -following links: - -- Learn more about {+qe+} components on the :ref:`Reference ` page. -- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page. -- See how KMS Providers manage your {+qe+} keys on the :ref:`` page. diff --git a/source/core/queryable-encryption/tutorials/azure/azure-automatic.txt b/source/core/queryable-encryption/tutorials/azure/azure-automatic.txt deleted file mode 100644 index f2d44016d69..00000000000 --- a/source/core/queryable-encryption/tutorials/azure/azure-automatic.txt +++ /dev/null @@ -1,1090 +0,0 @@ -.. _qe-tutorial-automatic-azure: -.. _qe-tutorial-automatic-dek-azure: - -=========================================================== -Use Automatic {+qe+} with Azure -=========================================================== - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - -Overview --------- - -This guide shows you how to build an application that implements the MongoDB -{+qe+} feature to automatically encrypt and decrypt document fields and use -{+azure-kv+} {+kms-abbr+} for key management. - -After you complete the steps in this guide, you should have: - -- A {+cmk-long+} managed by {+azure-kv+} -- A working client application that inserts {+in-use-docs+} - using your {+cmk-long+} - -.. tip:: Customer Master Keys - - To learn more about the {+cmk-long+}, read the - :ref:`qe-reference-keys-key-vaults` - documentation. - -Before You Get Started ----------------------- - -.. include:: /includes/queryable-encryption/set-up-section.rst - -.. see:: Full Application - - To see the complete code for this sample application, - select the tab corresponding to your programming language and follow - the provided link. Each sample application repository includes a - ``README.md`` file that you can use to learn how to set up your environment - and run the application. - - .. tabs:: - - .. tab:: mongosh - :tabid: shell - - `Complete mongosh Application <{+sample-app-url-qe+}/mongosh/>`__ - - .. tab:: Node.js - :tabid: nodejs - - `Complete Node.js Application <{+sample-app-url-qe+}/node/>`__ - - .. tab:: Python - :tabid: python - - `Complete Python Application <{+sample-app-url-qe+}/python/>`__ - - .. tab:: Java - :tabid: java-sync - - `Complete Java Application <{+sample-app-url-qe+}/java/>`__ - - .. tab:: Go - :tabid: go - - `Complete Go Application <{+sample-app-url-qe+}/go/>`__ - - .. tab:: C# - :tabid: csharp - - `Complete C# Application <{+sample-app-url-qe+}/csharp/>`__ - -.. tabs-selector:: drivers - -Set Up the KMS --------------- - -.. procedure:: - :style: normal - - .. step:: Register your Application with Azure - - .. include:: /includes/queryable-encryption/tutorials/automatic/azure/register.rst - - .. step:: Create the {+cmk-long+} - - .. include:: /includes/queryable-encryption/tutorials/automatic/azure/cmk.rst - -Create the Application ----------------------- - -.. procedure:: - :style: normal - - .. step:: Assign Your Application Variables - - The code samples in this tutorial use the following variables to perform - the {+qe+} workflow: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"azure"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"azure"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - - **kms_provider_name** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"azure"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **key_vault_database_name** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **key_vault_collection_name** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **key_vault_namespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``key_vault_database_name`` - and ``key_vault_collection_name`` variables, separated by a period. - - **encrypted_database_name** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encrypted_collection_name** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"azure"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: java - :dedent: - - .. tab:: - :tabid: go - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"azure"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this value to ``"azure"`` for this tutorial. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set the value of ``keyVaultDatabaseName`` - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set the value of ``keyVaultCollectionName`` to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set ``keyVaultNamespace`` to a new ``CollectionNamespace`` object whose name - is the values of the ``keyVaultDatabaseName`` and ``keyVaultCollectionName`` variables, - separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set the value of ``encryptedDatabaseName`` to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set the value of ``encryptedCollectionName`` to ``"patients"``. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``appsettings.json`` file or replace the value - directly. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: csharp - :dedent: - - .. important:: {+key-vault-long-title+} Namespace Permissions - - The {+key-vault-long+} is in the ``encryption.__keyVault`` - namespace. Ensure that the database user your application uses to connect - to MongoDB has :ref:`ReadWrite ` - permissions on this namespace. - - .. include:: /includes/queryable-encryption/env-variables.rst - - .. step:: Create your Encrypted Collection - - .. procedure:: - :style: connected - - .. step:: Add Your Azure KMS Credentials - - .. _qe-tutorials-automatic-encryption-azure-kms-providers: - - Create a variable containing your Azure {+kms-abbr+} credentials with the - following structure. Use the {+azure-kv+} credentials you recorded in the - :ref:`Register your Application with Azure ` - step of this tutorial. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-azure-kms-credentials - :end-before: end-azure-kms-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-azure-kms-credentials - :end-before: end-azure-kms-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-azure-kms-credentials - :end-before: end-azure-kms-credentials - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-azure-kms-credentials - :end-before: end-azure-kms-credentials - :language: python - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-azure-kms-credentials - :end-before: end-azure-kms-credentials - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-azure-kms-credentials - :end-before: end-azure-kms-credentials - :language: csharp - :dedent: - - .. step:: Add your {+cmk-long+} Credentials - - Create a variable containing your {+cmk-long+} credentials with the - following structure. Use the {+cmk-long+} details you recorded in the - :ref:`Create a {+cmk-long+} ` step of this tutorial. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-azure-cmk-credentials - :end-before: end-azure-cmk-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-azure-cmk-credentials - :end-before: end-azure-cmk-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-azure-cmk-credentials - :end-before: end-azure-cmk-credentials - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-azure-cmk-credentials - :end-before: end-azure-cmk-credentials - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-azure-cmk-credentials - :end-before: end-azure-cmk-credentials - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-azure-cmk-credentials - :end-before: end-azure-cmk-credentials - :language: csharp - :dedent: - - .. step:: Set Your Automatic Encryption Options - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create an ``autoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your Azure KMS - credentials - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - Create an ``autoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviders`` object, which contains your - Azure KMS credentials - - The ``sharedLibraryPathOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 5-9 - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - Create an ``AutoEncryptionOpts`` object that contains the following - options: - - - The ``kms_provider_credentials`` object, which contains your - Azure KMS credentials - - The namespace of your {+key-vault-long+} - - The path to your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - Create an ``AutoEncryptionSettings`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - Azure KMS credentials - - The ``extraOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 4-8 - :language: java - :dedent: - - .. tab:: - :tabid: go - - Create an ``AutoEncryption`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - Azure KMS credentials - - The ``cryptSharedLibraryPath`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 5-8 - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - Create an ``AutoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - Azure KMS credentials - - The ``extraOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 7-10 - :language: csharp - :dedent: - - .. include:: /includes/queryable-encryption/shared-lib-learn-more.rst - - .. step:: Create a Client to Set Up an Encrypted Collection - - To create a client used to encrypt and decrypt data in - your collection, instantiate a new ``MongoClient`` by using your - connection URI and your automatic encryption options. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-create-client - :end-before: end-create-client - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-create-client - :end-before: end-create-client - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-create-client - :end-before: end-create-client - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-create-client - :end-before: end-create-client - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-create-client - :end-before: end-create-client - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-create-client - :end-before: end-create-client - :language: csharp - :dedent: - - .. step:: Specify Fields to Encrypt - - To encrypt a field, add it to the {+enc-schema+}. - To enable queries on a field, add the "queries" - property. Create the {+enc-schema+} as follows: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: csharp - :dedent: - - .. note:: - - In the previous code sample, both the "ssn" and - "billing" fields are encrypted, but only the "ssn" - field can be queried. - - .. step:: Create the Collection - - Instantiate ``ClientEncryption`` to access the API for the - encryption helper methods. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: csharp - :dedent: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. include:: /includes/tutorials/automatic/node-include-clientEncryption.rst - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: javascript - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: python - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: python - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: java-sync - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: java - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: go - - The Golang version of this tutorial uses data models to - represent the document structure. Add the following - structs to your project to represent the data in your - collection: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-patient-document - :end-before: end-patient-document - :language: go - :dedent: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-patient-record - :end-before: end-patient-record - :language: go - :dedent: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-payment-info - :end-before: end-payment-info - :language: go - :dedent: - - After you've added these classes, create your encrypted - collection by using the encryption helper method accessed - through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: go - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: csharp - - The C# version of this tutorial uses separate classes as data models - to represent the document structure. - Add the following ``Patient``, ``PatientRecord``, and ``PatientBilling`` - classes to your project: - - .. literalinclude:: /includes/qe-tutorials/csharp/Patient.cs - :start-after: start-patient - :end-before: end-patient - :language: csharp - :dedent: - - .. literalinclude:: /includes/qe-tutorials/csharp/PatientRecord.cs - :start-after: start-patient-record - :end-before: end-patient-record - :language: csharp - :dedent: - - .. literalinclude:: /includes/qe-tutorials/csharp/PatientBilling.cs - :start-after: start-patient-billing - :end-before: end-patient-billing - :language: csharp - :dedent: - - After you've added these classes, create your encrypted collection by - using the encryption helper method accessed through the - ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: csharp - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. _qe-azure-insert: - - .. step:: Insert a Document with Encrypted Fields - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 17 - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - This tutorial uses POJOs as data models - to represent the document structure. To set up your application to - use POJOs, add the following code: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-setup-application-pojo - :end-before: end-setup-application-pojo - :language: java - :dedent: - - To learn more about Java POJOs, see the `Plain Old Java Object - wikipedia article `__. - - This tutorial uses the following POJOs: - - - ``Patient`` - - ``PatientRecord`` - - ``PatientBilling`` - - You can view these classes in the `models package of the complete Java application - <{+sample-app-url-qe+}/java/src/main/java/com/mongodb/tutorials/qe/models>`__. - - Add these POJO classes to your application. Then, create an instance - of a ``Patient`` that describes a patient's personal information. Use - the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 8 - :language: java - :dedent: - - .. tab:: - :tabid: go - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 19 - :language: csharp - :dedent: - - .. step:: Query on an Encrypted Field - - The following code sample executes a find query on an encrypted field and - prints the decrypted data: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-find-document - :end-before: end-find-document - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-find-document - :end-before: end-find-document - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-find-document - :end-before: end-find-document - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-find-document - :end-before: end-find-document - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-find-document - :end-before: end-find-document - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-find-document - :end-before: end-find-document - :language: csharp - :dedent: - - The output of the preceding code sample should look similar to the - following: - - .. literalinclude:: /includes/qe-tutorials/encrypted-document.json - :language: json - :copyable: false - :dedent: - - .. include:: /includes/queryable-encryption/safe-content-warning.rst - -Learn More ----------- - -To learn how {+qe+} works, see -:ref:``. - -To learn more about the topics mentioned in this guide, see the -following links: - -- Learn more about {+qe+} components on the :ref:`Reference ` page. -- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page. -- See how KMS Providers manage your {+qe+} keys on the :ref:`` page. diff --git a/source/core/queryable-encryption/tutorials/gcp/gcp-automatic.txt b/source/core/queryable-encryption/tutorials/gcp/gcp-automatic.txt deleted file mode 100644 index ed12c93a93d..00000000000 --- a/source/core/queryable-encryption/tutorials/gcp/gcp-automatic.txt +++ /dev/null @@ -1,1087 +0,0 @@ -.. _qe-tutorial-automatic-gcp: -.. _qe-tutorial-automatic-dek-gcp: - -========================================================= -Use Automatic {+qe+} with GCP -========================================================= - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - -Overview --------- - -This guide shows you how to build an application that implements the MongoDB -{+qe+} feature to automatically encrypt and decrypt document fields and use -{+gcp-kms+} for key management. - -After you complete the steps in this guide, you should have: - -- A {+cmk-abbr+} managed by {+gcp-kms+} -- A working client application that inserts {+in-use-docs+} - using your {+cmk-abbr+} - -.. tip:: Customer Master Keys - - To learn more about the {+cmk-long+}, read the - :ref:`qe-reference-keys-key-vaults` - documentation. - -Before You Get Started ----------------------- - -.. include:: /includes/queryable-encryption/set-up-section.rst - -.. see:: Full Application - - To see the complete code for this sample application, - select the tab corresponding to your programming language and follow - the provided link. Each sample application repository includes a - ``README.md`` file that you can use to learn how to set up your environment - and run the application. - - .. tabs:: - - .. tab:: mongosh - :tabid: shell - - `Complete mongosh Application <{+sample-app-url-qe+}/mongosh/>`__ - - .. tab:: Node.js - :tabid: nodejs - - `Complete Node.js Application <{+sample-app-url-qe+}/node/>`__ - - .. tab:: Python - :tabid: python - - `Complete Python Application <{+sample-app-url-qe+}/python/>`__ - - .. tab:: Java - :tabid: java-sync - - `Complete Java Application <{+sample-app-url-qe+}/java/>`__ - - .. tab:: Go - :tabid: go - - `Complete Go Application <{+sample-app-url-qe+}/go/>`__ - - .. tab:: C# - :tabid: csharp - - `Complete C# Application <{+sample-app-url-qe+}/csharp/>`__ - -.. tabs-selector:: drivers - -Set Up the KMS --------------- - -.. procedure:: - :style: normal - - .. step:: Register a {+gcp-abbr+} Service Account - - .. include:: /includes/queryable-encryption/tutorials/automatic/gcp/register.rst - - .. step:: Create a {+gcp-abbr+} {+cmk-long+} - - .. include:: /includes/queryable-encryption/tutorials/automatic/gcp/cmk.rst - - -Create the Application ----------------------- - -.. procedure:: - :style: normal - - .. step:: Assign Your Application Variables - - The code samples in this tutorial use the following variables to perform - the {+qe+} workflow: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"gcp"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"gcp"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - - **kms_provider_name** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"gcp"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **key_vault_database_name** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **key_vault_collection_name** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **key_vault_namespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``key_vault_database_name`` - and ``key_vault_collection_name`` variables, separated by a period. - - **encrypted_database_name** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encrypted_collection_name** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"gcp"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: java - :dedent: - - .. tab:: - :tabid: go - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"gcp"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this value to ``"gcp"`` for this tutorial. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set the value of ``keyVaultDatabaseName`` - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set the value of ``keyVaultCollectionName`` to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set ``keyVaultNamespace`` to a new ``CollectionNamespace`` object whose name - is the values of the ``keyVaultDatabaseName`` and ``keyVaultCollectionName`` variables, - separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set the value of ``encryptedDatabaseName`` to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set the value of ``encryptedCollectionName`` to ``"patients"``. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``appsettings.json`` file or replace the value - directly. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: csharp - :dedent: - - .. important:: {+key-vault-long-title+} Namespace Permissions - - The {+key-vault-long+} is in the ``encryption.__keyVault`` - namespace. Ensure that the database user your application uses to connect - to MongoDB has :ref:`ReadWrite ` - permissions on this namespace. - - .. include:: /includes/queryable-encryption/env-variables.rst - - .. step:: Create your Encrypted Collection - - .. procedure:: - :style: connected - - .. step:: Add Your {+gcp-kms+} Credentials - - Create a variable containing your {+gcp-kms+} credentials with the - following structure: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-gcp-kms-credentials - :end-before: end-gcp-kms-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-gcp-kms-credentials - :end-before: end-gcp-kms-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-gcp-kms-credentials - :end-before: end-gcp-kms-credentials - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-gcp-kms-credentials - :end-before: end-gcp-kms-credentials - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-gcp-kms-credentials - :end-before: end-gcp-kms-credentials - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-gcp-kms-credentials - :end-before: end-gcp-kms-credentials - :language: csharp - :dedent: - - .. step:: Add your {+cmk-long+} Credentials - - Create a variable containing your {+cmk-long+} credentials with the - following structure. Use the credentials you recorded - in the :ref:`Create a new {+cmk-long+} ` - step of this tutorial. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-gcp-cmk-credentials - :end-before: end-gcp-cmk-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-gcp-cmk-credentials - :end-before: end-gcp-cmk-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-gcp-cmk-credentials - :end-before: end-gcp-cmk-credentials - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-gcp-cmk-credentials - :end-before: end-gcp-cmk-credentials - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-gcp-cmk-credentials - :end-before: end-gcp-cmk-credentials - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-gcp-cmk-credentials - :end-before: end-gcp-cmk-credentials - :language: csharp - :dedent: - - .. step:: Set Your Automatic Encryption Options - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create an ``autoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your {+gcp-kms+} - credentials - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - Create an ``autoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviders`` object, which contains your - {+gcp-kms+} credentials - - The ``sharedLibraryPathOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 5-9 - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - Create an ``AutoEncryptionOpts`` object that contains the following - options: - - - The ``kms_provider_credentials`` object, which contains your - {+gcp-kms+} credentials - - The namespace of your {+key-vault-long+} - - The path to your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - Create an ``AutoEncryptionSettings`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - {+gcp-kms+} credentials - - The ``extraOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 4-8 - :language: java - :dedent: - - .. tab:: - :tabid: go - - Create an ``AutoEncryption`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - {+gcp-kms+} credentials - - The ``cryptSharedLibraryPath`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 5-8 - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - Create an ``AutoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - {+gcp-kms+} credentials - - The ``extraOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 7-10 - :language: csharp - :dedent: - - .. include:: /includes/queryable-encryption/shared-lib-learn-more.rst - - .. step:: Create a Client to Set Up an Encrypted Collection - - To create a client used to encrypt and decrypt data in - your collection, instantiate a new ``MongoClient`` by using your - connection URI and your automatic encryption options. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-create-client - :end-before: end-create-client - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-create-client - :end-before: end-create-client - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-create-client - :end-before: end-create-client - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-create-client - :end-before: end-create-client - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-create-client - :end-before: end-create-client - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-create-client - :end-before: end-create-client - :language: csharp - :dedent: - - .. step:: Specify Fields to Encrypt - - To encrypt a field, add it to the {+enc-schema+}. - To enable queries on a field, add the "queries" - property. Create the {+enc-schema+} as follows: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: csharp - :dedent: - - .. note:: - - In the previous code sample, both the "ssn" and - "billing" fields are encrypted, but only the "ssn" - field can be queried. - - .. step:: Create the Collection - - Instantiate ``ClientEncryption`` to access the API for the - encryption helper methods. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: csharp - :dedent: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. include:: /includes/tutorials/automatic/node-include-clientEncryption.rst - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: javascript - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: python - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: python - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: java-sync - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: java - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: go - - The Golang version of this tutorial uses data models to - represent the document structure. Add the following - structs to your project to represent the data in your - collection: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-patient-document - :end-before: end-patient-document - :language: go - :dedent: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-patient-record - :end-before: end-patient-record - :language: go - :dedent: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-payment-info - :end-before: end-payment-info - :language: go - :dedent: - - After you've added these classes, create your encrypted - collection by using the encryption helper method accessed - through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: go - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: csharp - - The C# version of this tutorial uses separate classes as data models - to represent the document structure. - Add the following ``Patient``, ``PatientRecord``, and ``PatientBilling`` - classes to your project: - - .. literalinclude:: /includes/qe-tutorials/csharp/Patient.cs - :start-after: start-patient - :end-before: end-patient - :language: csharp - :dedent: - - .. literalinclude:: /includes/qe-tutorials/csharp/PatientRecord.cs - :start-after: start-patient-record - :end-before: end-patient-record - :language: csharp - :dedent: - - .. literalinclude:: /includes/qe-tutorials/csharp/PatientBilling.cs - :start-after: start-patient-billing - :end-before: end-patient-billing - :language: csharp - :dedent: - - After you've added these classes, create your encrypted collection by - using the encryption helper method accessed through the - ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: csharp - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. _qe-gcip-insert: - - .. step:: Insert a Document with Encrypted Fields - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 17 - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - This tutorial uses POJOs as data models - to represent the document structure. To set up your application to - use POJOs, add the following code: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-setup-application-pojo - :end-before: end-setup-application-pojo - :language: java - :dedent: - - To learn more about Java POJOs, see the `Plain Old Java Object - wikipedia article `__. - - This tutorial uses the following POJOs: - - - ``Patient`` - - ``PatientRecord`` - - ``PatientBilling`` - - You can view these classes in the `models package of the complete Java application - <{+sample-app-url-qe+}/java/src/main/java/com/mongodb/tutorials/qe/models>`__. - - Add these POJO classes to your application. Then, create an instance - of a ``Patient`` that describes a patient's personal information. Use - the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 8 - :language: java - - .. tab:: - :tabid: go - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 19 - :language: csharp - :dedent: - - .. step:: Query on an Encrypted Field - - The following code sample executes a find query on an encrypted field and - prints the decrypted data: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-find-document - :end-before: end-find-document - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-find-document - :end-before: end-find-document - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-find-document - :end-before: end-find-document - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-find-document - :end-before: end-find-document - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-find-document - :end-before: end-find-document - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-find-document - :end-before: end-find-document - :language: csharp - :dedent: - - The output of the preceding code sample should look similar to the - following: - - .. literalinclude:: /includes/qe-tutorials/encrypted-document.json - :language: json - :copyable: false - :dedent: - - .. include:: /includes/queryable-encryption/safe-content-warning.rst - -Learn More ----------- - -To learn how {+qe+} works, see -:ref:``. - -To learn more about the topics mentioned in this guide, see the -following links: - -- Learn more about {+qe+} components on the :ref:`Reference ` page. -- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page. -- See how KMS Providers manage your {+qe+} keys on the :ref:`` page. diff --git a/source/core/queryable-encryption/tutorials/kmip/kmip-automatic.txt b/source/core/queryable-encryption/tutorials/kmip/kmip-automatic.txt deleted file mode 100644 index 13fd1d1a727..00000000000 --- a/source/core/queryable-encryption/tutorials/kmip/kmip-automatic.txt +++ /dev/null @@ -1,1103 +0,0 @@ -.. _qe-tutorial-automatic-kmip: -.. _qe-tutorial-automatic-dek-kmip: - -=========================================================== -Use Automatic {+qe+} with KMIP -=========================================================== - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - -Overview --------- - -This guide shows you how to build an application that implements the MongoDB -{+qe+} feature to automatically encrypt and decrypt document fields and use -a Key Management Interoperability Protocol (KMIP)-compliant key provider for -key management. - -After you complete the steps in this guide, you should have: - -- A {+cmk-long+} managed by a {+kmip-kms+} -- A working client application that inserts {+in-use-docs+} - using your {+cmk-long+} - -.. tip:: Customer Master Keys - - To learn more about the {+cmk-long+}, read the - :ref:`qe-reference-keys-key-vaults` - documentation. - -Before You Get Started ----------------------- - -.. include:: /includes/queryable-encryption/set-up-section.rst - -.. see:: Full Application - - To see the complete code for this sample application, - select the tab corresponding to your programming language and follow - the provided link. Each sample application repository includes a - ``README.md`` file that you can use to learn how to set up your environment - and run the application. - - .. tabs:: - - .. tab:: mongosh - :tabid: shell - - `Complete mongosh Application <{+sample-app-url-qe+}/mongosh/>`__ - - .. tab:: Node.js - :tabid: nodejs - - `Complete Node.js Application <{+sample-app-url-qe+}/node/>`__ - - .. tab:: Python - :tabid: python - - `Complete Python Application <{+sample-app-url-qe+}/python/>`__ - - .. tab:: Java - :tabid: java-sync - - `Complete Java Application <{+sample-app-url-qe+}/java/>`__ - - .. tab:: Go - :tabid: go - - `Complete Go Application <{+sample-app-url-qe+}/go/>`__ - - .. tab:: C# - :tabid: csharp - - `Complete C# Application <{+sample-app-url-qe+}/csharp/>`__ - -.. tabs-selector:: drivers - -Set Up the KMS --------------- - -.. procedure:: - :style: normal - - .. step:: Configure your {+kmip-kms-title+} - - .. include:: /includes/queryable-encryption/tutorials/automatic/kmip/configure.rst - - .. step:: Specify your Certificates - - .. _qe-kmip-tutorial-specify-your-certificates: - - .. include:: /includes/queryable-encryption/tutorials/automatic/kmip/certificates.rst - -Create the Application ----------------------- - -.. procedure:: - :style: normal - - .. step:: Assign Your Application Variables - - The code samples in this tutorial use the following variables to perform - the {+qe+} workflow: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"kmip"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"kmip"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - - **kms_provider_name** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"kmip"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **key_vault_database_name** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **key_vault_collection_name** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **key_vault_namespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``key_vault_database_name`` - and ``key_vault_collection_name`` variables, separated by a period. - - **encrypted_database_name** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encrypted_collection_name** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"kmip"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: java - :dedent: - - .. tab:: - :tabid: go - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this variable to ``"kmip"`` for this tutorial. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``MONGODB_URI`` environment variable or replace the value - directly. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set this variable - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set this variable to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set this variable to the values of the ``keyVaultDatabaseName`` - and ``keyVaultCollectionName`` variables, separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set this variable to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set this variable to ``"patients"``. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - - **kmsProviderName** - The KMS you're using to store your {+cmk-long+}. - Set this value to ``"kmip"`` for this tutorial. - - **keyVaultDatabaseName** - The database in MongoDB where your data - encryption keys (DEKs) will be stored. Set the value of ``keyVaultDatabaseName`` - to ``"encryption"``. - - **keyVaultCollectionName** - The collection in MongoDB where your DEKs - will be stored. Set the value of ``keyVaultCollectionName`` to ``"__keyVault"``. - - **keyVaultNamespace** - The namespace in MongoDB where your DEKs will - be stored. Set ``keyVaultNamespace`` to a new ``CollectionNamespace`` object whose name - is the values of the ``keyVaultDatabaseName`` and ``keyVaultCollectionName`` variables, - separated by a period. - - **encryptedDatabaseName** - The database in MongoDB where your encrypted - data will be stored. Set the value of ``encryptedDatabaseName`` to ``"medicalRecords"``. - - **encryptedCollectionName** - The collection in MongoDB where your encrypted - data will be stored. Set the value of ``encryptedCollectionName`` to ``"patients"``. - - **uri** - Your MongoDB deployment connection URI. Set your connection - URI in the ``appsettings.json`` file or replace the value - directly. - - You can declare these variables by using the following code: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-setup-application-variables - :end-before: end-setup-application-variables - :language: csharp - :dedent: - - .. important:: {+key-vault-long-title+} Namespace Permissions - - The {+key-vault-long+} is in the ``encryption.__keyVault`` - namespace. Ensure that the database user your application uses to connect - to MongoDB has :ref:`ReadWrite ` - permissions on this namespace. - - .. include:: /includes/queryable-encryption/env-variables.rst - - .. step:: Create your Encrypted Collection - - .. procedure:: - :style: connected - - .. step:: Add Your {+kmip-kms-title+} KMS Credentials - - Create a variable containing the endpoint of your {+kmip-kms-no-hover+} - with the following structure: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-kmip-kms-credentials - :end-before: end-kmip-kms-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-kmip-kms-credentials - :end-before: end-kmip-kms-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-kmip-kms-credentials - :end-before: end-kmip-kms-credentials - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-kmip-kms-credentials - :end-before: end-kmip-kms-credentials - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-kmip-kms-credentials - :end-before: end-kmip-kms-credentials - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-kmip-kms-credentials - :end-before: end-kmip-kms-credentials - :language: csharp - :dedent: - - .. step:: Add your {+cmk-long+} Credentials - - Create an empty object as shown in the following code example. - This prompts your {+kmip-kms+} to generate a new {+cmk-long+}. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-kmip-local-cmk-credentials - :end-before: end-kmip-local-cmk-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-kmip-local-cmk-credentials - :end-before: end-kmip-local-cmk-credentials - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-kmip-local-cmk-credentials - :end-before: end-kmip-local-cmk-credentials - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-kmip-local-cmk-credentials - :end-before: end-kmip-local-cmk-credentials - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-kmip-local-cmk-credentials - :end-before: end-kmip-local-cmk-credentials - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-kmip-local-cmk-credentials - :end-before: end-kmip-local-cmk-credentials - :language: csharp - :dedent: - - .. step:: Set Your Automatic Encryption Options - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create an ``autoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - {+kmip-hover+} endpoint - - The ``tlsOptions`` object that you created in the :ref:`Specify your - Certificates ` - step - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-helpers.js - :start-after: start-kmip-encryption-options - :end-before: end-kmip-encryption-options - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - Create an ``autoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviders`` object, which contains your - {+kmip-hover+} endpoint - - The ``sharedLibraryPathOptions`` object, which contains the path to - your {+shared-library+} - - The ``tlsOptions`` object that you created in the :ref:`Specify your - Certificates ` - step - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-kmip-encryption-options - :end-before: end-kmip-encryption-options - :emphasize-lines: 5-10 - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - Create an ``AutoEncryptionOpts`` object that contains the following - options: - - - The ``kms_provider_credentials`` object, which contains your - {+kmip-hover+} endpoint - - The namespace of your {+key-vault-long+} - - The path to your {+shared-library+} - - The ``tls_options`` object that you created in the :ref:`Specify your - Certificates ` - step - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-kmip-encryption-options - :end-before: end-kmip-encryption-options - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - Create an ``AutoEncryptionSettings`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - {+kmip-hover+} endpoint - - The ``extraOptions`` object, which contains the path to - your {+shared-library+} - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/util/QueryableEncryptionHelpers.java - :start-after: start-auto-encryption-options - :end-before: end-auto-encryption-options - :emphasize-lines: 4-8 - :language: java - :dedent: - - .. tab:: - :tabid: go - - Create an ``AutoEncryption`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - {+kmip-hover+} endpoint - - The ``cryptSharedLibraryPath`` object, which contains the path to - your {+shared-library+} - - The ``tlsConfig`` object that you created in the :ref:`Specify your - Certificates ` - step - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-kmip-encryption-options - :end-before: end-kmip-encryption-options - :emphasize-lines: 5-9 - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - Create an ``AutoEncryptionOptions`` object that contains the following - options: - - - The namespace of your {+key-vault-long+} - - The ``kmsProviderCredentials`` object, which contains your - {+kmip-hover+} endpoint - - The ``extraOptions`` object, which contains the path to - your {+shared-library+} - - The ``tlsOptions`` object that you created in the :ref:`Specify your - Certificates ` - step - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-kmip-encryption-options - :end-before: end-kmip-encryption-options - :emphasize-lines: 7-11 - :language: csharp - :dedent: - - .. include:: /includes/queryable-encryption/shared-lib-learn-more.rst - - .. step:: Create a Client to Set Up an Encrypted Collection - - To create a client used to encrypt and decrypt data in - your collection, instantiate a new ``MongoClient`` by using your - connection URI and your automatic encryption options. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-create-client - :end-before: end-create-client - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-create-client - :end-before: end-create-client - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-create-client - :end-before: end-create-client - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-create-client - :end-before: end-create-client - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-create-client - :end-before: end-create-client - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-create-client - :end-before: end-create-client - :language: csharp - :dedent: - - .. step:: Specify Fields to Encrypt - - To encrypt a field, add it to the {+enc-schema+}. - To enable queries on a field, add the "queries" - property. Create the {+enc-schema+} as follows: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-encrypted-fields-map - :end-before: end-encrypted-fields-map - :language: csharp - :dedent: - - .. note:: - - In the previous code sample, both the "ssn" and - "billing" fields are encrypted, but only the "ssn" - field can be queried. - - .. step:: Create the Collection - - Instantiate ``ClientEncryption`` to access the API for the - encryption helper methods. - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_helpers.py - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_helpers.go - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionHelpers.cs - :start-after: start-client-encryption - :end-before: end-client-encryption - :language: csharp - :dedent: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. include:: /includes/tutorials/automatic/node-include-clientEncryption.rst - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-helpers.js - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: javascript - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: python - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: python - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: java-sync - - Create your encrypted collection by using the encryption - helper method accessed through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: java - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: go - - The Golang version of this tutorial uses data models to - represent the document structure. Add the following - structs to your project to represent the data in your - collection: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-patient-document - :end-before: end-patient-document - :language: go - :dedent: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-patient-record - :end-before: end-patient-record - :language: go - :dedent: - - .. literalinclude:: /includes/qe-tutorials/go/models.go - :start-after: start-payment-info - :end-before: end-payment-info - :language: go - :dedent: - - After you've added these classes, create your encrypted - collection by using the encryption helper method accessed - through the ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: go - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. tab:: - :tabid: csharp - - The C# version of this tutorial uses separate classes as data models - to represent the document structure. - Add the following ``Patient``, ``PatientRecord``, and ``PatientBilling`` - classes to your project: - - .. literalinclude:: /includes/qe-tutorials/csharp/Patient.cs - :start-after: start-patient - :end-before: end-patient - :language: csharp - :dedent: - - .. literalinclude:: /includes/qe-tutorials/csharp/PatientRecord.cs - :start-after: start-patient-record - :end-before: end-patient-record - :language: csharp - :dedent: - - .. literalinclude:: /includes/qe-tutorials/csharp/PatientBilling.cs - :start-after: start-patient-billing - :end-before: end-patient-billing - :language: csharp - :dedent: - - After you've added these classes, create your encrypted collection by - using the encryption helper method accessed through the - ``ClientEncryption`` class. - This method automatically generates data encryption keys for your - encrypted fields and creates the encrypted collection: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-create-encrypted-collection - :end-before: end-create-encrypted-collection - :language: csharp - :dedent: - - .. tip:: Database vs. Database Name - - The method that creates the encrypted collection requires a reference - to a database *object* rather than the database *name*. You can - obtain this reference by using a method on your client object. - - .. _qe-kmip-insert: - - .. step:: Insert a Document with Encrypted Fields - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 17 - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - This tutorial uses POJOs as data models - to represent the document structure. To set up your application to - use POJOs, add the following code: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-setup-application-pojo - :end-before: end-setup-application-pojo - :language: java - :dedent: - - To learn more about Java POJOs, see the `Plain Old Java Object - wikipedia article `__. - - This tutorial uses the following POJOs: - - - ``Patient`` - - ``PatientRecord`` - - ``PatientBilling`` - - You can view these classes in the `models package of the complete Java application - <{+sample-app-url-qe+}/java/src/main/java/com/mongodb/tutorials/qe/models>`__. - - Add these POJO classes to your application. Then, create an instance - of a ``Patient`` that describes a patient's personal information. Use - the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 8 - :language: java - :dedent: - - .. tab:: - :tabid: go - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 15 - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - Create a sample document that describes a patient's personal information. - Use the encrypted client to insert it into the ``patients`` collection, - as shown in the following example: - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-insert-document - :end-before: end-insert-document - :emphasize-lines: 19 - :language: csharp - :dedent: - - .. step:: Query on an Encrypted Field - - The following code sample executes a find query on an encrypted field and - prints the decrypted data: - - .. tabs-drivers:: - - .. tab:: - :tabid: shell - - .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js - :start-after: start-find-document - :end-before: end-find-document - :language: javascript - :dedent: - - .. tab:: - :tabid: nodejs - - .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js - :start-after: start-find-document - :end-before: end-find-document - :language: javascript - :dedent: - - .. tab:: - :tabid: python - - .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py - :start-after: start-find-document - :end-before: end-find-document - :language: python - :dedent: - - .. tab:: - :tabid: java-sync - - .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java - :start-after: start-find-document - :end-before: end-find-document - :language: java - :dedent: - - .. tab:: - :tabid: go - - .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go - :start-after: start-find-document - :end-before: end-find-document - :language: go - :dedent: - - .. tab:: - :tabid: csharp - - .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs - :start-after: start-find-document - :end-before: end-find-document - :language: csharp - :dedent: - - The output of the preceding code sample should look similar to the - following: - - .. literalinclude:: /includes/qe-tutorials/encrypted-document.json - :language: json - :copyable: false - :dedent: - - .. include:: /includes/queryable-encryption/safe-content-warning.rst - -Learn More ----------- - -To learn how {+qe+} works, see -:ref:``. - -To learn more about the topics mentioned in this guide, see the -following links: - -- Learn more about {+qe+} components on the :ref:`Reference ` page. -- Learn how {+cmk-long+}s and {+dek-long+}s work on the :ref:`` page. -- See how KMS Providers manage your {+qe+} keys on the :ref:`` page. diff --git a/source/core/security-in-use-encryption.txt b/source/core/security-in-use-encryption.txt index bc64a693e4c..66d53607195 100644 --- a/source/core/security-in-use-encryption.txt +++ b/source/core/security-in-use-encryption.txt @@ -1,4 +1,12 @@ +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: client-side field level encryption, queryable encryption, in-use encryption, envelope encryption + .. _security-in-use-encryption: +.. _security-data-encryption: ================= In-Use Encryption @@ -6,10 +14,48 @@ In-Use Encryption .. default-domain:: mongodb -.. TODO: Write +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +MongoDB provides two approaches to :term:`In-Use Encryption`: + +- :ref:`{+qe+} ` +- :ref:`{+csfle+} `. + +Choosing an In-Use Encryption Approach +-------------------------------------- +You can use both {+qe+} and {+csfle+} in the same deployment, but they are +incompatible with each other in the same collection. For a comparison +of the two, including compatibility with MongoDB versions and points to +consider when choosing one or the other, see :ref:`Choosing an In-Use +Encryption Approach `. + +Encryption Keys and Key Vaults +------------------------------ +Both {+qe+} and {+csfle+} use an :term:`envelope encryption` approach to +encrypt data, where an encrypted field in a document uses a unique +:term:`Data Encryption Key`, and those keys are encrypted using a +:term:`Customer Master Key`. + +For details, see :ref:``. + +{+qe+} +------------------------------------- +To learn how {+qe+} and its components work and how to implement it in +your application, see :ref:``. + +{+csfle+} +-------------------------------------- +To learn how {+csfle+} and its components work and how to implement it +in your application, see :ref:``. .. toctree:: :titlesonly: + /core/queryable-encryption/about-qe-csfle + /core/queryable-encryption/reference/compatibility /core/queryable-encryption /core/csfle diff --git a/source/includes/create-an-encrypted-db-conn.rst b/source/includes/create-an-encrypted-db-conn.rst index 0e582d09233..f659052e7c7 100644 --- a/source/includes/create-an-encrypted-db-conn.rst +++ b/source/includes/create-an-encrypted-db-conn.rst @@ -9,10 +9,10 @@ initiated with client-side field level encryption enabled, either: following Key Management Service (KMS) providers for Customer Master Key (CMK) management: - - :ref:`Amazon Web Services KMS ` - - :ref:`Azure Key Vault ` - - :ref:`Google Cloud Platform KMS ` - - :ref:`Locally Managed Key ` + - :ref:`Amazon Web Services KMS ` + - :ref:`Azure Key Vault ` + - :ref:`Google Cloud Platform KMS ` + - :ref:`Locally Managed Key ` *or* @@ -20,4 +20,4 @@ initiated with client-side field level encryption enabled, either: ` to establish a connection with the required options. The command line options only support the :ref:`Amazon Web Services KMS - ` provider for CMK management. + ` provider for CMK management. diff --git a/source/includes/csfle-warning-local-keys.rst b/source/includes/csfle-warning-local-keys.rst deleted file mode 100644 index d04c871cacd..00000000000 --- a/source/includes/csfle-warning-local-keys.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. warning:: Do Not Use the Local Key Provider in Production - - The Local Key Provider is an insecure method of storage and is - **not recommended** for production. Instead, - you should store your {+cmk-long+}s in a remote - :wikipedia:`{+kms-long+} ` - (KMS). - - To learn how to use a remote KMS in your {+csfle-abbrev+} implementation, - see the :ref:`` guide. diff --git a/source/includes/extracts-client-side-field-level-encryption.yaml b/source/includes/extracts-client-side-field-level-encryption.yaml index 7e31ac3b0ac..b07f9d9e0ca 100644 --- a/source/includes/extracts-client-side-field-level-encryption.yaml +++ b/source/includes/extracts-client-side-field-level-encryption.yaml @@ -12,10 +12,10 @@ content: | following Key Management Service (KMS) providers for Customer Master Key (CMK) management: - - :ref:`Amazon Web Services KMS ` - - :ref:`Azure Key Vault ` - - :ref:`Google Cloud Platform KMS ` - - :ref:`Locally Managed Key ` + - :ref:`Amazon Web Services KMS ` + - :ref:`Azure Key Vault ` + - :ref:`Google Cloud Platform KMS ` + - :ref:`Locally Managed Key ` *or* @@ -23,7 +23,7 @@ content: | ` to establish a connection with the required options. The command line options only support the :ref:`Amazon Web Services KMS - ` provider for CMK management. + ` provider for CMK management. --- ref: csfle-keyvault-unique-index content: | diff --git a/source/includes/fact-csfle-compatibility-drivers.rst b/source/includes/fact-csfle-compatibility-drivers.rst deleted file mode 100644 index 15a91943d86..00000000000 --- a/source/includes/fact-csfle-compatibility-drivers.rst +++ /dev/null @@ -1,35 +0,0 @@ -While {+csfle+} does not support encrypting -individual array elements, randomized encryption supports encrypting the -*entire* array field rather than individual elements in the field. The -example automatic encryption rules specify randomized encryption for the -``medicalRecords`` field to encrypt the entire array. If the automatic -encryption rules specified :autoencryptkeyword:`encrypt` or -:autoencryptkeyword:`encryptMetadata` within ``medicalRecords.items`` or -``medicalRecords.additionalItems``, automatic field level encryption -fails and returns an errors. - -The official MongoDB 4.2+ compatible drivers, :binary:`~bin.mongosh`, -and the 4.2 or later legacy ``mongo`` shell require specifying the -automatic encryption rules as part of creating the database connection -object: - -- For ``mongosh``, use the :method:`Mongo()` - constructor to create a database connection. Specify the automatic - encryption rules to the ``schemaMap`` key of the - :ref:`<{+auto-encrypt-options+}>` parameter. See - :ref:`mongo-connection-automatic-client-side-encryption-enabled` - for a complete example. - -- For the official MongoDB 4.2+ compatible drivers, use the - driver-specific database connection constructor (``MongoClient``) - to create the database connection with the automatic encryption rules - included as part of the {+csfle+} - configuration object. Defer to the :ref:`driver API reference - ` for more complete documentation and - tutorials. - -For all clients, the ``keyVault`` and ``kmsProviders`` specified -to the {+csfle+} parameter *must* grant -access to both the {+dek-long+}s specified in the automatic -encryption rules *and* the {+cmk-long+} used to encrypt the -{+dek-long+}s. diff --git a/source/includes/fact-manual-enc-definition.rst b/source/includes/fact-manual-enc-definition.rst deleted file mode 100644 index 6abcf69a624..00000000000 --- a/source/includes/fact-manual-enc-definition.rst +++ /dev/null @@ -1,3 +0,0 @@ -{+manual-enc-first+} is a mechanism in which you specify how to encrypt -and decrypt fields in your document for each operation you perform on -your database. \ No newline at end of file diff --git a/source/includes/in-use-encryption/admonition-csfle-key-rotation.txt b/source/includes/in-use-encryption/admonition-csfle-key-rotation.txt index aadfd26e3e2..8936e6dc07a 100644 --- a/source/includes/in-use-encryption/admonition-csfle-key-rotation.txt +++ b/source/includes/in-use-encryption/admonition-csfle-key-rotation.txt @@ -1,4 +1,4 @@ .. important:: Key Rotation Support To view your driver's dependencies for the key rotation API, see - :ref:`Compatibility `. + :ref:`Compatibility `. diff --git a/source/includes/queryable-encryption/csfle-driver-tutorial-table.rst b/source/includes/queryable-encryption/csfle-driver-tutorial-table.rst new file mode 100644 index 00000000000..72d4131dc9b --- /dev/null +++ b/source/includes/queryable-encryption/csfle-driver-tutorial-table.rst @@ -0,0 +1,41 @@ +.. list-table:: + :widths: 30 70 + :header-rows: 1 + + * - Driver + - Quickstarts / Tutorials + + * - :driver:`Node.js ` + - | `Node.js Quickstart `__ + | :driver:`Client-Side Field Level Encryption Guide ` + + * - :driver:`Java ` + - | `Java Driver Quickstart `__ + | `Java Async Driver Quickstart `__ + | :driver:`Client-Side Field Level Encryption Guide ` + + * - `Java Reactive Streams `__ + - `Java RS Documentation `__ + + * - :driver:`Python (PyMongo) ` + - | `Python Driver Quickstart `__ + | :driver:`Client-Side Field Level Encryption Guide ` + + * - :driver:`C#/.NET ` + - `.NET Driver Quickstart `__ + + * - :driver:`C ` + - `C Driver Client-Side Field Level Encryption `__ + + * - :driver:`Go ` + - `Go Driver Quickstart `__ + + * - :driver:`Scala ` + - `Scala Documentation `__ + + * - :driver:`PHP ` + - `PHP Driver Quickstart `__ + + * - `Ruby `__ + - `Ruby Driver Quickstart + `__ \ No newline at end of file diff --git a/source/includes/example-qe-csfle-contention.rst b/source/includes/queryable-encryption/example-qe-csfle-contention.rst similarity index 65% rename from source/includes/example-qe-csfle-contention.rst rename to source/includes/queryable-encryption/example-qe-csfle-contention.rst index 1d7a90f48ea..59e66acc01a 100644 --- a/source/includes/example-qe-csfle-contention.rst +++ b/source/includes/queryable-encryption/example-qe-csfle-contention.rst @@ -1,8 +1,6 @@ -The Social Security Number (SSN) and patient identifier fields are high -:term:`cardinality` fields that contain unique values in a data set. For -high cardinality fields, you can set ``contention`` to a low value. The -following example sets ``contention`` to ``0`` for the ``patientId`` and -``patientInfo.ssn`` fields: +The example below sets ``contention`` to 0 for the low cardinality +Social Security Number (SSN) and patient ID fields, since these are +unique identifiers that shouldn't repeat in the data set. .. code-block:: javascript :emphasize-lines: 7,13 @@ -21,7 +19,14 @@ following example sets ``contention`` to ``0`` for the ``patientId`` and queries: { queryType: "equality", contention: "0"} }, - ... + { + path: "medications", + bsonType: "array" + }, + { + path: "patientInfo.billing", + bsonType: "object" + } ] } @@ -33,4 +38,4 @@ following example sets ``contention`` to ``0`` for the ``patientId`` and .. - DOB between 1930-1990 (unencrypted, ~22K values) .. - gender (encrypted, Male/Female/Non-binary) .. - creditCard.type (encrypted, 4 types) -.. - creditCard.expiry (encrypted, ~84 possible values) +.. - creditCard.expiry (encrypted, ~84 possible values) \ No newline at end of file diff --git a/source/includes/queryable-encryption/fact-csfle-compatibility-drivers.rst b/source/includes/queryable-encryption/fact-csfle-compatibility-drivers.rst index 0377f4d7bb5..cb242f5fa57 100644 --- a/source/includes/queryable-encryption/fact-csfle-compatibility-drivers.rst +++ b/source/includes/queryable-encryption/fact-csfle-compatibility-drivers.rst @@ -25,7 +25,7 @@ object: to create the database connection with the automatic encryption rules included as part of the {+qe+} configuration object. Defer to the :ref:`driver API reference - ` for more complete documentation and + ` for more complete documentation and tutorials. For all clients, the ``keyVault`` and ``kmsProviders`` specified diff --git a/source/includes/queryable-encryption/qe-csfle-configure-mongocryptd.rst b/source/includes/queryable-encryption/qe-csfle-configure-mongocryptd.rst index 6c57be60b73..398bb60c7b3 100644 --- a/source/includes/queryable-encryption/qe-csfle-configure-mongocryptd.rst +++ b/source/includes/queryable-encryption/qe-csfle-configure-mongocryptd.rst @@ -1,13 +1,10 @@ If the driver has access to the ``mongocryptd`` process, it spawns the process by default. -.. note:: mongocryptd Port In Use +.. important:: Start on Boot - If a ``mongocryptd`` process is already running on the port specified - by the driver, the driver may log a warning and continue without - spawning a new process. Any settings specified by the driver only - apply once the existing process exits and a new encrypted client - attempts to connect. + If possible, start ``mongocryptd`` on boot, rather than launching it + on demand. Configure how the driver starts ``mongocryptd`` through the following parameters: @@ -22,27 +19,28 @@ following parameters: * - port - | The port from which ``mongocryptd`` listens for messages. - | **Default**: ``27020`` + | *Default*: ``27020`` * - idleShutdownTimeoutSecs - | Number of idle seconds the ``mongocryptd`` process waits before exiting. - | **Default**: ``60`` + | *Default*: ``60`` * - mongocryptdURI - | The URI on which to run the ``mongocryptd`` process. - | **Default**: ``"mongodb://localhost:27020"`` + | *Default*: ``"mongodb://localhost:27020"`` * - mongocryptdBypassSpawn - | When ``true``, prevents the driver from automatically spawning ``mongocryptd``. - | **Default**: ``false`` + | *Default*: ``false`` * - mongocryptdSpawnPath - | The full path to ``mongocryptd``. - | **Default**: Defaults to empty string and spawns from the system path. - -.. important:: Start on Boot - - If possible, start ``mongocryptd`` on boot, rather than launching it - on demand. \ No newline at end of file + | *Default*: Defaults to empty string and spawns from the system + path. + +If a ``mongocryptd`` process is already running on the port specified by +the driver, the driver may log a warning and continue without spawning a +new process. Any settings specified by the driver only apply once the +existing process exits and a new encrypted client attempts to connect. \ No newline at end of file diff --git a/source/includes/queryable-encryption/qe-csfle-contention.rst b/source/includes/queryable-encryption/qe-csfle-contention.rst index 04f71c76c76..5c019e12ccf 100644 --- a/source/includes/queryable-encryption/qe-csfle-contention.rst +++ b/source/includes/queryable-encryption/qe-csfle-contention.rst @@ -25,6 +25,9 @@ Consider increasing ``contention`` above the default value of 8 only if: update operations, the benefit of a high contention factor for a rarely updated field is unlikely to outweigh the drawback. +Some other examples of low cardinality fields are credit card types, +gender, and ethnicity. + Consider decreasing ``contention`` if: - The field is high cardinality and contains entirely unique values, @@ -32,3 +35,6 @@ Consider decreasing ``contention`` if: - The field is often queried, but never or rarely updated. In this case, find performance is preferable to write and update performance. + +Some other examples of high cardinality fields are mobile phone numbers, +social security numbers, full names, and addresses. \ No newline at end of file diff --git a/source/includes/queryable-encryption/qe-csfle-install-mongocryptd.rst b/source/includes/queryable-encryption/qe-csfle-install-mongocryptd.rst index 67a6a909843..775414636d3 100644 --- a/source/includes/queryable-encryption/qe-csfle-install-mongocryptd.rst +++ b/source/includes/queryable-encryption/qe-csfle-install-mongocryptd.rst @@ -1,23 +1,24 @@ -For supported Linux Operating Systems, install the Server package by following the -:ref:`install on Linux tutorial ` -, follow the documented installation instructions and install the +**For supported Linux Operating Systems:** +To install the Server package, follow the :ref:`install on Linux +tutorial ` and install the ``mongodb-enterprise`` server package. Alternatively, specify ``mongodb-enterprise-cryptd`` instead to install only the ``mongocryptd`` binary. The package manager installs -the binaries to a location in the system PATH (e.g. ``/usr/bin/``) +the binaries to a location in the system PATH. -For OSX, install the Server package by following the -:ref:`install on MacOS tutorial `. -The package manager installs binaries to a location in the system -PATH. +**For OSX:** +To install the Server package, follow the :ref:`install on MacOS +tutorial `. The package manager installs +binaries to a location in the system PATH. -For Windows, install the Server package by following the -:ref:`install on Windows tutorial `. -You must add the ``mongocryptd`` package to your system PATH after -installation. Defer to documented best practices for your Windows -installation for instructions on adding the ``mongocryptd`` binary to -the system PATH. +**For Windows:** +To install the Server package, follow the :ref:`install on Windows +tutorial `. You must add the ``mongocryptd`` +package to your system PATH after installation. Follow the documented +best practices for your Windows installation to add the ``mongocryptd`` +binary to the system PATH. -For installations via an official tarball or ZIP archive, -follow the documented best practices for your operating system to add -the ``mongocryptd`` binary to your system PATH. \ No newline at end of file +**To install from an official tarball / ZIP archive:** +To install from an official archive, follow the documented best +practices for your operating system to add the ``mongocryptd`` binary +to your system PATH. \ No newline at end of file diff --git a/source/includes/queryable-encryption/qe-csfle-manual-enc-overview.rst b/source/includes/queryable-encryption/qe-csfle-manual-enc-overview.rst new file mode 100644 index 00000000000..58eb46818d7 --- /dev/null +++ b/source/includes/queryable-encryption/qe-csfle-manual-enc-overview.rst @@ -0,0 +1,5 @@ +{+manual-enc-first+} provides fine-grained control over security, at +the cost of increased complexity when configuring collections and +writing code for MongoDB Drivers. With {+manual-enc+}, you specify how +to encrypt fields in your document for each operation you +perform on the database, and you include this logic throughout your application. diff --git a/source/includes/queryable-encryption/qe-csfle-warning-local-keys.rst b/source/includes/queryable-encryption/qe-csfle-warning-local-keys.rst new file mode 100644 index 00000000000..c3e1ed32ba1 --- /dev/null +++ b/source/includes/queryable-encryption/qe-csfle-warning-local-keys.rst @@ -0,0 +1,13 @@ +.. warning:: Do Not Use a Local Key File in Production + + A local key file in your filesystem is insecure and is + **not recommended** for production. Instead, + you should store your {+cmk-long+}s in a remote + :wikipedia:`{+kms-long+} ` + ({+kms-abbr+}). + + To learn how to use a remote {+kms-abbr+} in your + {+in-use-encryption+} enabled application, + see the :ref:`{+qe+} Automatic Encryption Tutorial + ` or :ref:`{+csfle-abbrev+} + Automatic Encryption Tutorial `. \ No newline at end of file diff --git a/source/includes/queryable-encryption/qe-enable-qe-at-collection-creation.rst b/source/includes/queryable-encryption/qe-enable-qe-at-collection-creation.rst new file mode 100644 index 00000000000..f5b8048cb9f --- /dev/null +++ b/source/includes/queryable-encryption/qe-enable-qe-at-collection-creation.rst @@ -0,0 +1,4 @@ +Enable {+qe+} at collection creation. You can't encrypt fields on +documents that are already in a collection. If you have existing data +that needs encryption, consider explicitly creating a new collection and +then using the :pipeline:`$out` aggregation stage to move documents into it. \ No newline at end of file diff --git a/source/includes/queryable-encryption/qe-explicitly-create-collection.rst b/source/includes/queryable-encryption/qe-explicitly-create-collection.rst new file mode 100644 index 00000000000..97d2eab6819 --- /dev/null +++ b/source/includes/queryable-encryption/qe-explicitly-create-collection.rst @@ -0,0 +1,7 @@ +.. important:: + + Explicitly create your collection, rather than creating it implicitly + with an insert operation. When you create a collection using + ``createCollection()``, MongoDB creates an index on the encrypted + fields. Without this index, queries on encrypted fields may run + slowly. \ No newline at end of file diff --git a/source/includes/queryable-encryption/qe-facts-mongocryptd-process.rst b/source/includes/queryable-encryption/qe-facts-mongocryptd-process.rst index 59eba9e9d9d..47f763b91dc 100644 --- a/source/includes/queryable-encryption/qe-facts-mongocryptd-process.rst +++ b/source/includes/queryable-encryption/qe-facts-mongocryptd-process.rst @@ -12,11 +12,14 @@ The ``mongocryptd`` process: :query:`document validation <$jsonSchema>` syntax, ``mongocryptd`` returns an error. -``mongocryptd`` only performs the previous functions, and doesn't perform any of the following: +``mongocryptd`` only performs the previous functions, and doesn't +perform any of the following: - ``mongocryptd`` doesn't perform encryption or decryption - ``mongocryptd`` doesn't access any encryption key material - ``mongocryptd`` doesn't listen over the network -To perform client-side field level encryption and automatic decryption, Drivers use the Apache-licensed `libmongocrypt -`__ library \ No newline at end of file +To perform field encryption and automatic decryption, the drivers use +the Apache-licensed `libmongocrypt +`__ +library. \ No newline at end of file diff --git a/source/includes/queryable-encryption/reference/kms-providers/aws.rst b/source/includes/queryable-encryption/reference/kms-providers/aws.rst index 1af611ae961..8f8b52c63be 100644 --- a/source/includes/queryable-encryption/reference/kms-providers/aws.rst +++ b/source/includes/queryable-encryption/reference/kms-providers/aws.rst @@ -1,4 +1,4 @@ -.. _qe-reference-kms-providers-aws-architecture: +.. _qe-fundamentals-kms-providers-aws-architecture: Architecture ```````````` diff --git a/source/includes/queryable-encryption/reference/kms-providers/azure.rst b/source/includes/queryable-encryption/reference/kms-providers/azure.rst index c346e873cca..1327fb2a518 100644 --- a/source/includes/queryable-encryption/reference/kms-providers/azure.rst +++ b/source/includes/queryable-encryption/reference/kms-providers/azure.rst @@ -1,4 +1,4 @@ -.. _qe-reference-kms-providers-azure-architecture: +.. _qe-fundamentals-kms-providers-azure-architecture: Architecture ```````````` diff --git a/source/includes/queryable-encryption/reference/kms-providers/gcp.rst b/source/includes/queryable-encryption/reference/kms-providers/gcp.rst index e54b66633c4..580a5a929bc 100644 --- a/source/includes/queryable-encryption/reference/kms-providers/gcp.rst +++ b/source/includes/queryable-encryption/reference/kms-providers/gcp.rst @@ -1,4 +1,4 @@ -.. _qe-reference-kms-providers-gcp-architecture: +.. _qe-fundamentals-kms-providers-gcp-architecture: Architecture ```````````` diff --git a/source/includes/queryable-encryption/reference/kms-providers/kmip.rst b/source/includes/queryable-encryption/reference/kms-providers/kmip.rst index 8a791aadd3a..941faa90839 100644 --- a/source/includes/queryable-encryption/reference/kms-providers/kmip.rst +++ b/source/includes/queryable-encryption/reference/kms-providers/kmip.rst @@ -38,7 +38,7 @@ object for a KMIP compliant {+kms-long+}: - Yes - Specifies a hostname and port number for the authentication server. -.. _qe-reference-kms-providers-kmip-datakeyopts: +.. _qe-fundamentals-kms-providers-kmip-datakeyopts: dataKeyOpts Object `````````````````` diff --git a/source/includes/queryable-encryption/set-up/csharp.rst b/source/includes/queryable-encryption/set-up/csharp.rst deleted file mode 100644 index a85c289b444..00000000000 --- a/source/includes/queryable-encryption/set-up/csharp.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. list-table:: - :header-rows: 1 - :widths: 30 70 - - * - Dependency Name - - Description - - * - x64 Support - - {+qe+} requires x64 support. diff --git a/source/includes/queryable-encryption/set-up/go.rst b/source/includes/queryable-encryption/set-up/go.rst deleted file mode 100644 index 65a3a2b3653..00000000000 --- a/source/includes/queryable-encryption/set-up/go.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. list-table:: - :header-rows: 1 - :widths: 30 70 - - * - Dependency Name - - Description - - * - :ref:`qe-reference-libmongocrypt` - - The ``libmongocrypt`` library contains bindings to communicate - with the native library that manages the encryption. diff --git a/source/includes/queryable-encryption/set-up/java.rst b/source/includes/queryable-encryption/set-up/java.rst deleted file mode 100644 index 9187fb26e99..00000000000 --- a/source/includes/queryable-encryption/set-up/java.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. list-table:: - :header-rows: 1 - :widths: 30 70 - - * - Dependency Name - - Description - - * - `mongodb-crypt `__ - - The ``mongodb-crypt`` library contains bindings to communicate - with the native library that manages the encryption. diff --git a/source/includes/queryable-encryption/set-up/node.rst b/source/includes/queryable-encryption/set-up/node.rst deleted file mode 100644 index c02b42bde64..00000000000 --- a/source/includes/queryable-encryption/set-up/node.rst +++ /dev/null @@ -1,17 +0,0 @@ -.. list-table:: - :header-rows: 1 - :widths: 30 70 - - * - Dependency Name - - Description - - * - `mongodb-client-encryption - `_ - - - NodeJS wrapper for the ``libmongocrypt`` encryption library. - The ``libmongocrypt`` library contains bindings to communicate - with the native library that manages the encryption. - - .. note:: - - .. include:: /includes/in-use-encryption/node-mongodb-client-encryption-note.rst diff --git a/source/includes/queryable-encryption/set-up/python.rst b/source/includes/queryable-encryption/set-up/python.rst deleted file mode 100644 index 73c97deb2da..00000000000 --- a/source/includes/queryable-encryption/set-up/python.rst +++ /dev/null @@ -1,12 +0,0 @@ -.. list-table:: - :header-rows: 1 - :widths: 30 70 - - * - Dependency Name - - Description - - * - `pymongocrypt - `_ - - Python wrapper for the ``libmongocrypt`` encryption library. - The ``libmongocrypt`` library contains bindings to communicate - with the native library that manages the encryption. \ No newline at end of file diff --git a/source/includes/queryable-encryption/tutorials/assign-app-variables.rst b/source/includes/queryable-encryption/tutorials/assign-app-variables.rst new file mode 100644 index 00000000000..ff4d99b15c3 --- /dev/null +++ b/source/includes/queryable-encryption/tutorials/assign-app-variables.rst @@ -0,0 +1,192 @@ +The code samples in this tutorial use the following variables to perform +the {+qe+} workflow: + +.. tabs-drivers:: + + .. tab:: + :tabid: shell + + - **kmsProviderName** - The KMS you use to store your + {+cmk-long+}. Set this to your key provider: ``"aws"``, + ``"azure"``, ``"gcp"``, or ``"kmip"``. + - **uri** - Your MongoDB deployment connection URI. Set your + connection URI in the ``MONGODB_URI`` environment variable or + replace the value directly. + - **keyVaultDatabaseName** - The MongoDB database where your + data encryption keys (DEKs) will be stored. Set this to ``"encryption"``. + - **keyVaultCollectionName** - The collection in MongoDB where + your DEKs will be stored. Set this to ``"__keyVault"``. + - **keyVaultNamespace** - The namespace in MongoDB where your DEKs + will be stored. Set this to the values of the + ``keyVaultDatabaseName`` and ``keyVaultCollectionName`` + variables, separated by a period. + - **encryptedDatabaseName** - The MongoDB database where your + encrypted data will be stored. Set this to ``"medicalRecords"``. + - **encryptedCollectionName** - The collection in MongoDB where + your encrypted data will be stored. Set this to ``"patients"``. + + You can declare these variables by using the following code: + + .. literalinclude:: /includes/qe-tutorials/mongosh/queryable-encryption-tutorial.js + :start-after: start-setup-application-variables + :end-before: end-setup-application-variables + :language: javascript + :dedent: + + .. tab:: + :tabid: nodejs + + - **kmsProviderName** - The KMS you use to store your + {+cmk-long+}. Set this to your key provider: ``"aws"``, + ``"azure"``, ``"gcp"``, or ``"kmip"``. + - **uri** - Your MongoDB deployment connection URI. Set your connection + URI in the ``MONGODB_URI`` environment variable or replace the value + directly. + - **keyVaultDatabaseName** - The MongoDB database where your data + encryption keys (DEKs) will be stored. Set this to ``"encryption"``. + - **keyVaultCollectionName** - The collection in MongoDB where your DEKs + will be stored. Set this to ``"__keyVault"``. + - **keyVaultNamespace** - The namespace in MongoDB where your DEKs + will be stored. Set this to the values of the ``keyVaultDatabaseName`` + and ``keyVaultCollectionName`` variables, separated by a period. + - **encryptedDatabaseName** - The MongoDB database where your encrypted + data will be stored. Set this to ``"medicalRecords"``. + - **encryptedCollectionName** - The collection in MongoDB where your encrypted + data will be stored. Set this to ``"patients"``. + + You can declare these variables by using the following code: + + .. literalinclude:: /includes/qe-tutorials/node/queryable-encryption-tutorial.js + :start-after: start-setup-application-variables + :end-before: end-setup-application-variables + :language: javascript + :dedent: + + .. tab:: + :tabid: python + + - **kms_provider_name** - The KMS you use to store your + {+cmk-long+}. Set this to your key provider: ``"aws"``, + ``"azure"``, ``"gcp"``, or ``"kmip"``. + - **uri** - Your MongoDB deployment connection URI. Set your connection + URI in the ``MONGODB_URI`` environment variable or replace the value + directly. + - **key_vault_database_name** - The MongoDB database where your data + encryption keys (DEKs) will be stored. Set this to ``"encryption"``. + - **key_vault_collection_name** - The collection in MongoDB where your DEKs + will be stored. Set this to ``"__keyVault"``. + - **key_vault_namespace** - The namespace in MongoDB where your DEKs + will be stored. Set this to the values of the ``key_vault_database_name`` + and ``key_vault_collection_name`` variables, separated by a period. + - **encrypted_database_name** - The MongoDB database where your encrypted + data will be stored. Set this to ``"medicalRecords"``. + - **encrypted_collection_name** - The collection in MongoDB where + your encrypted data will be stored. Set this to ``"patients"``. + + You can declare these variables by using the following code: + + .. literalinclude:: /includes/qe-tutorials/python/queryable_encryption_tutorial.py + :start-after: start-setup-application-variables + :end-before: end-setup-application-variables + :language: python + :dedent: + + .. tab:: + :tabid: java-sync + + - **kmsProviderName** - The KMS you use to store your + {+cmk-long+}. Set this to your key provider: ``"aws"``, + ``"azure"``, ``"gcp"``, or ``"kmip"``. + - **uri** - Your MongoDB deployment connection URI. Set your connection + URI in the ``MONGODB_URI`` environment variable or replace the value + directly. + - **keyVaultDatabaseName** - The MongoDB database where your data + encryption keys (DEKs) will be stored. Set this to ``"encryption"``. + - **keyVaultCollectionName** - The collection in MongoDB where your DEKs + will be stored. Set this to ``"__keyVault"``. + - **keyVaultNamespace** - The namespace in MongoDB where your DEKs + will be stored. Set this to the values of the ``keyVaultDatabaseName`` + and ``keyVaultCollectionName`` variables, separated by a period. + - **encryptedDatabaseName** - The MongoDB database where your encrypted + data will be stored. Set this to ``"medicalRecords"``. + - **encryptedCollectionName** - The collection in MongoDB where your encrypted + data will be stored. Set this to ``"patients"``. + + You can declare these variables by using the following code: + + .. literalinclude:: /includes/qe-tutorials/java/src/main/java/com/mongodb/tutorials/qe/QueryableEncryptionTutorial.java + :start-after: start-setup-application-variables + :end-before: end-setup-application-variables + :language: java + :dedent: + + .. tab:: + :tabid: go + + - **kmsProviderName** - The KMS you use to store your + {+cmk-long+}. Set this to your key provider: ``"aws"``, + ``"azure"``, ``"gcp"``, or ``"kmip"``. + - **uri** - Your MongoDB deployment connection URI. Set your connection + URI in the ``MONGODB_URI`` environment variable or replace the value + directly. + - **keyVaultDatabaseName** - The MongoDB database where your data + encryption keys (DEKs) will be stored. Set this to ``"encryption"``. + - **keyVaultCollectionName** - The collection in MongoDB where your DEKs + will be stored. Set this to ``"__keyVault"``. + - **keyVaultNamespace** - The namespace in MongoDB where your DEKs + will be stored. Set this to the values of the + ``keyVaultDatabaseName`` and ``keyVaultCollectionName`` + variables, separated by a period. + - **encryptedDatabaseName** - The MongoDB database where your encrypted + data will be stored. Set this to ``"medicalRecords"``. + - **encryptedCollectionName** - The collection in MongoDB where your encrypted + data will be stored. Set this to ``"patients"``. + + You can declare these variables by using the following code: + + .. literalinclude:: /includes/qe-tutorials/go/queryable_encryption_tutorial.go + :start-after: start-setup-application-variables + :end-before: end-setup-application-variables + :language: go + :dedent: + + .. tab:: + :tabid: csharp + + - **kmsProviderName** - The KMS you use to store your + {+cmk-long+}. Set this to your key provider: ``"aws"``, + ``"azure"``, ``"gcp"``, or ``"kmip"``. + - **keyVaultDatabaseName** - The MongoDB database where your data + encryption keys (DEKs) will be stored. Set ``keyVaultDatabaseName`` + to ``"encryption"``. + - **keyVaultCollectionName** - The collection in MongoDB where your DEKs + will be stored. Set ``keyVaultCollectionName`` to ``"__keyVault"``. + - **keyVaultNamespace** - The namespace in MongoDB where your DEKs + will be stored. Set ``keyVaultNamespace`` to a new + ``CollectionNamespace`` object whose name is the values of the + ``keyVaultDatabaseName`` and ``keyVaultCollectionName`` + variables, separated by a period. + - **encryptedDatabaseName** - The MongoDB database where your encrypted + data will be stored. Set ``encryptedDatabaseName`` to ``"medicalRecords"``. + - **encryptedCollectionName** - The collection in MongoDB where your encrypted + data will be stored. Set ``encryptedCollectionName`` to ``"patients"``. + - **uri** - Your MongoDB deployment connection URI. Set your connection + URI in the ``appsettings.json`` file or replace the value + directly. + + You can declare these variables by using the following code: + + .. literalinclude:: /includes/qe-tutorials/csharp/QueryableEncryptionTutorial.cs + :start-after: start-setup-application-variables + :end-before: end-setup-application-variables + :language: csharp + :dedent: + +.. important:: {+key-vault-long-title+} Namespace Permissions + + The {+key-vault-long+} is in the ``encryption.__keyVault`` + namespace. Ensure that the database user your application uses to connect + to MongoDB has :ref:`ReadWrite ` + permissions on this namespace. + +.. include:: /includes/queryable-encryption/env-variables.rst \ No newline at end of file diff --git a/source/includes/queryable-encryption/tutorials/automatic/aws/dek.rst b/source/includes/queryable-encryption/tutorials/automatic/aws/dek.rst index f969d60a6b3..fe5dc7018cc 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/aws/dek.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/aws/dek.rst @@ -271,7 +271,7 @@ The output from the code in this section should resemble the following: To view a diagram showing how your client application creates your {+dek-long+} when using an AWS KMS, see - :ref:`qe-reference-kms-providers-aws-architecture`. + :ref:`qe-fundamentals-kms-providers-aws-architecture`. To learn more about the options for creating a {+dek-long+} encrypted with a {+cmk-long+} hosted in AWS KMS, see diff --git a/source/includes/queryable-encryption/tutorials/automatic/azure/dek.rst b/source/includes/queryable-encryption/tutorials/automatic/azure/dek.rst index 63554345681..ecdc3f908cf 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/azure/dek.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/azure/dek.rst @@ -266,7 +266,7 @@ To view a diagram showing how your client application creates your {+dek-long+} when using an {+azure-kv+}, see - :ref:`qe-reference-kms-providers-azure-architecture`. + :ref:`qe-fundamentals-kms-providers-azure-architecture`. To learn more about the options for creating a {+dek-long+} encrypted with a {+cmk-long+} hosted in {+azure-kv+}, see diff --git a/source/includes/queryable-encryption/tutorials/automatic/gcp/dek.rst b/source/includes/queryable-encryption/tutorials/automatic/gcp/dek.rst index 623359854c7..defc6be4cab 100644 --- a/source/includes/queryable-encryption/tutorials/automatic/gcp/dek.rst +++ b/source/includes/queryable-encryption/tutorials/automatic/gcp/dek.rst @@ -284,7 +284,7 @@ The output from the code in this section should resemble the following: To view a diagram showing how your client application creates your {+dek-long+} when using an {+gcp-kms+}, see - :ref:`qe-reference-kms-providers-gcp-architecture`. + :ref:`qe-fundamentals-kms-providers-gcp-architecture`. To learn more about the options for creating a {+dek-long+} encrypted with a {+cmk-long+} hosted in {+azure-kv+}, see diff --git a/source/includes/quick-start/cmk.rst b/source/includes/quick-start/cmk.rst index 00f62cb2c0e..76b00aa51f9 100644 --- a/source/includes/quick-start/cmk.rst +++ b/source/includes/quick-start/cmk.rst @@ -54,6 +54,6 @@ as the file ``master-key.txt``: :language: csharp :dedent: -.. include:: /includes/csfle-warning-local-keys.rst +.. include:: /includes/queryable-encryption/qe-warning-local-keys.rst .. include:: /includes/in-use-encryption/cmk-bash.rst diff --git a/source/includes/reference/kms-providers/aws.rst b/source/includes/reference/kms-providers/aws.rst deleted file mode 100644 index fe4776879ca..00000000000 --- a/source/includes/reference/kms-providers/aws.rst +++ /dev/null @@ -1,75 +0,0 @@ -.. _csfle-reference-kms-providers-aws-architecture: - -Architecture -```````````` - -The following diagram describes the architecture of a -{+csfle-abbrev+}-enabled application using {+aws-abbr+} KMS. - -.. image:: /images/CSFLE_Data_Key_KMS.png - :alt: Diagram KMS - -.. include:: /includes/reference/kms-providers/cmk-note.rst - -.. _csfle-kms-provider-object-aws: - -kmsProviders Object -``````````````````` - -The following table presents the structure of a ``kmsProviders`` -object for AWS KMS: - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 25 15 15 45 - - * - Field - - Required for IAM User - - Required for IAM Role - - Description - - * - Access Key ID - - Yes - - Yes - - Identifies the account user. - - * - Secret Access Key - - Yes - - Yes - - Contains the authentication credentials of the account user. - - * - Session Token - - No - - Yes - - Contains a token obtained from AWS Security Token Service (STS). - -.. _csfle-kms-datakeyopts-aws: - -dataKeyOpts Object -`````````````````` - -The following table presents the structure of a ``dataKeyOpts`` -object for AWS KMS: - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 30 15 45 - - * - Field - - Required - - Description - - * - key - - Yes - - `Amazon Resource Number (ARN) `__ - of the master key. - - * - region - - No - - AWS region of your master key, e.g. "us-west-2"; required only if not specified in your ARN. - - * - endpoint - - No - - Custom hostname for the AWS endpoint if configured for your account. diff --git a/source/includes/reference/kms-providers/azure.rst b/source/includes/reference/kms-providers/azure.rst deleted file mode 100644 index faabb480abb..00000000000 --- a/source/includes/reference/kms-providers/azure.rst +++ /dev/null @@ -1,78 +0,0 @@ -.. _csfle-reference-kms-providers-azure-architecture: - -Architecture -```````````` - -The following diagram describes the architecture of a -{+csfle-abbrev+}-enabled application using Azure Key Vault. - -.. image:: /images/CSFLE_Data_Key_KMS.png - :alt: Diagram KMS - -.. include:: /includes/reference/kms-providers/cmk-note.rst - -.. _csfle-kms-provider-object-azure: - -kmsProviders Object -``````````````````` - -The following table presents the structure of a ``kmsProviders`` -object for Azure Key Vault: - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 30 15 45 - - * - Field - - Required - - Description - - * - azure.tenantId - - Yes - - Identifies the organization of the account. - - * - azure.clientId - - Yes - - Identifies the clientId to authenticate your registered application. - - * - azure.clientSecret - - Yes - - Used to authenticate your registered application. - - * - azure.identityPlatformEndpoint - - No - - Specifies a hostname and port number for the authentication server. - Defaults to login.microsoftonline.com and is only needed for - non-commercial Azure instances such as a government or China account. - -.. _csfle-kms-datakeyopts-azure: - -dataKeyOpts Object -`````````````````` - -The following table presents the structure of a ``dataKeyOpts`` object for -Azure Key Vault: - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 30 15 45 - - * - Field - - Required - - Description - - * - keyName - - Yes - - Name of the master key - - * - keyVersion - - No, but strongly recommended - - Version of the master key - - * - keyVaultEndpoint - - Yes - - URL of the key vault. E.g. myVaultName.vault.azure.net - -.. include:: /includes/queryable-encryption/qe-csfle-warning-azure-keyversion.rst diff --git a/source/includes/reference/kms-providers/cmk-note.rst b/source/includes/reference/kms-providers/cmk-note.rst deleted file mode 100644 index 991df9e6350..00000000000 --- a/source/includes/reference/kms-providers/cmk-note.rst +++ /dev/null @@ -1,5 +0,0 @@ -.. note:: Client Can't Access {+cmk-long+} - - When using the preceding {+kms-long+}, your - {+csfle-abbrev+}-enabled application does not have access to - your {+cmk-long+}. diff --git a/source/includes/reference/kms-providers/gcp.rst b/source/includes/reference/kms-providers/gcp.rst deleted file mode 100644 index f7d5c62330c..00000000000 --- a/source/includes/reference/kms-providers/gcp.rst +++ /dev/null @@ -1,111 +0,0 @@ -.. _csfle-reference-kms-providers-gcp-architecture: - -Architecture -```````````` - -The following diagram describes the architecture of a -{+csfle-abbrev+}-enabled application using GCP KMS. - -.. image:: /images/CSFLE_Data_Key_KMS.png - :alt: Diagram KMS - -.. include:: /includes/reference/kms-providers/cmk-note.rst - -.. _csfle-kms-provider-object-gcp: - -kmsProviders Object -``````````````````` - -The following table presents the structure of a ``kmsProviders`` -object for GCP KMS: - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 20 12 68 - - * - Field - - Required - - Description - - * - email - - Yes - - Identifies your service account email address. - - * - privateKey - - Yes - - | Identifies your service account private key in either - `base64 string `__ or - :manual:`Binary subtype 0 ` - format without the prefix and suffix markers. - | - | Suppose your service account private key value is as follows: - - .. code-block:: none - :copyable: false - - -----BEGIN PRIVATE KEY-----\nyour-private-key\n-----END PRIVATE KEY-----\n - - | The value you would specify for this field is: - - .. code-block:: none - :copyable: false - - your-private-key - - | If you have a ``user-key.json`` credential file, you can extract - the string by executing the following command in a bash or - similar shell. The following command requires that you - install `OpenSSL `__: - - .. code-block:: shell - - cat user-key.json | jq -r .private_key | openssl pkcs8 -topk8 -nocrypt -inform PEM -outform DER | base64 -w 0 - - * - endpoint - - No - - Specifies a hostname and port number for the authentication server. - Defaults to oauth2.googleapis.com. - -.. _csfle-kms-datakeyopts-gcp: - -dataKeyOpts Object -`````````````````` - -The following table presents the structure of a ``dataKeyOpts`` object for -GCP KMS: - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 30 15 45 - - * - Field - - Required - - Description - - * - projectId - - Yes - - Identifier for your project in which you created the key. - - * - location - - Yes - - Region specified for your key. - - * - keyRing - - Yes - - Identifier for the group of keys your key belongs to. - - * - keyName - - Yes - - Identifier for the symmetric master key. - - * - keyVersion - - No - - Specifies the version of the named key. If not specified, the default - version of the key is used. - - * - endpoint - - No - - Specifies the host and optional port of the Cloud KMS. The default - is ``cloudkms.googleapis.com``. diff --git a/source/includes/reference/kms-providers/kmip.rst b/source/includes/reference/kms-providers/kmip.rst deleted file mode 100644 index 37808d7d572..00000000000 --- a/source/includes/reference/kms-providers/kmip.rst +++ /dev/null @@ -1,71 +0,0 @@ -Architecture -```````````` - -The following diagram describes the architecture of a -{+csfle-abbrev+}-enabled application using a {+kmip-kms+}. - -.. image:: /images/CSFLE_Data_Key_KMIP.png - :alt: Diagram - -.. important:: Client Accesses {+cmk-long+} - - When your {+csfle-abbrev+}-enabled application uses - a {+kmip-kms+}, your application - directly accesses your {+cmk-long+}. - -kmsProviders Object -``````````````````` - -The following table presents the structure of a ``kmsProviders`` -object for a {+kmip-kms+}: - -.. note:: Authenticate through TLS/SSL - - Your {+csfle-abbrev+}-enabled application authenticates through - :abbr:`TLS/SSL (Transport Layer Security/Secure Sockets Layer)` - when using KMIP. - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 20 12 68 - - * - Field - - Required - - Description - - * - endpoint - - Yes - - Specifies a hostname and port number for the authentication server. - -.. _csfle-reference-kms-providers-kmip-datakeyopts: - -dataKeyOpts Object -`````````````````` - -The following table presents the structure of a ``dataKeyOpts`` object -for a KMIP compliant {+kms-long+}: - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 30 15 45 - - * - Field - - Required - - Description - - * - keyId - - No - - The ``keyId`` field of a 96 byte - `Secret Data managed object `__ - stored in your {+kmip-kms+}. - - If you do not specify the ``keyId`` field in the ``masterKey`` document - you send to your {+kmip-kms+}, the driver creates a new - 96 Byte Secret Data managed object in your {+kmip-kms+} to act as your - master key. - - * - endpoint - - Yes - - The URI of your {+kmip-kms+}. diff --git a/source/includes/reference/kms-providers/local.rst b/source/includes/reference/kms-providers/local.rst deleted file mode 100644 index cff26f9716e..00000000000 --- a/source/includes/reference/kms-providers/local.rst +++ /dev/null @@ -1,38 +0,0 @@ -Architecture -```````````` - -When you use a Local Key Provider in your {+csfle-abbrev+}-enabled -application, your application retrieves your {+cmk-long+} from -the filesystem of the computer on which your application is running. - -The following diagram describes the architecture of a -{+csfle-abbrev+}-enabled application using a Local Key Provider. - -.. image:: /images/CSFLE_Data_Key_Local.png - :alt: Local Key Provider architecture diagram. - -kmsProviders Object -``````````````````` - -The following table presents the structure of a ``kmsProviders`` -object for a Local Key Provider: - -.. list-table:: - :header-rows: 1 - :stub-columns: 1 - :widths: 30 15 45 - - * - Field - - Required - - Description - - * - key - - Yes - - The master key used to encrypt/decrypt data keys. - The master key is passed as a base64 encoded string. - -dataKeyOpts Object -`````````````````` - -When you use a Local Key Provider, you specify your {+cmk-long+} -through your ``kmsProviders`` object. diff --git a/source/includes/tutorials/automatic/aws/cmk.rst b/source/includes/tutorials/automatic/aws/cmk.rst index 1e2263d22b0..0fd9987d426 100644 --- a/source/includes/tutorials/automatic/aws/cmk.rst +++ b/source/includes/tutorials/automatic/aws/cmk.rst @@ -32,7 +32,7 @@ .. tip:: Learn More To learn more about your {+cmk-long+}s, see - :ref:`csfle-reference-keys-key-vaults`. + :ref:`qe-reference-keys-key-vaults`. To learn more about key policies, see `Key Policies in AWS KMS `__ diff --git a/source/includes/tutorials/automatic/aws/dek.rst b/source/includes/tutorials/automatic/aws/dek.rst index 99181850784..99002ed02a2 100644 --- a/source/includes/tutorials/automatic/aws/dek.rst +++ b/source/includes/tutorials/automatic/aws/dek.rst @@ -172,8 +172,8 @@ To view a diagram showing how your client application creates your {+dek-long+} when using an AWS KMS, see - :ref:`csfle-reference-kms-providers-aws-architecture`. + :ref:`qe-fundamentals-kms-providers-aws-architecture`. To learn more about the options for creating a {+dek-long+} encrypted with a {+cmk-long+} hosted in AWS KMS, see - :ref:`csfle-kms-datakeyopts-aws`. + :ref:`qe-kms-datakeyopts-aws`. diff --git a/source/includes/tutorials/automatic/azure/dek.rst b/source/includes/tutorials/automatic/azure/dek.rst index b91430d599f..f3e3992ddb9 100644 --- a/source/includes/tutorials/automatic/azure/dek.rst +++ b/source/includes/tutorials/automatic/azure/dek.rst @@ -174,9 +174,9 @@ To view a diagram showing how your client application creates your {+dek-long+} when using an {+azure-kv+}, see - :ref:`csfle-reference-kms-providers-azure-architecture`. + :ref:`qe-fundamentals-kms-providers-azure-architecture`. To learn more about the options for creating a {+dek-long+} encrypted with a {+cmk-long+} hosted in {+azure-kv+}, see - :ref:`csfle-kms-provider-object-azure` and - :ref:`csfle-kms-datakeyopts-azure`. + :ref:`qe-kms-provider-object-azure` and + :ref:`qe-kms-datakeyopts-azure`. diff --git a/source/includes/tutorials/automatic/gcp/dek.rst b/source/includes/tutorials/automatic/gcp/dek.rst index f76acc48a3e..cd591cd8fa3 100644 --- a/source/includes/tutorials/automatic/gcp/dek.rst +++ b/source/includes/tutorials/automatic/gcp/dek.rst @@ -181,9 +181,9 @@ To view a diagram showing how your client application creates your {+dek-long+} when using an {+gcp-kms+}, see - :ref:`csfle-reference-kms-providers-gcp-architecture`. + :ref:`qe-fundamentals-kms-providers-gcp-architecture`. To learn more about the options for creating a {+dek-long+} encrypted with a {+cmk-long+} hosted in {+azure-kv+}, see - :ref:`csfle-kms-provider-object-gcp` and - :ref:`csfle-kms-datakeyopts-gcp`. + :ref:`qe-kms-provider-object-gcp` and + :ref:`qe-kms-datakeyopts-gcp`. diff --git a/source/reference/command/create.txt b/source/reference/command/create.txt index 0fc226740a6..b4e4a4bc8ff 100644 --- a/source/reference/command/create.txt +++ b/source/reference/command/create.txt @@ -357,7 +357,7 @@ The ``create`` command has the following fields: * - ``encryptedFields`` - document - - Optional. A document that configures :ref:`Queryable Encryption + - Optional. A document that configures :ref:`{+qe+} ` for the collection being created. .. include:: /includes/fact-encryptedFieldsConfig-intro.rst diff --git a/source/reference/glossary.txt b/source/reference/glossary.txt index 559be28b84a..234638542a5 100644 --- a/source/reference/glossary.txt +++ b/source/reference/glossary.txt @@ -408,6 +408,11 @@ Glossary :term:`primary` on startup and in the event of a failure. See :ref:`replica-set-elections`. + {+enc-schema+} + In :ref:`{+qe+} `, the :ref:`JSON schema ` + that defines which fields are queryable and which query types are + permitted on those fields. + explicit encryption When using :term:`In-Use Encryption`, explicitly specifying the encryption or decryption operation, keyID, and @@ -1375,6 +1380,4 @@ Glossary be in one or more zones. In a balanced cluster, MongoDB directs reads and writes for a zone only to those shards inside that zone. See the :ref:`zone-sharding` manual page for more - information. - - Zones supersede functionality described by :term:`tags ` in MongoDB 3.2. + information. \ No newline at end of file diff --git a/source/reference/method/ClientEncryption.encrypt.txt b/source/reference/method/ClientEncryption.encrypt.txt index 0610e95cc53..796850f2d8b 100644 --- a/source/reference/method/ClientEncryption.encrypt.txt +++ b/source/reference/method/ClientEncryption.encrypt.txt @@ -54,7 +54,7 @@ Syntax that identifies a specific data encryption key. If the data encryption key does not exist in the key vault configured for the database connection, :method:`~ClientEncryption.encrypt()` - returns an error. See :ref:`field-level-encryption-keyvault` + returns an error. See :ref:`qe-reference-key-vault` for more information on key vaults and data encryption keys. * - ``value`` diff --git a/source/reference/method/KeyVault.createKey.txt b/source/reference/method/KeyVault.createKey.txt index fbbed6428e4..b06a06ef1e9 100644 --- a/source/reference/method/KeyVault.createKey.txt +++ b/source/reference/method/KeyVault.createKey.txt @@ -50,29 +50,29 @@ KeyVault.createKey() - *Required* The :ref:`Key Management Service (KMS) - ` to use for retrieving the + ` to use for retrieving the Customer Master Key (CMK). Accepts the following parameters: - ``aws`` for :ref:`Amazon Web Services KMS - `. Requires specifying a + `. Requires specifying a Customer Master Key (CMK) string for ``customerMasterKey``. - ``azure`` for :ref:`Azure Key Vault - `. Requires + `. Requires specifying a Customer Master Key (CMK) document for ``customerMasterKey``. .. versionadded:: 5.0 - ``gcp`` for :ref:`Google Cloud Platform KMS - `. Requires specifying a + `. Requires specifying a Customer Master Key (CMK) document for ``customerMasterKey``. .. versionadded:: 5.0 - ``local`` for a :ref:`locally managed key - `. + `. If the :method:`database connection ` was not configured with the specified KMS, data encryption key @@ -89,13 +89,13 @@ KeyVault.createKey() Provide the CMK as follows depending on your KMS provider: - For the :ref:`Amazon Web Services KMS - `, specify the full + `, specify the full `Amazon Resource Name (ARN) `__ of the master key as a single string. - For the :ref:`Azure Key Vault - ` KMS, specify a + ` KMS, specify a document containing the following key value pairs: - ``keyName`` - The `Azure Key Vault Name @@ -108,7 +108,7 @@ KeyVault.createKey() .. versionadded:: 5.0 - For the :ref:`Google Cloud Platform KMS - `, specify a + `, specify a document containing the following key value pairs: - ``projectId`` - The GCP project name diff --git a/source/reference/method/KeyVault.getKey.txt b/source/reference/method/KeyVault.getKey.txt index 97323ba26aa..52f60776a87 100644 --- a/source/reference/method/KeyVault.getKey.txt +++ b/source/reference/method/KeyVault.getKey.txt @@ -47,7 +47,7 @@ Example ------- The following example uses a :ref:`locally managed KMS -` for the client-side field level +` for the client-side field level encryption configuration. .. include:: /includes/csfle-connection-boilerplate-example.rst diff --git a/source/reference/method/KeyVault.getKeys.txt b/source/reference/method/KeyVault.getKeys.txt index 225c264a11f..e5f268fcd72 100644 --- a/source/reference/method/KeyVault.getKeys.txt +++ b/source/reference/method/KeyVault.getKeys.txt @@ -45,7 +45,7 @@ Example ------- The following example uses a :ref:`locally managed KMS -` for the client-side field level +` for the client-side field level encryption configuration. .. include:: /includes/csfle-connection-boilerplate-example.rst diff --git a/source/reference/method/KeyVault.rewrapManyDataKey.txt b/source/reference/method/KeyVault.rewrapManyDataKey.txt index 02bf22fdb6e..5962948747c 100644 --- a/source/reference/method/KeyVault.rewrapManyDataKey.txt +++ b/source/reference/method/KeyVault.rewrapManyDataKey.txt @@ -18,7 +18,7 @@ KeyVault.rewrapManyDataKey() and re-encrypts them with a new {+cmk-long+} ({+cmk-abbr-no-hover+}). Use this method to rotate the {+cmk-abbr-no-hover+} that encrypts your {+dek-abbr-no-hover+}s. To learn more about {+cmk-abbr-no-hover+}s - and {+dek-abbr-no-hover+}s, see :ref:``. + and {+dek-abbr-no-hover+}s, see :ref:``. You specify a {+cmk-abbr-no-hover+} through the ``masterKey`` parameter. If you do not include a ``masterKey`` argument, the method decrypts diff --git a/source/reference/method/Mongo.txt b/source/reference/method/Mongo.txt index e94bd075c22..4673626dcb6 100644 --- a/source/reference/method/Mongo.txt +++ b/source/reference/method/Mongo.txt @@ -160,7 +160,7 @@ following parameters: - document - *(Required)* The :ref:`Key Management Service (KMS) - ` used by client-side field level + ` used by client-side field level encryption for managing a Customer Master Key (CMK). Client-side field level encryption uses the CMK for encrypting and decrypting data encryption keys. @@ -168,10 +168,10 @@ following parameters: {+csfle+} supports the following KMS providers: - - :ref:`Amazon Web Services KMS ` - - :ref:`Azure Key Vault ` - - :ref:`Google Cloud Platform KMS ` - - :ref:`Locally Managed Key ` + - :ref:`Amazon Web Services KMS ` + - :ref:`Azure Key Vault ` + - :ref:`Google Cloud Platform KMS ` + - :ref:`Locally Managed Key ` If possible, consider defining the credentials provided in ``kmsProviders`` as environment variables, and then passing them diff --git a/source/reference/method/getKeyVault.txt b/source/reference/method/getKeyVault.txt index 6b3a50cc039..276866a7b2f 100644 --- a/source/reference/method/getKeyVault.txt +++ b/source/reference/method/getKeyVault.txt @@ -46,7 +46,7 @@ Requires Configuring Client-Side Field Level Encryption on Database Connection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The following example uses a :ref:`locally managed key -` for the client-side field level +` for the client-side field level encryption configuration. .. include:: /includes/extracts/csfle-requires-enabling-encryption.rst @@ -60,7 +60,7 @@ Example ------- The following example uses a :ref:`locally managed key -` for the client-side field level +` for the client-side field level encryption configuration. .. include:: /includes/csfle-connection-boilerplate-example.rst diff --git a/source/reference/method/js-client-side-field-level-encryption.txt b/source/reference/method/js-client-side-field-level-encryption.txt index 39c28911a9c..9b7e4207b46 100644 --- a/source/reference/method/js-client-side-field-level-encryption.txt +++ b/source/reference/method/js-client-side-field-level-encryption.txt @@ -17,7 +17,7 @@ Client-Side Field Level Encryption Methods The following methods are for :binary:`~bin.mongosh` *only*. For instructions on implementing client-side field level encryption using a MongoDB 4.2+ compatible driver, defer to the -driver documentation. See :ref:`field-level-encryption-drivers` for +driver documentation. See :ref:`csfle-driver-compatibility` for a complete list of 4.2+ compatible drivers with support for client-side field level encryption. diff --git a/source/release-notes/4.2.txt b/source/release-notes/4.2.txt index af57018f96a..805b03813ce 100644 --- a/source/release-notes/4.2.txt +++ b/source/release-notes/4.2.txt @@ -832,7 +832,7 @@ The following drivers are feature compatible [#fle]_ with MongoDB 4.2: For a complete list of official 4.2+ compatible drivers with support for Client-Side Field Level Encryption, see - :ref:`field-level-encryption-drivers`. + :ref:`csfle-driver-compatibility`. Retryable Reads ~~~~~~~~~~~~~~~ @@ -1052,7 +1052,7 @@ Client-Side Field Level Encryption ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The official :ref:`MongoDB 4.2+ compatible drivers -` provide a client-side field level +` provide a client-side field level encryption framework. Applications can encrypt fields in documents *prior* to transmitting data over the wire to the server. Only applications with access to the correct encryption keys can decrypt and @@ -1061,7 +1061,7 @@ encrypted with that key as permanently unreadable. For a complete list of official 4.2+ compatible drivers with support for client-side field level encryption, see -:ref:`field-level-encryption-drivers`. +:ref:`csfle-driver-compatibility`. For an end-to-end procedure for configuring field level encryption using select MongoDB 4.2+ compatible drivers, see the diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index e92640856d8..fb45c283942 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -1140,7 +1140,7 @@ Shell Support for GCP and Azure KMS Providers Starting in MongoDB 5.0, the Google Cloud Platform KMS and Azure Key Vault are supported in both :binary:`~bin.mongosh` and the legacy ``mongo`` shell as -:ref:`Key Management Service (KMS) ` +:ref:`Key Management Service (KMS) ` providers for :ref:`manual-csfle-feature`. Using a KMS, you can centrally and securely store Customer Master Keys From c3f10ed2f34776a06c27377a485a9481bf87c53e Mon Sep 17 00:00:00 2001 From: Nick Villahermosa Date: Mon, 18 Mar 2024 13:07:42 -0400 Subject: [PATCH 248/308] Docsp 28981 disclaimer different major versions in replica sets (#6796) * Removed outdated include * Drafted note * Taxonomy tagging * Removed duplicate sentence --- source/core/replica-set-architectures.txt | 11 +++++++++-- .../includes/considerations-deploying-replica-set.rst | 2 ++ .../replication/note-replica-set-major-versions.rst | 5 +++++ source/tutorial/deploy-replica-set.txt | 7 +++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 source/includes/replication/note-replica-set-major-versions.rst diff --git a/source/core/replica-set-architectures.txt b/source/core/replica-set-architectures.txt index 671f26326a4..42df46e7a05 100644 --- a/source/core/replica-set-architectures.txt +++ b/source/core/replica-set-architectures.txt @@ -1,3 +1,10 @@ +.. facet:: + :name: genre + :values: reference + +.. meta:: + :keywords: replica set members, replica set capacity, voting members, arbiter + .. _replica-set-deployment-overview: .. _replica-set-architecture: @@ -22,6 +29,8 @@ three-member replica set. These sets provide redundancy and fault tolerance. Avoid complexity when possible, but let your application requirements dictate the architecture. +.. include:: /includes/replication/note-replica-set-major-versions.rst + Strategies ---------- @@ -55,8 +64,6 @@ it may be possible to place an arbiter into environments that you would not place other members of the replica set. Consult your security policies. -.. include:: /includes/extracts/arbiters-and-pvs-with-reference.rst - .. include:: /includes/admonition-multiple-arbiters.rst .. _replica-set-architectures-consider-fault-tolerance: diff --git a/source/includes/considerations-deploying-replica-set.rst b/source/includes/considerations-deploying-replica-set.rst index de79d768d89..dea69794f91 100644 --- a/source/includes/considerations-deploying-replica-set.rst +++ b/source/includes/considerations-deploying-replica-set.rst @@ -5,6 +5,8 @@ In production, deploy each member of the replica set to its own machine. If possible, ensure that MongoDB listens on the default port of ``27017``. +.. include:: /includes/replication/note-replica-set-major-versions.rst + For more information, see :doc:`/core/replica-set-architectures`. Hostnames diff --git a/source/includes/replication/note-replica-set-major-versions.rst b/source/includes/replication/note-replica-set-major-versions.rst new file mode 100644 index 00000000000..18ea3f539f4 --- /dev/null +++ b/source/includes/replication/note-replica-set-major-versions.rst @@ -0,0 +1,5 @@ +.. note:: + + Outside of a rolling upgrade, all :binary:`~bin.mongod` members of + a :term:`replica set` should use the same major version of + MongoDB. \ No newline at end of file diff --git a/source/tutorial/deploy-replica-set.txt b/source/tutorial/deploy-replica-set.txt index 14e8af6288b..8dc89239f6a 100644 --- a/source/tutorial/deploy-replica-set.txt +++ b/source/tutorial/deploy-replica-set.txt @@ -1,3 +1,10 @@ +.. facet:: + :name: genre + :values: tutorial + +.. meta:: + :keywords: code example, shell + .. _server-replica-set-deploy: ==================== From 8f1fce1178c69766f3d3ff3db1885b8af80bed03 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Mon, 18 Mar 2024 10:09:05 -0700 Subject: [PATCH 249/308] add note about coordinate limits for both 2d and 2dsphere indexes (#6713) * add note about coordinate limits for both 2d and 2dsphere indexes * add note about wrapping * update with info about overrides * no longer need a shared blob * final review suggestion --- source/core/indexes/index-types/geospatial/2d.txt | 9 +++++++++ source/core/indexes/index-types/geospatial/2dsphere.txt | 7 +++++++ source/reference/method/db.collection.createIndex.txt | 5 +---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/source/core/indexes/index-types/geospatial/2d.txt b/source/core/indexes/index-types/geospatial/2d.txt index 5ce1232ad50..7ed27b60b14 100644 --- a/source/core/indexes/index-types/geospatial/2d.txt +++ b/source/core/indexes/index-types/geospatial/2d.txt @@ -26,6 +26,15 @@ You cannot use 2d indexes for queries on :term:`GeoJSON` objects. To enable queries on GeoJSON objects, use :ref:`2dsphere indexes <2dsphere-index>`. +.. note:: + + When creating a :ref:`2d index <2d-index>`, the first value (longitude) must + be between -180 and 180, inclusive. The second value (latitude) must be between + -90 and 90, inclusive. However, these default limits can be overridden with the ``min`` + and ``max`` :ref:`options on 2d indexes <2d-index-options>`. Unlike + :ref:`2dsphere index <2dsphere-index>` coordinates, ``2d indexes`` values do + not "wrap" around a sphere. + Use Cases --------- diff --git a/source/core/indexes/index-types/geospatial/2dsphere.txt b/source/core/indexes/index-types/geospatial/2dsphere.txt index 8ae903dc34c..decffabd2df 100644 --- a/source/core/indexes/index-types/geospatial/2dsphere.txt +++ b/source/core/indexes/index-types/geospatial/2dsphere.txt @@ -29,6 +29,13 @@ type: .. include:: /includes/indexes/code-examples/create-2dsphere-index.rst +.. note:: + + When :ref:`creating a a 2dsphere index <2dsphere-index-create>`, the first + value, or longitude, must be between -180 and 180, inclusive. The second value, + or latitude, must be between -90 and 90, inclusive. These coordinates "wrap" + around the sphere. For example, -179.9 and +179.9 are near neighbors. + Use Cases --------- diff --git a/source/reference/method/db.collection.createIndex.txt b/source/reference/method/db.collection.createIndex.txt index 892188fb588..902e680b8e5 100644 --- a/source/reference/method/db.collection.createIndex.txt +++ b/source/reference/method/db.collection.createIndex.txt @@ -393,9 +393,6 @@ indexes only: For available versions, see :ref:`text-index-versions`. - - - Options for ``2dsphere`` Indexes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -424,7 +421,7 @@ indexes only: For the available versions, see :ref:`2dsphere-v2`. - +.. _2d-index-options: Options for ``2d`` Indexes ~~~~~~~~~~~~~~~~~~~~~~~~~~ From 5806dca03026871c62b023ab9043629df946e9a6 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Mon, 18 Mar 2024 16:50:20 -0400 Subject: [PATCH 250/308] DOCSP-37704 7.0.7 Release Notes (#6828) * DOCSP-37704 7.0.7 Release Notes * nit fix * revert 7.0 removal --- source/includes/changelogs/releases/7.0.7.rst | 15 +++++++-------- source/release-notes/7.0.txt | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/source/includes/changelogs/releases/7.0.7.rst b/source/includes/changelogs/releases/7.0.7.rst index 300ddaabcef..4af88083d1d 100644 --- a/source/includes/changelogs/releases/7.0.7.rst +++ b/source/includes/changelogs/releases/7.0.7.rst @@ -34,11 +34,8 @@ Internals - :issue:`SERVER-72431` Make the commit of split chunks idempotent - :issue:`SERVER-76700` Increase window of acceptable elapsed CPU times in OperationCPUTimerTest::TestReset -- :issue:`SERVER-78832` AutoGetCollectionForReadLockFree constructor - should check the shard version when setting shard key - :issue:`SERVER-79285` makeOperationContext should not be called on the primaryOnlyService instance cleanup executor -- :issue:`SERVER-79575` Fix numa node counting - :issue:`SERVER-79999` reduce test code coverage on macos builders - :issue:`SERVER-80177` validate() should not return valid:false for non-compliant documents @@ -54,8 +51,6 @@ Internals - :issue:`SERVER-84179` Simple8b builder does not fully reset state after writing RLE block - :issue:`SERVER-84240` Make replSetReconfig retry network errors -- :issue:`SERVER-84530` Add query stats key hash to output of - $queryStats - :issue:`SERVER-84589` Error when directly dropping a sharded time-series buckets collection is misleading. - :issue:`SERVER-84612` Define a version for immer @@ -78,6 +73,7 @@ Internals data - :issue:`SERVER-85973` Update README.third_party.md to indicate that Valgrind is licensed under BSD-4-Clause +- :issue:`SERVER-86021` 7.0 backport testing audit - :issue:`SERVER-86065` BSONColumn structural validation should check for nested interleaved mode - :issue:`SERVER-86106` shadow-utils is not on suse @@ -124,6 +120,8 @@ Internals NamespaceNotFound error - :issue:`SERVER-86705` moveChunk op slower than TTL index in ttl_deletes_not_targeting_orphaned_documents.js +- :issue:`SERVER-86717` Resharding should validate user provided zone + range doesn't include $-prefixed fields. - :issue:`SERVER-86772` Fix racy watchdog_test - :issue:`SERVER-86822` remove sharding_gen from macOS builders - :issue:`SERVER-86840` fix gather unittest script to handle split @@ -138,7 +136,6 @@ Internals - :issue:`SERVER-87061` Sharded multi-document transactions can observe partial effects of concurrent reshard operation - :issue:`SERVER-87130` Backport Query Stats to 7.0 Batch #8 -- :issue:`SERVER-87166` Fix collation_bucket.js for query_stats on 7.0 - :issue:`SERVER-87177` Modify tests in expression_test.cpp to not use $getFields. - :issue:`SERVER-87330` Accept JWKSets with non-RSA keys @@ -148,11 +145,13 @@ Internals - :issue:`SERVER-87479` Manually run SBE build variants on release branches in evergreen to generate and add SBE $group/$lookup tests with $skip/$limit prefixes +- :issue:`SERVER-87544` Fix up gitignore to permit git awareness of + enterprise module +- :issue:`SERVER-87557` Exclude some FF tests from an invalid build + variant - :issue:`SERVER-87567` The SessionWorkflow should correctly return a response error on malformed requests - :issue:`SERVER-87600` Delete older variants from system_perf.yml -- :issue:`SERVER-87610` Relax shardVersionRetry tripwires on the - namespace of received stale exceptions - :issue:`SERVER-87612` Backport Query Stats to 7.0 Batch #9 - :issue:`WT-10178` Fix timing stress causing format to time out with prepare-conflict diff --git a/source/release-notes/7.0.txt b/source/release-notes/7.0.txt index 8ae5882e49b..f1c37ace758 100644 --- a/source/release-notes/7.0.txt +++ b/source/release-notes/7.0.txt @@ -42,8 +42,8 @@ Patch Releases .. _7.0.7-release-notes: -7.0.7 - Upcoming -~~~~~~~~~~~~~~~~ +7.0.7 - Mar 18, 2024 +~~~~~~~~~~~~~~~~~~~~ Issues fixed: From fa79fe7284d928731aa17b7892340c5ec4707eda Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Tue, 19 Mar 2024 12:53:45 -0400 Subject: [PATCH 251/308] DOCSP-31877 Remove circular definitions for clutered indexes (#6840) * (DOCSP-31877): Remove circular definitions for clutered indexes and collections * edits * edit * review edits * wording * review edits * edits * typo * edits * tweak * tweak * edit --- source/core/clustered-collections.txt | 7 +------ .../clustered-collections-introduction.rst | 14 +++++++++++--- source/includes/clustered-index-fields.rst | 11 ++++++----- source/release-notes/5.3.txt | 2 ++ source/release-notes/6.0.txt | 2 ++ 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/source/core/clustered-collections.txt b/source/core/clustered-collections.txt index 34bc6724c14..ab16a5bbd3c 100644 --- a/source/core/clustered-collections.txt +++ b/source/core/clustered-collections.txt @@ -14,9 +14,6 @@ Clustered Collections .. versionadded:: 5.3 -Overview --------- - .. include:: /includes/clustered-collections-introduction.rst .. important:: Backward-Incompatible Feature @@ -27,9 +24,7 @@ Overview Benefits -------- -Because clustered collections store documents ordered by the -:ref:`clustered index ` key value, -clustered collections have the following benefits compared to +Clustered collections have the following benefits compared to non-clustered collections: - Faster queries on clustered collections without needing a secondary diff --git a/source/includes/clustered-collections-introduction.rst b/source/includes/clustered-collections-introduction.rst index 8ec853dcc77..51d3e6024b3 100644 --- a/source/includes/clustered-collections-introduction.rst +++ b/source/includes/clustered-collections-introduction.rst @@ -1,3 +1,11 @@ -Starting in MongoDB 5.3, you can create a collection with a -:ref:`clustered index `. Collections -created with a clustered index are called clustered collections. +Clustered collections store indexed documents in the same +:ref:`WiredTiger ` file as the index specification. +Storing the collection's documents and index in the same file provides +benefits for storage and performance compared to regular indexes. + +Clustered collections are created with a :ref:`clustered index +`. The clustered index specifies the +order in which documents are stored. + +To create a clustered collection, see +:ref:`clustered-collections-examples`. diff --git a/source/includes/clustered-index-fields.rst b/source/includes/clustered-index-fields.rst index c858140f83c..b24c4a2fbb4 100644 --- a/source/includes/clustered-index-fields.rst +++ b/source/includes/clustered-index-fields.rst @@ -1,14 +1,15 @@ -.. include:: /includes/clustered-collections-introduction.rst +Starting in MongoDB 5.3, you can create a collection with a **clustered +index**. Clustered indexes are stored in the same :ref:`WiredTiger +` file as the collection. The resulting collection +is called a :ref:`clustered collection `. -See :ref:`clustered-collections`. - -``clusteredIndex`` has the following syntax: +The ``clusteredIndex`` field has the following syntax: .. code-block:: javascript :copyable: false clusteredIndex: { - key: { }, + key: , unique: , name: } diff --git a/source/release-notes/5.3.txt b/source/release-notes/5.3.txt index e9c05de4e77..b5016bd04b7 100644 --- a/source/release-notes/5.3.txt +++ b/source/release-notes/5.3.txt @@ -170,6 +170,8 @@ operator on any field in a :ref:`time series collection Clustered Collections ~~~~~~~~~~~~~~~~~~~~~ +Starting in MongoDB 5.3, you can create clustered collections. + .. include:: /includes/clustered-collections-introduction.rst To learn about the benefits compared to a normal collection, see diff --git a/source/release-notes/6.0.txt b/source/release-notes/6.0.txt index f707b3b142b..622a1e36038 100644 --- a/source/release-notes/6.0.txt +++ b/source/release-notes/6.0.txt @@ -543,6 +543,8 @@ Multiple Arbiters Unsupported Clustered Collections --------------------- +Starting in MongoDB 5.3, you can create clustered collections. + .. include:: /includes/clustered-collections-introduction.rst To learn about the benefits compared to a normal collection, see From 59931b1c9b22243bfd417389b81304d5afdd332e Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Tue, 19 Mar 2024 12:57:28 -0400 Subject: [PATCH 252/308] DOCSP-36056 listSearchIndexes Visibility (#6767) * DOCSP-36056 listSearchIndexes Visibility * build errors * atlas-first edit * adjust TOC + better highlight Atlas Search index methods --- source/reference/command/listIndexes.txt | 13 +++---- source/reference/method.txt | 35 ++++++++++--------- .../method/db.collection.getIndexes.txt | 13 +++---- source/reference/method/js-atlas-search.txt | 2 ++ source/reference/method/js-collection.txt | 5 +++ 5 files changed, 39 insertions(+), 29 deletions(-) diff --git a/source/reference/command/listIndexes.txt b/source/reference/command/listIndexes.txt index da7dde60b76..c65120788a0 100644 --- a/source/reference/command/listIndexes.txt +++ b/source/reference/command/listIndexes.txt @@ -84,6 +84,13 @@ database. Behavior -------- +Atlas Search Indexes +~~~~~~~~~~~~~~~~~~~~ + +``listIndexes`` does not return information on :atlas:`{+fts+} indexes +`. Instead, use +:pipeline:`$listSearchIndexes`. + .. |operation| replace:: :dbcommand:`listIndexes` .. |operations| replace:: :dbcommand:`listIndexes` @@ -102,12 +109,6 @@ Wildcard Indexes .. include:: /includes/indexes/fact-wildcard-index-ordering.rst -Atlas Search Indexes -~~~~~~~~~~~~~~~~~~~~ - -``listIndexes`` does not return information on :atlas:`{+fts+} indexes -`. - Output ------ diff --git a/source/reference/method.txt b/source/reference/method.txt index 19454ffb491..5bb19da9751 100644 --- a/source/reference/method.txt +++ b/source/reference/method.txt @@ -16,6 +16,24 @@ .. include:: /includes/extracts/methods-toc-explanation.rst +Atlas Search Index Methods +-------------------------- + +.. include:: /includes/atlas-search-commands/mongosh-method-intro.rst + +.. |fts-index| replace:: {+fts+} index + +.. |fts-indexes| replace:: {+fts+} indexes + +.. include:: /includes/atlas-search-commands/mongosh-method-table.rst + + +.. toctree:: + :titlesonly: + :hidden: + + /reference/method/js-atlas-search + Collection ---------- @@ -1324,20 +1342,3 @@ Client-Side Field Level Encryption :hidden: /reference/method/js-client-side-field-level-encryption - -Atlas Search Index Methods --------------------------- - -.. include:: /includes/atlas-search-commands/mongosh-method-intro.rst - -.. |fts-index| replace:: {+fts+} index - -.. |fts-indexes| replace:: {+fts+} indexes - -.. include:: /includes/atlas-search-commands/mongosh-method-table.rst - -.. toctree:: - :titlesonly: - :hidden: - - /reference/method/js-atlas-search diff --git a/source/reference/method/db.collection.getIndexes.txt b/source/reference/method/db.collection.getIndexes.txt index b40cb5b04d5..a5b043ba03a 100644 --- a/source/reference/method/db.collection.getIndexes.txt +++ b/source/reference/method/db.collection.getIndexes.txt @@ -37,6 +37,13 @@ Definition Behavior -------- +Atlas Search Indexes +~~~~~~~~~~~~~~~~~~~~ + +``getIndexes()`` does not return information on :atlas:`{+fts+} indexes +`. For information on Atlas +Search indexes, use :pipeline:`$listSearchIndexes`. + .. |operation| replace:: :method:`db.collection.getIndexes()` .. |operations| replace:: :dbcommand:`listIndexes` @@ -55,12 +62,6 @@ Wildcard Indexes .. include:: /includes/indexes/fact-wildcard-index-ordering.rst -Atlas Search Indexes -~~~~~~~~~~~~~~~~~~~~ - -``getIndexes()`` does not return information on :atlas:`{+fts+} indexes -`. - Required Access --------------- diff --git a/source/reference/method/js-atlas-search.txt b/source/reference/method/js-atlas-search.txt index b35976e87dd..6be1aa1b624 100644 --- a/source/reference/method/js-atlas-search.txt +++ b/source/reference/method/js-atlas-search.txt @@ -1,3 +1,5 @@ +.. _atlas-search-index-methods: + ========================== Atlas Search Index Methods ========================== diff --git a/source/reference/method/js-collection.txt b/source/reference/method/js-collection.txt index 86e7924f9c7..141a923edab 100644 --- a/source/reference/method/js-collection.txt +++ b/source/reference/method/js-collection.txt @@ -212,6 +212,11 @@ Collection Methods - Performs diagnostic operations on a collection. +.. seealso:: + + To manage :atlas:`{+fts+} indexes `, + see :ref:`atlas-search-index-methods`. + .. toctree:: :titlesonly: From d489a3907f970dac3559ae187efedbda73ef35c5 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:01:00 -0700 Subject: [PATCH 253/308] DOCSP-37568 clarify options in sh.stopBalancer Documentation (#6790) * DOCSP-37568 clarify options in sh.stopBalancer Documentation * DOCSP-37568 updates for MP's feedback * Update source/reference/method/sh.stopBalancer.txt Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> * DOCSP-37568 updates for copy feedback --------- Co-authored-by: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> --- source/reference/method/sh.stopBalancer.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/reference/method/sh.stopBalancer.txt b/source/reference/method/sh.stopBalancer.txt index 935a0fc8d26..872a3fc5a16 100644 --- a/source/reference/method/sh.stopBalancer.txt +++ b/source/reference/method/sh.stopBalancer.txt @@ -32,30 +32,30 @@ Definition .. list-table:: :header-rows: 1 - :widths: 20 20 80 + :widths: 20 20 60 * - Parameter - Type - + - Description * - ``timeout`` - integer - - - Time limit for disabling the balancer. + + - Optional. Time limit for disabling the balancer. Defaults to 60000 milliseconds. * - ``interval`` - integer - - - The interval (in milliseconds) at which to check if the balancing - round has stopped. - + - Optional. The interval (in milliseconds) at which to check if + the balancing round has stopped. + + If you omit both options, MongoDB disables the balancer indefinitely. You can only run :method:`sh.stopBalancer()` on a :binary:`~bin.mongos` instance. :method:`sh.stopBalancer()` errors From 93e713568ef9da9a592e17589aa395ae19f04b50 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Tue, 19 Mar 2024 16:45:26 -0400 Subject: [PATCH 254/308] (DOCSP-26094): Clarify VMWare balloon recommendation (#6831) * (DOCSP-26094): Clarify VMWare balloon recommendation * edits * present tense * edits * edits * edits * review feedback * review feedback --- .../extracts-production-notes-base.yaml | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/source/includes/extracts-production-notes-base.yaml b/source/includes/extracts-production-notes-base.yaml index a153957f964..f9db2f44536 100644 --- a/source/includes/extracts-production-notes-base.yaml +++ b/source/includes/extracts-production-notes-base.yaml @@ -8,15 +8,21 @@ content: | virtual machines. {{software}}'s balloon driver {{balloonDriverLiteral}} reclaims the pages that are considered least valuable. - The balloon driver resides inside the guest operating system. When the balloon driver expands, - it may induce the guest operating system to reclaim memory from guest - applications, which can interfere with MongoDB's memory management and - affect MongoDB's performance. + The balloon driver resides inside the guest operating system. Under + certain configurations, when the balloon driver expands, it can + interfere with MongoDB's memory management and affect MongoDB's + performance. - Do not disable the balloon driver and memory - overcommitment features. This can cause the hypervisor to use its swap which - will affect performance. Instead, map and reserve the full amount of - memory for the virtual machine running MongoDB. This ensures that the balloon - will not be inflated in the local operating system if there is memory - pressure in the hypervisor due to an overcommitted configuration. + To prevent negative performance impact from the balloon driver and + memory overcommitment features, reserve the full amount of memory for + the virtual machine running MongoDB. Reserving the appropriate amount + of memory for the virtual machine prevents the balloon from inflating + in the local operating system when there is memory pressure in the + hypervisor. + + Even though the balloon driver and memory overcommitment features can + negatively affect MongoDB performance under certain configurations, + **do not disable these features**. If you disable these features, the + hypervisor may use its swap space to fulfill memory requests, which + negatively affects performance. ... From 1eacc07ebbbece469bbbdebed0e279046f3ddf1b Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Tue, 19 Mar 2024 17:16:48 -0700 Subject: [PATCH 255/308] add info about explain ignoring query plan (#6836) * add info about explain ignoring query plan * wording changes to be more accurate & clear --- source/core/query-plans.txt | 4 +++- source/includes/explain-ignores-cache-plan.rst | 4 ++++ source/reference/command/explain.txt | 2 ++ source/reference/explain-results.txt | 11 ++++++++--- source/reference/method/cursor.explain.txt | 2 ++ source/reference/method/db.collection.explain.txt | 2 ++ 6 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 source/includes/explain-ignores-cache-plan.rst diff --git a/source/core/query-plans.txt b/source/core/query-plans.txt index 871dce48dce..a2080daaf8b 100644 --- a/source/core/query-plans.txt +++ b/source/core/query-plans.txt @@ -16,7 +16,7 @@ Query Plans .. TODO Consider moving this to the mechanics of the index section -For a query, the MongoDB query planner chooses and caches the most +For any given query, the MongoDB query planner chooses and caches the most efficient query plan given the available indexes. The evaluation of the most efficient query plan is based on the number of "work units" (``works``) performed by the query execution plan when the query planner @@ -30,6 +30,8 @@ The following diagram illustrates the query planner logic: .. include:: /images/query-planner-logic.rst +.. include:: includes/explain-ignores-cache-plan.rst + .. _cache-entry-state: Plan Cache Entry State diff --git a/source/includes/explain-ignores-cache-plan.rst b/source/includes/explain-ignores-cache-plan.rst new file mode 100644 index 00000000000..cab12d6ecb6 --- /dev/null +++ b/source/includes/explain-ignores-cache-plan.rst @@ -0,0 +1,4 @@ +.. note:: + + Using ``explain`` ignores all existing plan cache entries and prevents + the MongoDB query planner from creating a new plan cache entry. \ No newline at end of file diff --git a/source/reference/command/explain.txt b/source/reference/command/explain.txt index c0605bc5b21..f72cf0d0a96 100644 --- a/source/reference/command/explain.txt +++ b/source/reference/command/explain.txt @@ -26,6 +26,8 @@ Definition .. include:: /includes/fact-dbcommand-tip + .. include:: includes/explain-ignores-cache-plan.rst + Compatibility ------------- diff --git a/source/reference/explain-results.txt b/source/reference/explain-results.txt index ed40d7cd78a..a6def2796da 100644 --- a/source/reference/explain-results.txt +++ b/source/reference/explain-results.txt @@ -23,11 +23,16 @@ execution statistics of the query plans, MongoDB provides: .. important:: - - Only the most important output fields are shown on this page. + ``explain`` ignores the plan cache. Instead, a set + of candidate plans are generated, and a winner is chosen without consulting + the plan cache. Furthermore, ``explain`` prevents the MongoDB query planner + from caching the winning plan. - - The output is subject to change. +.. note:: - - Some fields are for internal use and are not documented. + Only the most important output fields are shown on this page, and fields for + internal use are not documented. The fields listed in the output are subject + to change. .. _explain-output-structure: diff --git a/source/reference/method/cursor.explain.txt b/source/reference/method/cursor.explain.txt index f02e859ef54..9f0416b2ef3 100644 --- a/source/reference/method/cursor.explain.txt +++ b/source/reference/method/cursor.explain.txt @@ -64,6 +64,8 @@ Definition Behavior -------- +.. include:: includes/explain-ignores-cache-plan.rst + .. _explain-cursor-method-verbosity: Verbosity Modes diff --git a/source/reference/method/db.collection.explain.txt b/source/reference/method/db.collection.explain.txt index c0b46c8d51d..c27472e3fce 100644 --- a/source/reference/method/db.collection.explain.txt +++ b/source/reference/method/db.collection.explain.txt @@ -105,6 +105,8 @@ This method is available in deployments hosted in the following environments: Behavior -------- +.. include:: includes/explain-ignores-cache-plan.rst + .. _explain-method-verbosity: .. _explain-method-queryPlanner: From 17b47abf2d200f6ffa18b83673cc17c33fc35e44 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Wed, 20 Mar 2024 09:35:56 -0400 Subject: [PATCH 256/308] DOCSP-20504: Mention comment inheritance on listIndexes and listCollections (#6851) --- source/includes/comment-option-getMore-inheritance.rst | 5 +++++ source/reference/command/aggregate.txt | 8 +++----- source/reference/command/find.txt | 8 +++----- source/reference/command/listCollections.txt | 5 ++++- source/reference/command/listIndexes.txt | 4 ++++ 5 files changed, 19 insertions(+), 11 deletions(-) create mode 100644 source/includes/comment-option-getMore-inheritance.rst diff --git a/source/includes/comment-option-getMore-inheritance.rst b/source/includes/comment-option-getMore-inheritance.rst new file mode 100644 index 00000000000..abff1172129 --- /dev/null +++ b/source/includes/comment-option-getMore-inheritance.rst @@ -0,0 +1,5 @@ +.. note:: + + Any comment set on a |comment-include-command| command is inherited + by any subsequent :dbcommand:`getMore` commands run on the + |comment-include-command| cursor. diff --git a/source/reference/command/aggregate.txt b/source/reference/command/aggregate.txt index ceb4490a27b..b48a0ce3db0 100644 --- a/source/reference/command/aggregate.txt +++ b/source/reference/command/aggregate.txt @@ -207,12 +207,10 @@ arguments: - any - .. include:: /includes/extracts/comment-content.rst - - .. note:: - Any comment set on an :dbcommand:`aggregate` command is inherited - by any subsequent :dbcommand:`getMore` commands running with the - same ``cursorId`` returned from the ``aggregate`` command. + .. |comment-include-command| replace:: ``aggregate`` + + .. include:: /includes/comment-option-getMore-inheritance.rst * - ``writeConcern`` diff --git a/source/reference/command/find.txt b/source/reference/command/find.txt index 35d94fc3d1b..b2793f8d030 100644 --- a/source/reference/command/find.txt +++ b/source/reference/command/find.txt @@ -150,11 +150,9 @@ The command accepts the following fields: - any - .. include:: /includes/extracts/comment-content.rst - .. note:: - - Any comment set on a :dbcommand:`find` command is inherited - by any subsequent :dbcommand:`getMore` commands run on the - ``find`` cursor. + .. |comment-include-command| replace:: ``find`` + + .. include:: /includes/comment-option-getMore-inheritance.rst * - ``maxTimeMS`` - non-negative integer diff --git a/source/reference/command/listCollections.txt b/source/reference/command/listCollections.txt index 3d79c55175b..e1187bf41bd 100644 --- a/source/reference/command/listCollections.txt +++ b/source/reference/command/listCollections.txt @@ -121,6 +121,10 @@ The command can take the following optional fields: - any - .. include:: /includes/extracts/comment-content.rst + .. |comment-include-command| replace:: ``listCollections`` + + .. include:: /includes/comment-option-getMore-inheritance.rst + .. _listCollections-behavior: Behavior @@ -362,4 +366,3 @@ For collection information: - :method:`db.getCollectionInfos()` - :ref:`mongosh built-in commands ` - diff --git a/source/reference/command/listIndexes.txt b/source/reference/command/listIndexes.txt index c65120788a0..a28d4a8a933 100644 --- a/source/reference/command/listIndexes.txt +++ b/source/reference/command/listIndexes.txt @@ -74,6 +74,10 @@ The command takes the following fields: - any - .. include:: /includes/extracts/comment-content.rst + .. |comment-include-command| replace:: ``listIndexes`` + + .. include:: /includes/comment-option-getMore-inheritance.rst + Required Access --------------- From 91cf0b748c4127e0f28a45e67c298058fa872c1d Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 20 Mar 2024 11:13:16 -0400 Subject: [PATCH 257/308] DOCSP-37342 Configuration File CAFile Requirement (#6677) * DOCSP-37342 Configuration File CAFile Requirement * fixes * BM external feedback * BM edits --- source/reference/configuration-options.txt | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/source/reference/configuration-options.txt b/source/reference/configuration-options.txt index f023d2aa842..5fd794659a2 100644 --- a/source/reference/configuration-options.txt +++ b/source/reference/configuration-options.txt @@ -1435,9 +1435,14 @@ Core Options full certificate chain of the specified TLS certificate. Specifically, the secure certificate store must contain the root CA and any intermediate CA certificates required to build the full - certificate chain to the TLS certificate. Do **not** use - :setting:`net.tls.CAFile` or :setting:`net.tls.clusterFile` to - specify the root and intermediate CA certificate + certificate chain to the TLS certificate. + + .. warning:: + + If you use ``net.tls.certificateSelector`` and/or + :setting:`net.tls.clusterCertificateSelector`, we **do not** recommend + using :setting:`net.tls.CAFile` or :setting:`net.tls.clusterFile` to + specify the root and intermediate CA certificate For example, if the TLS certificate was signed with a single root CA certificate, the secure certificate store must contain that root @@ -1476,9 +1481,14 @@ Core Options full certificate chain of the specified cluster certificate. Specifically, the secure certificate store must contain the root CA and any intermediate CA certificates required to build the full - certificate chain to the cluster certificate. Do **not** use - :setting:`net.tls.CAFile` or :setting:`net.tls.clusterCAFile` to - specify the root and intermediate CA certificate. + certificate chain to the cluster certificate. + + .. warning:: + + If you use :setting:`net.tls.certificateSelector` and/or + ``net.tls.clusterCertificateSelector``, we **do not** recommend using + :setting:`net.tls.CAFile` or :setting:`net.tls.clusterCAFile` to specify + the root and intermediate CA certificate. For example, if the cluster certificate was signed with a single root CA certificate, the secure certificate store must contain that root From 4a8dcd982dc9607e0149afe1af768da46f60bf7f Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:09:23 -0400 Subject: [PATCH 258/308] DOCSP-32184 Update Time-Series Sharding Admin Commands (#6780) * DOCSP-32184 Update Time-Series Sharding Admin Commands * DOCSP-32184 Sharding Admin Commands on system.buckets * nit fix * AB feedback --- source/core/timeseries/timeseries-limitations.txt | 13 +++++-------- .../core/timeseries/timeseries-shard-collection.txt | 7 ------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/source/core/timeseries/timeseries-limitations.txt b/source/core/timeseries/timeseries-limitations.txt index 8d75f4b06c1..bd21424dd52 100644 --- a/source/core/timeseries/timeseries-limitations.txt +++ b/source/core/timeseries/timeseries-limitations.txt @@ -218,15 +218,11 @@ collections. In versions earlier than MongoDB 5.0.6, you cannot shard time series collections. -Sharding Administration Commands +Sharding Administration Commands ```````````````````````````````` -Starting in MongoDB 5.2 (and 5.1.2, 5.0.6), you can run :ref:`sharding -administration commands ` (such as -:dbcommand:`moveChunk`) on the ``system.buckets`` collection. - -In versions earlier than MongoDB 5.0.6, you cannot run sharding -administration commands for sharded time series collections. +You cannot run sharding administration commands on sharded time series +collections. Shard Key Fields ```````````````` @@ -236,7 +232,8 @@ Shard Key Fields Resharding `````````` -You cannot reshard sharded time series collections. +You cannot reshard a sharded time series collection. However, you can +:ref:`refine its shard key `. Transactions ~~~~~~~~~~~~ diff --git a/source/core/timeseries/timeseries-shard-collection.txt b/source/core/timeseries/timeseries-shard-collection.txt index e48a49269d6..66b611c292c 100644 --- a/source/core/timeseries/timeseries-shard-collection.txt +++ b/source/core/timeseries/timeseries-shard-collection.txt @@ -22,13 +22,6 @@ Use this tutorial to shard a new or existing time series collection. limitations ` for time series collections. -Limitations ------------ - -You can't :ref:`reshard ` a sharded time series -collection. However, you can :ref:`refine its shard key -`. - Prerequisites ------------- From eea3671ca215f27d12d2c9a63afc16c5ffc65925 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:21:04 -0400 Subject: [PATCH 259/308] DOCSP-37695 5.0.26 Release Notes (#6850) * DOCSP-37695 5.0.26 Release Notes * build error * * --- .../includes/changelogs/releases/5.0.26.rst | 119 ++++++++++++++++++ source/release-notes/5.0-changelog.txt | 2 + source/release-notes/5.0.txt | 23 ++++ 3 files changed, 144 insertions(+) create mode 100644 source/includes/changelogs/releases/5.0.26.rst diff --git a/source/includes/changelogs/releases/5.0.26.rst b/source/includes/changelogs/releases/5.0.26.rst new file mode 100644 index 00000000000..f669456b594 --- /dev/null +++ b/source/includes/changelogs/releases/5.0.26.rst @@ -0,0 +1,119 @@ +.. _5.0.26-changelog: + +5.0.26 Changelog +---------------- + +Sharding +~~~~~~~~ + +- :issue:`SERVER-65802` mongos returns inconsistent error code when + renameCollection target already exists +- :issue:`SERVER-84368` CreateIndex fails with StaleConfig if run from a + stale mongos against a sharded non-empty collection + +Query +~~~~~ + +:issue:`SERVER-83602` $or -> $in MatchExpression rewrite should not +generate $or directly nested in another $or + +Storage +~~~~~~~ + +:issue:`WT-11062` Safe free the ref addr to allow concurrent access + +Internals +~~~~~~~~~ + +- :issue:`SERVER-56661` Increase default close_handle_minimum in + WiredTiger from 250 to 2000 +- :issue:`SERVER-60603` Allow connection reset errors without assertion + in ASIOSession::ensureSync() +- :issue:`SERVER-68128` Exceptions thrown while generating command + response lead to network error +- :issue:`SERVER-69005` $internalBoundedSort should not accept empty + sort pattern +- :issue:`SERVER-72703` Downgrade $out's db lock to MODE_IX +- :issue:`SERVER-75355` Improve explain with Queryable Encryption +- :issue:`SERVER-77559` Implement file system log handler for resmoke +- :issue:`SERVER-79235` rolling_index_builds_interrupted.js checkLog + relies on clearRawMongoProgramOutput +- :issue:`SERVER-79286` Create a query knob +- :issue:`SERVER-79400` Implement number of documents tie breaking + heuristics +- :issue:`SERVER-79575` Fix numa node counting +- :issue:`SERVER-80233` Implement index prefix heuristic +- :issue:`SERVER-80275` Add log line for detailed plan scoring +- :issue:`SERVER-81021` Improve index prefix heuristic by taking into + account closed intervals +- :issue:`SERVER-82476` Disable diagnostics latches by default +- :issue:`SERVER-84004` Add FCV gating to dots and dollars validation on + 5.0 +- :issue:`SERVER-84336` Timeseries inserts can leave dangling BSONObj in + WriteBatches in certain cases +- :issue:`SERVER-84612` Define a version for immer +- :issue:`SERVER-84615` Define a version for linenoise +- :issue:`SERVER-85534` Checkpoint the vector clock after committing + shard collection +- :issue:`SERVER-85633` Add lock around res_ninit call +- :issue:`SERVER-85721` Point evergreen task log lobster links to + Parsley +- :issue:`SERVER-85843` A write operation may fail with + NamespaceNotFound if the database has been concurrently dropped + (sharding-only) +- :issue:`SERVER-85869` Exhaustive find on config shard can return stale + data +- :issue:`SERVER-85973` Update README.third_party.md to indicate that + Valgrind is licensed under BSD-4-Clause +- :issue:`SERVER-86017` Backport multi-planner tie breaking improvements + to v6.0 +- :issue:`SERVER-86388` Remove fle_drivers_integration.js test from 6.0 +- :issue:`SERVER-86395` Investigate DuplicateKey error while recovering + convertToCapped from stable checkpoint +- :issue:`SERVER-86403` Fix THP startup warnings +- :issue:`SERVER-86433` Clear memory in the data_union stored on the + endpoint before use +- :issue:`SERVER-86562` Backport multi-planner tie breaking improvements + to v5.0 +- :issue:`SERVER-86619` Document::shouldSkipDeleted() accesses string + without checking for missingg +- :issue:`SERVER-86622` Resharding coordinator use possibly stale + database info +- :issue:`SERVER-86632` plan_cache_drop_database.js should catch + DatabaseDropPending errors +- :issue:`SERVER-86717` Resharding should validate user provided zone + range doesn't include $-prefixed fields. +- :issue:`SERVER-86774` Increase oplog size for PIT (point in time + restore) tests +- :issue:`SERVER-86782` geo_axis_aligned.js takes too long +- :issue:`SERVER-86973` Add debug log around helloResponse and + splitHorizon +- :issue:`SERVER-87198` [5.0] Make shard registry reads fallback to + majority readConcern if snapshot reads fail +- :issue:`SERVER-87224` Enable diagnostic latching in test variants on + old branches +- :issue:`SERVER-87259` [v5.0] Fix for atlas azure intel variant +- :issue:`SERVER-87415` Remove run_command__simple workload from + sys-perf +- :issue:`SERVER-87544` Fix up gitignore to permit git awareness of + enterprise module +- :issue:`SERVER-87567` The SessionWorkflow should correctly return a + response error on malformed requests +- :issue:`SERVER-87610` Relax shardVersionRetry tripwires on the + namespace of received stale exceptions +- :issue:`SERVER-87626` [v5.0] Add san_options to buildvariant config +- :issue:`SERVER-87653` Prevent latch_analyzer.js from being run as part + of the parallelTester +- :issue:`SERVER-87881` Exclude latch analysis testing from certain + buildvariants in v5.0 +- :issue:`WT-9057` Null address read in compact walk +- :issue:`WT-12077` Incorrect hardware checksum calculation on zSeries + for buffers on stack +- :issue:`WT-12379` Incorrect python version on Windows on 6.0 +- :issue:`WT-12402` Add stats to track when eviction server skips + walking a tree +- :issue:`WT-12438` Stop using Ubuntu 18.04 Power Evergreen distro on + 5.0 +- :issue:`WT-12447` Fix incorrect version of Python in the CMake Windows + build on 5.0 + diff --git a/source/release-notes/5.0-changelog.txt b/source/release-notes/5.0-changelog.txt index d016d753d9b..bbab3dab3a1 100644 --- a/source/release-notes/5.0-changelog.txt +++ b/source/release-notes/5.0-changelog.txt @@ -10,6 +10,8 @@ :depth: 1 :class: singlecol +.. include:: /includes/changelogs/releases/5.0.26.rst + .. include:: /includes/changelogs/releases/5.0.25.rst .. include:: /includes/changelogs/releases/5.0.24.rst diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index fb45c283942..69c4ab243b7 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -55,6 +55,29 @@ Patch Releases - 5.0.6 - 5.0.21 (Time Series collections sharded by metaField embedded objects) +.. _5.0.26-release-notes: + +5.0.26 - Upcoming +~~~~~~~~~~~~~~~~~ + +- :issue:`SERVER-68128` Exceptions thrown while generating command response lead + to network error + +- :issue:`SERVER-72703` Downgrade $out's db lock to MODE_IX + +- :issue:`SERVER-83602` $or -> $in MatchExpression rewrite should not generate + $or directly nested in another $or + +- :issue:`SERVER-86717` Resharding should validate user provided zone range + doesn't include $-prefixed fields. + +- :issue:`WT-12077` Incorrect hardware checksum calculation on zSeries for + buffers on stack + +- `All JIRA issues closed in 5.0.26 + `_ +- :ref:`5.0.26-changelog` + .. _5.0.25-release-notes: 5.0.25 - Feb 28, 2024 From 3390496a3e0756a292cf2e5dfecf1767faca188e Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:48:46 -0700 Subject: [PATCH 260/308] DOCSP-21596-storeFindAndModifyImagesInSideCollection-parameter-update-version (#6890) Co-authored-by: jason-price-mongodb --- source/reference/parameters.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 5002b986630..bc3d2e1ebe6 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -2619,7 +2619,7 @@ If you attempt to update ``disableSplitHorizonIPCheck`` at run time, .. parameter:: storeFindAndModifyImagesInSideCollection - .. versionadded:: 5.1 + .. versionadded:: 5.0 |both| @@ -2632,7 +2632,7 @@ If you attempt to update ``disableSplitHorizonIPCheck`` at run time, commands are stored in the *side* collection (``config.image_collection``). - If :parameter:`storeFindAndModifyImagesInSideCollection` is: + If ``storeFindAndModifyImagesInSideCollection`` is: - ``true``, the temporary documents are stored in the side collection. @@ -2640,7 +2640,7 @@ If you attempt to update ``disableSplitHorizonIPCheck`` at run time, - ``false``, the temporary documents are stored in the :ref:`replica set oplog `. - Keep :parameter:`storeFindAndModifyImagesInSideCollection` set to + Keep ``storeFindAndModifyImagesInSideCollection`` set to ``true`` if you: - Have a large :ref:`retryable ` @@ -2654,11 +2654,11 @@ If you attempt to update ``disableSplitHorizonIPCheck`` at run time, .. note:: :term:`Secondaries ` may experience increased CPU - usage when :parameter:`storeFindAndModifyImagesInSideCollection` + usage when ``storeFindAndModifyImagesInSideCollection`` is ``true``. For example, to set - :parameter:`storeFindAndModifyImagesInSideCollection` to ``false`` + ``storeFindAndModifyImagesInSideCollection`` to ``false`` during startup: .. code-block:: bash From db96b86123f6e27c23691fe4a4840a93597b928d Mon Sep 17 00:00:00 2001 From: John Williams <55147273+jwilliams-mongo@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:56:21 -0500 Subject: [PATCH 261/308] DOCSP-37384: resting connection -> idle connection (#6883) --- source/reference/parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index bc3d2e1ebe6..62e3008a762 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -4270,7 +4270,7 @@ Sharding Parameters Default: 60000 (1 minute) Maximum time the :binary:`~bin.mongos` waits before attempting to - heartbeat a resting connection in the pool. An idle connection may be + heartbeat an idle connection in the pool. An idle connection may be discarded during the refresh if the pool is above its :ref:`minimum size `. From 623aeb35b75c5ad47067efa0c1e42e1009790f9e Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:46:09 -0700 Subject: [PATCH 262/308] DOCSP-26062 modify redirect for manual/reference/method/db.collection.copyTo (#6889) * DOCSP-26062 modify redirect for manual/reference/method/db.collection.copyTo * DOCSP-26062 updates for JA's feedback --- config/redirects | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config/redirects b/config/redirects index ecc523dc2af..c907de605a4 100644 --- a/config/redirects +++ b/config/redirects @@ -1490,7 +1490,6 @@ raw: ${prefix}/master/release-notes/3.0-general-improvements -> ${base}/release- [v4.2-*]: ${prefix}/${version}reference/method/rand/ -> ${base}/${version}/reference/method [v4.2-*]: ${prefix}/${version}reference/method/removeFile/ -> ${base}/${version}/reference/method [v4.2-*]: ${prefix}/${version}reference/method/srand/ -> ${base}/${version}/reference/method -[v4.2-*]: ${prefix}/${version}reference/method/db.collection.copyTo// -> ${base}/${version}/reference/method/db.collection.count/ [v4.2-*]: ${prefix}/${version}reference/method/db.collection.save/ -> ${base}/${version}/reference/method/db.collection.stats/ [v4.2-*]: ${prefix}/${version}reference/method/db.collection.repairDatabase -> ${base}/${version}/reference/method/db.dropDatabase/ [v4.2-*]: ${prefix}/${version}reference/method/getHostName/ -> ${base}/${version}/reference/method/hostname @@ -2071,6 +2070,7 @@ raw: ${prefix}/manual/core/wildcard -> ${base}/manual/core/index-wildcard/ [v4.4-*]: ${prefix}/${version}/reference/method/PlanCache.listQueryShapes -> ${base}/${version}/release-notes/4.4/#removed-commands [v4.4-*]: ${prefix}/${version}/reference/program/mongosniff -> ${base}/${version}/reference/program/mongoreplay/ +[v4.4-*]: ${prefix}/${version}reference/method/db.collection.copyTo/ -> ${base}/${version}/reference/operator/aggregation/out/ [v3.4-v4.2]: ${prefix}/${version}/reference/command/refineCollectionShardKey -> ${base}/${version}/core/sharding-shard-key/ @@ -2144,7 +2144,6 @@ raw: ${prefix}/manual/core/wildcard -> ${base}/manual/core/index-wildcard/ [v5.0-*]: ${prefix}/${version}/reference/command/isMaster -> ${base}/${version}/reference/command/hello/ [v5.0-*]: ${prefix}/${version}/reference/method/db.isMaster -> ${base}/${version}/reference/method/db.hello/ -[v5.0-*]: ${prefix}/${version}/reference/method/db.collection.copyTo.txt -> ${base}/${version}/reference/operator/aggregation/out/ [v5.0-*]: ${prefix}/${version}/reference/method/db.collection.save.txt -> ${base}/${version}/reference/method/db.collection.insertOne/ [v5.0-*]: ${prefix}/${version}/reference/method/db.eval -> ${base}/${version}/reference/method/js-database/ [v5.0-*]: ${prefix}/${version}/reference/method/db.getProfilingLevel -> ${base}/${version}/reference/method/db.getProfilingStatus/ From e3498f8dce41b1afddea6bed9e717746d8aeba55 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:46:24 -0700 Subject: [PATCH 263/308] DOCSP-34414 fix redirect for manual/tutorial/copy-databases-between-instances (#6900) --- config/redirects | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/redirects b/config/redirects index c907de605a4..d521b7f87bd 100644 --- a/config/redirects +++ b/config/redirects @@ -421,7 +421,7 @@ symlink: manual -> v7.0 [v2.2]: ${prefix}/${version}/reference/command/nav-user-management -> ${base}/${version}/reference/command/ [*]: ${prefix}/${version}/tutorial/control-access-to-document-content-with-multiple-tag-sets -> ${base}/${version}/tutorial/control-access-to-document-content-with-field-level-security/ [v2.4]: ${prefix}/${version}/release-notes/2.4-changelong -> ${base}/${version}/release-notes/2.4-changelog/ -(v2.4-*]: ${prefix}/${version}/tutorial/copy-databases-between-instances -> ${base}/${version}/reference/command/copydb/ +(v2.4-*]: ${prefix}/${version}/tutorial/copy-databases-between-instances -> ${base}/${version}/tutorial/backup-and-restore-tools/ [*-v2.4]: ${prefix}/${version}/reference/method/rs.printReplicationInfo -> ${base}/${version}/reference/method/rs.status/ [*-v2.4]: ${prefix}/${version}/reference/method/rs.printSlaveReplicationInfo -> ${base}/${version}/reference/method/rs.status/ [*-v2.4]: ${prefix}/${version}/reference/operator/update/mul -> ${base}/${version}/reference/operators/#update From 68afb9b91f1bb620c8a96d2496e53c5f6dc94322 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 20 Mar 2024 17:19:47 -0400 Subject: [PATCH 264/308] DOCSP-37870 Edit Release Notes Top 5 (#6903) * DOCSP-37870 Edit Release Notes Top 5 * fix --- source/release-notes/5.0.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index 69c4ab243b7..043ad317016 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -71,8 +71,7 @@ Patch Releases - :issue:`SERVER-86717` Resharding should validate user provided zone range doesn't include $-prefixed fields. -- :issue:`WT-12077` Incorrect hardware checksum calculation on zSeries for - buffers on stack +- :issue:`WT-11062` Safe free the ref addr to allow concurrent access - `All JIRA issues closed in 5.0.26 `_ From f8165e1a970943108c3c1f4f685d6ed58edf0870 Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Wed, 20 Mar 2024 16:18:49 -0700 Subject: [PATCH 265/308] Add info about journal file drive space needs (#6837) * Add info about journal fiole drive space needs * review changes * refactor for clarity * drive space => disk space --- source/core/journaling.txt | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/source/core/journaling.txt b/source/core/journaling.txt index d86f14d0276..bf190ea903f 100644 --- a/source/core/journaling.txt +++ b/source/core/journaling.txt @@ -122,14 +122,29 @@ For details, see :ref:`manage-journaling-change-wt-journal-compressor`. Journal File Size Limit ``````````````````````` -WiredTiger journal files for MongoDB have a maximum size limit of -approximately 100 MB. +WiredTiger journal files have a maximum size limit of approximately 100 MB. +Once the file exceeds that limit, WiredTiger creates a new journal file. -- Once the file exceeds that limit, WiredTiger creates a new journal - file. +WiredTiger automatically removes old journal files and maintains only +the files needed to recover from the last checkpoint. To determine how much +disk space to set aside for journal files, consider the following: + +- The default maximum size for a checkpoint is 2 GB +- Additional space may be required for MongoDB to write new journal + files while recovering from a checkpoint +- MongoDB compresses journal files +- The time it takes to restore a checkpoint is specific to your use case +- If you override the maximum checkpoint size or disable compression, your + calculations may be significantly different + +For these reasons, it is difficult to calculate exactly how much additional +space you need. Over-estimating disk space is always a safer approach. + +.. important:: + + If you do not set aside enough disk space for your journal + files, the MongoDB server will crash. -- WiredTiger automatically removes old journal files to maintain only - the files needed to recover from last checkpoint. Pre-Allocation `````````````` From e0935277c24d7af2a2ae5f67e489f703190ed277 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Thu, 21 Mar 2024 11:40:51 -0400 Subject: [PATCH 266/308] DOCS-6403: Consolidate query diagnostic information (#6721) * WIP * WIP * update snooty.toml * fix indentation * WIP * WIP * WIP * fix broken refs * review edits * more review edits * more review edits * edits * edit * nits * review edits * reorder table * mention top command * formatting * restructure * change heading levels * reorder * tweaks * add more Atlas tools * simplify * edits * wording * minimalism * final reorg * re-add db profiler * add link to db profiler page --- snooty.toml | 2 + .../analyzing-mongodb-performance.txt | 33 +--- .../diagnose-query-performance.txt | 173 ++++++++++++++++++ source/core/crud.txt | 2 - source/reference.txt | 4 - source/reference/explain-results.txt | 17 +- source/tutorial/analyze-query-plan.txt | 21 ++- .../tutorial/manage-the-database-profiler.txt | 1 + 8 files changed, 205 insertions(+), 48 deletions(-) create mode 100644 source/administration/diagnose-query-performance.txt diff --git a/snooty.toml b/snooty.toml index 7842509b161..05caf43fd7a 100644 --- a/snooty.toml +++ b/snooty.toml @@ -20,6 +20,7 @@ toc_landing_pages = [ "/administration/backup-sharded-clusters", "/administration/configuration-and-maintenance", "/administration/connection-pool-overview", + "/administration/diagnose-query-performance", "/administration/health-managers", "/administration/install-community", "/administration/install-enterprise-linux", @@ -149,6 +150,7 @@ toc_landing_pages = [ "/reference/command/nav-sharding", "/reference/command/nav-user-management", "/reference/configuration-options", + "/reference/explain-results/", "/reference/inconsistency-type", "/reference/method", "/reference/method/js-atlas-search", diff --git a/source/administration/analyzing-mongodb-performance.txt b/source/administration/analyzing-mongodb-performance.txt index 95c6c6c3e2d..5dfbd09ee43 100644 --- a/source/administration/analyzing-mongodb-performance.txt +++ b/source/administration/analyzing-mongodb-performance.txt @@ -109,37 +109,6 @@ system-wide limits can be modified using the ``ulimit`` command, or by editing your system's ``/etc/sysctl`` file. See :ref:`ulimit` for more information. -.. _database-profiling: - -Database Profiling ------------------- - -The :ref:`database-profiler` collects detailed -information about operations run against a mongod instance. The -profiler's output can help to identify inefficient queries and -operations. - -You can enable and configure profiling for individual databases or for -all databases on a :binary:`~bin.mongod` instance. -Profiler settings affect only a single :binary:`~bin.mongod` instance -and don't propagate across a :term:`replica set` or :term:`sharded -cluster`. - -See :ref:`database-profiler` for information on -enabling and configuring the profiler. - -The following profiling levels are available: - -.. include:: /includes/database-profiler-levels.rst - -.. include:: /includes/warning-profiler-performance.rst - -.. note:: - - .. include:: /includes/fact-log-slow-queries.rst - -.. include:: /includes/extracts/4.2-changes-log-query-shapes-plan-cache-key.rst - .. _ftdc-stub: Full Time Diagnostic Data Capture @@ -263,8 +232,8 @@ For information on MongoDB Support, visit `Get Started With MongoDB Support ` (RTPP) to see current network + traffic, database operations, and hardware statistics. + + * - Check ongoing operations locally + - |both| + - The :pipeline:`$currentOp` aggregation stage returns information + on active operations and cursors. Use ``$currentOp`` to identify + long-running or stuck operations that may be negatively impacting + performance. + + You can also use the :dbcommand:`top` command to get additional + operation count and latency statistics.. + + * - Check server metrics + - |both| + - For Atlas clusters, you can :ref:`view cluster metrics + ` to identify performance issues. + + For self-hosted deployments, the :dbcommand:`serverStatus` + command provides metrics that can indicate poor performance and + anomalies for query execution. + + * - View common query shapes + - |both| + - The :pipeline:`$queryStats` aggregation stage returns information + about common query shapes. ``$queryStats`` provides a holistic + view of the kinds of queries being run on your deployment. + + * - View index statistics + - |both| + - The :pipeline:`$indexStats` aggregation stage returns information + about your collection's indexes and how often individual indexes + are used. Use ``$indexStats`` to identify unused indexes that can + be removed to improve write performance. + +Analyze a Slow Query +~~~~~~~~~~~~~~~~~~~~ + +Use these methods to analyze a slow query and determine the cause of +poor performance: + +.. list-table:: + :header-rows: 1 + :widths: 10 10 20 + + * - Method + - Availability + - Description + + * - Use the Atlas Query Profiler + - |m10-atlas| + - The Atlas Query Profiler shows long-running operations and + performance statistics. For more information, see + :ref:`profile-database`. + + * - Enable the Database Profiler + - |both| + - When enabled, the database profiler stores information about slow + queries in the :data:`system.profile <.system.profile>` + collection. + + For more information, see :ref:`database-profiler`. + + * - View slow queries in the diagnostic log + - |both| + - MongoDB logs queries that exceed the slow operation threshold + (default 100 milliseconds) in the :ref:`diagnostic logs + `. + + Check the diagnostic logs to identify problematic queries and see + which queries would benefit from indexes. + + * - View explain results + - |both| + - Query explain results show information on the query plan and + execution statistics. You can use explain results to determine + the following information about a query: + + - The amount of time a query took to execute + - Whether the query used an index + - The number of documents and index keys scanned to fulfill a + query + + To view explain results, use the following methods: + + - :method:`db.collection.explain()` + - :method:`~cursor.explain()` cursor method + + To learn about explain results output, see :ref:`explain-results` + and :ref:`interpret-explain-plan`. + +Perform Advanced Query Analysis +------------------------------- + +The following methods are suited for deeper investigation of problematic +queries, and can provide fine-grained performance insights: + +.. list-table:: + :header-rows: 1 + :widths: 10 10 20 + + * - Method + - Availability + - Description + + * - View plan cache statistics + - |both| + - The :pipeline:`$planCacheStats` aggregation stage returns + information about a collection's :ref:`plan cache + `. + + The plan cache contains query plans that the query planner uses + to efficiently complete queries. Generally, the plan cache should + contain entries for your most commonly-run queries. + +.. toctree:: + :titlesonly: + + /reference/explain-results + /tutorial/manage-the-database-profiler diff --git a/source/core/crud.txt b/source/core/crud.txt index 48422a902d9..33e9a21eb55 100644 --- a/source/core/crud.txt +++ b/source/core/crud.txt @@ -23,7 +23,6 @@ Atomicity, consistency, and distributed operations Query Plan, Performance, and Analysis - :doc:`/core/query-plans` - :doc:`/core/query-optimization` - - :doc:`/tutorial/analyze-query-plan` - :doc:`/core/write-performance` Miscellaneous @@ -37,7 +36,6 @@ Miscellaneous .. toctree:: :titlesonly: - /tutorial/analyze-query-plan /core/write-operations-atomicity /core/distributed-queries /core/dot-dollar-considerations diff --git a/source/reference.txt b/source/reference.txt index ba84c9c231c..12c258a0313 100644 --- a/source/reference.txt +++ b/source/reference.txt @@ -41,9 +41,6 @@ Reference :ref:`server-error-codes` Details the error codes that MongoDB returns. -:ref:`explain-results` - Documentation on information returned from explain operations. - :ref:`glossary` A glossary of common terms and concepts specific to MongoDB. @@ -118,7 +115,6 @@ Reference /reference/mongodb-defaults /reference/exit-codes /reference/error-codes - /reference/explain-results /reference/glossary /reference/log-messages /reference/limits diff --git a/source/reference/explain-results.txt b/source/reference/explain-results.txt index a6def2796da..11d7dfbc3d6 100644 --- a/source/reference/explain-results.txt +++ b/source/reference/explain-results.txt @@ -12,14 +12,16 @@ Explain Results :depth: 2 :class: singlecol -To return information on :ref:`query plans ` and -execution statistics of the query plans, MongoDB provides: +To return information on :ref:`query plans +` and execution statistics of the query +plans, MongoDB provides the following methods: -- the :method:`db.collection.explain()` method, +- :method:`db.collection.explain()` -- the :method:`cursor.explain()` method, and +- :method:`cursor.explain()` -- the :dbcommand:`explain` command. +To learn about important explain result fields and how to interpret +them, see :ref:`interpret-explain-plan`. .. important:: @@ -1041,3 +1043,8 @@ allows MongoDB to use temporary files on disk to store data exceeding the 100 megabyte system memory limit while processing a blocking sort operation. If the explain plan does not contain an explicit ``SORT`` stage, then MongoDB can use an index to obtain the sort order. + +.. toctree:: + :titlesonly: + + /tutorial/analyze-query-plan diff --git a/source/tutorial/analyze-query-plan.txt b/source/tutorial/analyze-query-plan.txt index d5826a6325f..011f07dce5b 100644 --- a/source/tutorial/analyze-query-plan.txt +++ b/source/tutorial/analyze-query-plan.txt @@ -1,6 +1,8 @@ -========================= -Analyze Query Performance -========================= +.. _interpret-explain-plan: + +============================== +Interpret Explain Plan Results +============================== .. default-domain:: mongodb @@ -14,8 +16,17 @@ Analyze Query Performance :depth: 1 :class: singlecol -The :ref:`explain plan results ` for queries are -subject to change between MongoDB versions. +You can use explain results to determine the following information about +a query: + +- The amount of time a query took to complete +- Whether the query used an index +- The number of documents and index keys scanned to fulfill a query + +.. note:: + + Explain plan results for queries are subject to change between + MongoDB versions. .. tabs-drivers:: diff --git a/source/tutorial/manage-the-database-profiler.txt b/source/tutorial/manage-the-database-profiler.txt index ab7b9e187ae..059e085ebae 100644 --- a/source/tutorial/manage-the-database-profiler.txt +++ b/source/tutorial/manage-the-database-profiler.txt @@ -1,4 +1,5 @@ .. _database-profiler: +.. _database-profiling: ================= Database Profiler From 623bc24d50094119515a877c33cb6613e23e98a4 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:07:17 -0700 Subject: [PATCH 267/308] DOCS-15802 add details to $sample page (#6801) * DOCSP-15802 add details to sample page * DOCS-15802 updates for review feedback * DOCS-15802 updates for copy feedback --- source/reference/operator/aggregation/sample.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/reference/operator/aggregation/sample.txt b/source/reference/operator/aggregation/sample.txt index 00f038d5f1e..76136853b25 100644 --- a/source/reference/operator/aggregation/sample.txt +++ b/source/reference/operator/aggregation/sample.txt @@ -34,6 +34,17 @@ pseudo-random cursor to select the ``N`` documents: - :pipeline:`$sample` is the first stage of the pipeline. - ``N`` is less than 5% of the total documents in the collection. + + .. note:: + + You can't configure the threshold that :pipeline:`$sample` uses to + determine when to scan the entire collection. The thresholds is 5%. + If the size is greater than 5% of the total number of documents in + the collection, :pipeline:`$sample` performs a + :ref:`top-k ` sort by a generated random value. + The top-k sort could spill to disk if the sample documents are + larger than 100MB. + - The collection contains more than 100 documents. If any of the previous conditions are false, :pipeline:`$sample`: From 0bc40c56008b8dd0927d5b6256d3ca19b5640567 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:08:45 -0700 Subject: [PATCH 268/308] DOCS-15127 Remove support for authentication as multiple simultaneous users (#6854) * DOCS-15127 Remove support for authentication as multiple simultaneous users * DOCS-15127 updates for AH's feedback --- source/reference/command/logout.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/reference/command/logout.txt b/source/reference/command/logout.txt index fb4288e9230..38639ac71ea 100644 --- a/source/reference/command/logout.txt +++ b/source/reference/command/logout.txt @@ -17,16 +17,17 @@ Definition .. deprecated:: 5.0 - Attempting to use the :dbcommand:`logout` command will write an - error message to the log once per logout attempt. + If you enabled auditing, an attempt to use the :dbcommand:`logout` + command will create an entry in the audit log. This command will be removed in a future release. .. note:: - This command was used when you could log in as multiple users on a single physical connection. - Because this is no longer possible, running ``logout`` may cause connections to fail. - Going forward, you can achieve the same results by closing your connection. + This command was used when you could log in as multiple users on a + single logical connection. Because this is no longer possible, + running ``logout`` is no longer supported. Going forward, you can + achieve the same results by closing your connection. Compatibility ------------- From 1a626b516f510a7baec4a6d1ab9669c3e70791a7 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:09:33 -0700 Subject: [PATCH 269/308] DOCSP-34494 Document that startTransaction() is a no-op (#6905) --- source/reference/method/Session.startTransaction.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/reference/method/Session.startTransaction.txt b/source/reference/method/Session.startTransaction.txt index 70bd4dca020..bd6505bfe23 100644 --- a/source/reference/method/Session.startTransaction.txt +++ b/source/reference/method/Session.startTransaction.txt @@ -17,7 +17,14 @@ Definition Starts a :ref:`multi-document transaction ` associated with the session. At any given time, you can have at most - one open transaction for a session. + one open transaction for a session. + + .. note:: + + This operation is a no-op. The transaction won't start on the + server until the first command is sent on the session. Therefore, + the snapshot time of the transaction won't be set until the first + command is sent on the session. .. include:: /includes/transaction-support From b4de1089286c1d2fbe3a9b3f1999fca3dc53a8c8 Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:21:14 -0400 Subject: [PATCH 270/308] DOCS-14326 voting nodes in majority (#6924) --- source/core/replica-set-elections.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/core/replica-set-elections.txt b/source/core/replica-set-elections.txt index d66562ade1c..136ac1ce06c 100644 --- a/source/core/replica-set-elections.txt +++ b/source/core/replica-set-elections.txt @@ -123,11 +123,11 @@ Network Partition A :term:`network partition` may segregate a primary into a partition with a minority of nodes. When the primary detects that it can only see -a minority of nodes in the replica set, the primary steps down as -primary and becomes a secondary. Independently, a member in the -partition that can communicate with a :data:`majority -` of the nodes (including itself) -holds an election to become the new primary. +a minority of voting nodes in the replica set, the primary steps down +and becomes a secondary. Independently, a member in the partition that +can communicate with a :data:`majority +` of the voting nodes (including +itself) holds an election to become the new primary. Voting Members From 08bb4e3a1aee5d1522ec62714bf93844a3c0bdd4 Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:23:24 -0400 Subject: [PATCH 271/308] DOCSP-27214-sharding-release-note (#6887) * DOCSP-27214-sharding-release-note * Editorial feedback per review. * Adding glossary ref to 6.1 --- source/release-notes/6.0.txt | 19 +++++++++++++++++++ source/release-notes/6.1.txt | 8 ++++---- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/source/release-notes/6.0.txt b/source/release-notes/6.0.txt index 622a1e36038..c58a4430d8f 100644 --- a/source/release-notes/6.0.txt +++ b/source/release-notes/6.0.txt @@ -630,6 +630,25 @@ To configure the audit log, see Sharding -------- +.. _release-notes-6.0-balancing-policy-changes: + +Balancing Policy Changes +~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting in MongoDB 6.0.3, data in sharded clusters is distributed based on data +size rather than number of chunks. Be aware of the following significant changes +in sharded cluster data distribution behavior: + +- The balancer distributes ranges of data rather than chunks. The balancing + policy looks for evenness of data distribution rather than chunk distribution. + +- Chunks are not subject to auto-splitting. Instead, chunks are split only when + moved across shards. + +- A chunk is now referred to as a :term:`range`. + +- ``moveRange`` has replaced ``moveChunk``. + Default Chunk Size Increased from 64 MB to 128 MB ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/release-notes/6.1.txt b/source/release-notes/6.1.txt index c996e63aa86..5ebfe15bfed 100644 --- a/source/release-notes/6.1.txt +++ b/source/release-notes/6.1.txt @@ -122,9 +122,9 @@ General Changes Balancing Policy Changes ~~~~~~~~~~~~~~~~~~~~~~~~ -Starting in MongoDB 6.1, data in sharded clusters is distributed based on data -size rather than number of chunks. As a result, you should be aware of the -following significant changes in sharded cluster data distribution behavior: +Starting in MongoDB 6.1 (and 6.0.3), data in sharded clusters is distributed based +on data size rather than number of chunks. Be aware of the following significant +changes in sharded cluster data distribution behavior: - The balancer distributes ranges of data rather than chunks. The balancing policy looks for evenness of data distribution rather than chunk distribution. @@ -132,7 +132,7 @@ following significant changes in sharded cluster data distribution behavior: - Chunks are not subject to auto-splitting. Instead, chunks are split only when moved across shards. -- A chunk is now referred to as a range. +- A chunk is now referred to as a :term:`range`. - ``moveRange`` has replaced ``moveChunk``. From 1f1e8175b6c6b4f839c04ccd8767f1c64d557eb7 Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:50:39 -0500 Subject: [PATCH 272/308] DOCSP-34751 Clarifies STARTUP2 vote (#6676) * DOCSP-34751 Clarifies STARTUP2 vote * Fixes per Kaitlin --- source/includes/replica-states.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/includes/replica-states.rst b/source/includes/replica-states.rst index b23356cb6f2..76d0f583b48 100644 --- a/source/includes/replica-states.rst +++ b/source/includes/replica-states.rst @@ -38,8 +38,8 @@ * - 5 - :replstate:`STARTUP2` - - The member has joined the set and is running an initial sync. Not - eligible to vote. + - The member is running an initial sync. Eligible to vote, + except when newly added to the replica set. * - 6 - :replstate:`UNKNOWN` From 8003fb40a559ff65e9a1b21c5627853b2543577a Mon Sep 17 00:00:00 2001 From: Jordan Smith <45415425+jordan-smith721@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:51:23 -0700 Subject: [PATCH 273/308] Update Node QE Quickstart code (#6937) --- .../qe-tutorials/node/queryable-encryption-helpers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/includes/qe-tutorials/node/queryable-encryption-helpers.js b/source/includes/qe-tutorials/node/queryable-encryption-helpers.js index 543c13ee965..b2fb8a7ebc0 100644 --- a/source/includes/qe-tutorials/node/queryable-encryption-helpers.js +++ b/source/includes/qe-tutorials/node/queryable-encryption-helpers.js @@ -147,28 +147,28 @@ export async function getAutoEncryptionOptions( const tlsOptions = getKmipTlsOptions(); // start-kmip-encryption-options - const sharedLibraryPathOptions = { + const extraOptions = { cryptSharedLibPath: process.env.SHARED_LIB_PATH, // Path to your Automatic Encryption Shared Library }; const autoEncryptionOptions = { keyVaultNamespace, kmsProviders, - sharedLibraryPathOptions, + extraOptions, tlsOptions, }; // end-kmip-encryption-options return autoEncryptionOptions; } else { // start-auto-encryption-options - const sharedLibraryPathOptions = { + const extraOptions = { cryptSharedLibPath: process.env.SHARED_LIB_PATH, // Path to your Automatic Encryption Shared Library }; const autoEncryptionOptions = { keyVaultNamespace, kmsProviders, - sharedLibraryPathOptions, + extraOptions, }; // end-auto-encryption-options From ec4c419ea09b65d5535a8f8c64f0498f777d7e2a Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Fri, 22 Mar 2024 10:59:17 -0700 Subject: [PATCH 274/308] add $match to coalesce section (#6852) * add $match to coalesce section * rewording for clarity and fix formatting * updates from review * more rewording for clarity; rearrange explain output * review format changes * add note/link and (hopefully) fix code formatting * moar code formatting --- .../aggregation-pipeline-optimization.txt | 70 ++++++++++++------- 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/source/core/aggregation-pipeline-optimization.txt b/source/core/aggregation-pipeline-optimization.txt index 7156d362c09..bdaddb595dc 100644 --- a/source/core/aggregation-pipeline-optimization.txt +++ b/source/core/aggregation-pipeline-optimization.txt @@ -390,45 +390,67 @@ stage .. _agg-lookup-unwind-coalescence: -``$lookup`` + ``$unwind`` Coalescence -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``$lookup``, ``$unwind``, and ``$match`` Coalescence +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -When a :pipeline:`$unwind` immediately follows another -:pipeline:`$lookup`, and the :pipeline:`$unwind` operates on the ``as`` -field of the :pipeline:`$lookup`, the optimizer can coalesce the -:pipeline:`$unwind` into the :pipeline:`$lookup` stage. This avoids -creating large intermediate documents. +When :pipeline:`$unwind` immediately follows :pipeline:`$lookup`, and the +:pipeline:`$unwind` operates on the ``as`` field of the :pipeline:`$lookup`, +the optimizer coalesces the :pipeline:`$unwind` into the :pipeline:`$lookup` +stage. This avoids creating large intermediate documents. Furthermore, if +:pipeline:`$unwind` is followed by a :pipeline:`$match` on any ``as`` subfield +of the :pipeline:`$lookup`, the optimizer also coalesces the :pipeline:`$match`. For example, a pipeline contains the following sequence: .. code-block:: javascript + :copyable: false { - $lookup: { - from: "otherCollection", - as: "resultingArray", - localField: "x", - foreignField: "y" - } + $lookup: { + from: "otherCollection", + as: "resultingArray", + localField: "x", + foreignField: "y" + } }, - { $unwind: "$resultingArray"} + { $unwind: "$resultingArray" }, + { $match: { + "resultingArray.foo": "bar" + } + } -The optimizer can coalesce the :pipeline:`$unwind` stage into the -:pipeline:`$lookup` stage. If you run the aggregation with ``explain`` -option, the ``explain`` output shows the coalesced stage: +The optimizer coalesces the :pipeline:`$unwind` and :pipeline:`$match` stages +into the :pipeline:`$lookup` stage. If you run the aggregation with ``explain`` +option, the ``explain`` output shows the coalesced stages: .. code-block:: javascript + :copyable: false { - $lookup: { - from: "otherCollection", - as: "resultingArray", - localField: "x", - foreignField: "y", - unwinding: { preserveNullAndEmptyArrays: false } - } + $lookup: { + from: "otherCollection", + as: "resultingArray", + localField: "x", + foreignField: "y", + let: {}, + pipeline: [ + { + $match: { + "foo": { + "$eq": "bar" + } + } + } + ], + unwinding: { + "preserveNullAndEmptyArrays": false + } + } } +You can see this optimized pipeline in the :ref:`explain plan +`. + .. _sbe-pipeline-optimizations: |sbe-title| Pipeline Optimizations From a877fc097957138d6b031859a1e07f2723758078 Mon Sep 17 00:00:00 2001 From: John Williams <55147273+jwilliams-mongo@users.noreply.github.com> Date: Fri, 22 Mar 2024 12:59:57 -0500 Subject: [PATCH 275/308] DOCSP-37453: add missing monospace (#6878) --- source/reference/operator/aggregation/geoNear.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/operator/aggregation/geoNear.txt b/source/reference/operator/aggregation/geoNear.txt index 5363a788283..292e2ff3ffc 100644 --- a/source/reference/operator/aggregation/geoNear.txt +++ b/source/reference/operator/aggregation/geoNear.txt @@ -298,7 +298,7 @@ In this example: - The ``let`` option is used to set an array value of ``[-73.99279,40.719296]`` to the variable ``$pt``. -- ``$pt`` is specified as a let option to the ``near`` parameter in the +- ``$pt`` is specified as a ``let`` option to the ``near`` parameter in the ``$geoNear`` stage. .. code-block:: javascript From e3ab276e402a1661357cf3fe55832a989e522485 Mon Sep 17 00:00:00 2001 From: jocelyn-mendez1 <91144778+jocelyn-mendez1@users.noreply.github.com> Date: Sun, 24 Mar 2024 17:44:30 -0400 Subject: [PATCH 276/308] DOCSP-34283 Add resharding a collection with zones example (#6628) * DOCSP-34283 add reshard example * DOCSP-34283 nit changes * DOCSP-34283 nit change * DOCSP-34283 sarah feedback * DOCSP-34283 fix typo * DOCSP-34283 ratika feedback * DOCSP-34283 typo fix * DOCSP-34283 typo fix * DOCSP-34283 ratika feedback * DOCSP-34283 updates * DOCSP-34283 updates --- .../reference/method/sh.reshardCollection.txt | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/source/reference/method/sh.reshardCollection.txt b/source/reference/method/sh.reshardCollection.txt index 56fa7276ea6..f41db3da623 100644 --- a/source/reference/method/sh.reshardCollection.txt +++ b/source/reference/method/sh.reshardCollection.txt @@ -225,6 +225,62 @@ Example output: operationTime: Timestamp(1, 1624887947) } +Reshard a Collection with Zones +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Reshard a collection with zones when you need to adjust the distribution +of data across the shards in your cluster to meet changing requirements or +to improve performance. + +In the following example, the ``test.scores`` collection resides on ``shard0`` +and ``shard1``. The current shard key is ``{ _id: 1}``. + +.. procedure:: + :style: normal + + .. step:: Add shards to a new zone + + In this example, this zone is called ``NewZone``. + + .. code-block:: javascript + + sh.addShardToZone( “shard2”, ‘NewZone’ ) + sh.addShardToZone( “shard3”, ‘NewZone’ ) + + .. step:: Run ``sh.reshardCollection`` with the new zone information + + .. code-block:: javascript + + sh.reshardCollection( + "test.scores", + { "studentId": 1, "testId": 1}, + { zones: [ { + min: { "studentId": MinKey(), "testId": MinKey() }, + max: { "studentId": MaxKey(), "testId": MaxKey() }, + zone: "NewZone" } + ] + } ) + + The resharding operation adds the shards in zone ``NewZone`` as recipients. + The database primary shard is added as a recipient as a backstop for any + missing ranges in the zone definition. If there are no missing ranges, the + collection is cloned on shards in the "NewZone", such as ``shard2`` and + ``shard3`` in this example. ``sh.reshardCollection`` returns the following: + + .. code-block:: javascript + :copyable: false + + { + ok: 1, + '$clusterTime': { + clusterTime: Timestamp( { t: 1699484530, i: 54 } ), + signature: { + hash: Binary.createFromBase64( "90ApBDrSSi4XnCpV3OWIH4OGO0Y=", 0 ), + keyId: Long( "7296989036055363606" ) + } }, + operationTime: Timestamp( { t: 1699484530, i: 54 } ) + } + .. seealso:: :ref:`sharding-resharding` From bcf4c70601e05a1913f59565fcdb10209f3bde04 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:20:14 -0400 Subject: [PATCH 277/308] DOCSP-37891 Incorrectly Formatted Redirects (#6932) * DOCSP-37891 Incorrectly Formatted Redirects * change to 8.0 --- config/redirects | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/config/redirects b/config/redirects index d521b7f87bd..a4866e402de 100644 --- a/config/redirects +++ b/config/redirects @@ -1865,20 +1865,11 @@ raw: ${prefix}/v2.8/release-notes/2.8-changes -> ${base}/v3.0/release-notes/3.0/ [*]: ${prefix}/${version}/applications/drivers -> ${base}/drivers/ # DOCSP-33707 redirects for QE and CSFLE tutorials post-restructure -[v7.0-*]: -${prefix}/${version}/core/queryable-encryption/tutorials/aws/aws-automatic --> ${base}/${version}/core/queryable-encryption/overview-enable-qe -[v7.0-*]: -${prefix}/${version}/core/queryable-encryption/tutorials/azure/azure-automatic --> ${base}/${version}/core/queryable-encryption/overview-enable-qe -[v7.0-*]: -${prefix}/${version}/core/queryable-encryption/tutorials/gcp/gcp-automatic --> ${base}/${version}/core/queryable-encryption/overview-enable-qe -[v7.0-*]: -${prefix}/${version}/core/queryable-encryption/tutorials/kmip/kmip-automatic --> ${base}/${version}/core/queryable-encryption/overview-enable-qe -${prefix}/${version}/core/csfle/reference/compatibility --> ${base}/${version}/core/queryable-encryption/reference/compatibility +[v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/aws/aws-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe +[v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/azure/azure-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe +[v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/gcp/gcp-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe +[v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/kmip/kmip-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe +[v8.0-*]: ${prefix}/${version}/core/csfle/reference/compatibility -> ${base}/${version}/core/queryable-encryption/reference/compatibility # Redirects for 4.2 and greater From 4e15fe8b8b5a8eed94dbb6c556608e868dadeade Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Mon, 25 Mar 2024 15:23:54 -0400 Subject: [PATCH 278/308] DOCSP-37846 Finalize 7.3.0 Release Notes (#6902) --- snooty.toml | 4 ++-- source/index.txt | 2 -- source/introduction.txt | 2 -- source/release-notes.txt | 12 +++--------- source/release-notes/7.3-compatibility.txt | 2 -- source/release-notes/7.3.txt | 8 +++----- 6 files changed, 8 insertions(+), 22 deletions(-) diff --git a/snooty.toml b/snooty.toml index 05caf43fd7a..579ebfb5f6b 100644 --- a/snooty.toml +++ b/snooty.toml @@ -274,10 +274,10 @@ package-name-org = "mongodb-org" package-name-enterprise = "mongodb-enterprise" package-name = "mongodb" version = "7.3" -current-rapid-release = "7.2" +current-rapid-release = "7.3" latest-lts-version = "7.0" last-supported-version = "5.0" -release = "7.2.0" +release = "7.3.0" version-dev = "7.3" version-last = "6.0" pgp-version = "{+version+}" diff --git a/source/index.txt b/source/index.txt index 65830f88b69..b72f224b4d3 100644 --- a/source/index.txt +++ b/source/index.txt @@ -21,8 +21,6 @@ What is MongoDB? .. button:: Get started with MongoDB Atlas :uri: https://www.mongodb.com/cloud?tck=docs_server - .. include:: /includes/in-dev.rst - .. image:: /images/hero.png :alt: Homepage hero image diff --git a/source/introduction.txt b/source/introduction.txt index 52f45f7ba40..89c43a86b19 100644 --- a/source/introduction.txt +++ b/source/introduction.txt @@ -19,8 +19,6 @@ Introduction to MongoDB :depth: 1 :class: singlecol -.. include:: /includes/in-dev.rst - You can create a MongoDB database in the following environments: .. include:: /includes/fact-environments.rst diff --git a/source/release-notes.txt b/source/release-notes.txt index acb356f2ee8..802a05c9591 100644 --- a/source/release-notes.txt +++ b/source/release-notes.txt @@ -11,21 +11,14 @@ information on types of MongoDB releases, see To see changes in MongoDB releases, see the following release notes. -Upcoming Release -~~~~~~~~~~~~~~~~ - -.. include:: /includes/in-dev.rst - -- :ref:`release-notes-7.3` - Current Rapid Release ~~~~~~~~~~~~~~~~~~~~~ -(*7.2-series*) +(*7.3-series*) .. include:: /includes/rapid-release-short.rst -- :ref:`release-notes-7.2` +- :ref:`release-notes-7.3` Current Stable Release ~~~~~~~~~~~~~~~~~~~~~~ @@ -37,6 +30,7 @@ Current Stable Release Previous Rapid Releases ~~~~~~~~~~~~~~~~~~~~~~~ +- :ref:`release-notes-7.2` - :ref:`release-notes-7.1` Previous Stable Releases diff --git a/source/release-notes/7.3-compatibility.txt b/source/release-notes/7.3-compatibility.txt index c873b996bc5..3da44dec5b9 100644 --- a/source/release-notes/7.3-compatibility.txt +++ b/source/release-notes/7.3-compatibility.txt @@ -14,8 +14,6 @@ Compatibility Changes in MongoDB 7.3 .. _7.3-downgrade-incompatible: -.. include:: /includes/in-dev.rst - Backward-Incompatible Features ------------------------------ diff --git a/source/release-notes/7.3.txt b/source/release-notes/7.3.txt index c9476fe0277..0aec14a88ce 100644 --- a/source/release-notes/7.3.txt +++ b/source/release-notes/7.3.txt @@ -1,8 +1,8 @@ .. _release-notes-7.3: -================================================= -Release Notes for MongoDB 7.3 (Release Candidate) -================================================= +============================= +Release Notes for MongoDB 7.3 +============================= .. default-domain:: mongodb @@ -12,8 +12,6 @@ Release Notes for MongoDB 7.3 (Release Candidate) :depth: 1 :class: twocols -.. include:: /includes/in-dev.rst - General Changes --------------- From 6aa82390709da053e3cabfd83a56bd1ef6e92316 Mon Sep 17 00:00:00 2001 From: Matt Maville <150086858+mmaville-mdb@users.noreply.github.com> Date: Tue, 26 Mar 2024 10:32:41 -0400 Subject: [PATCH 279/308] DOCSP-38013 remove self referencing links page (#6958) * DOCSP-38013-Remove-self-referencing-links--page * Converting additional self-referential query directives to monospace. * Editorial per feedback. --- .../fact-hint-text-query-restriction.rst | 2 +- ...ural-sort-order-text-query-restriction.rst | 2 +- .../fact-text-search-phrase-and-term.rst | 2 +- source/includes/fact-text-search-score.rst | 4 +- .../list-text-search-restrictions-in-agg.rst | 6 +- source/reference/operator/query/text.txt | 80 +++++++++---------- 6 files changed, 48 insertions(+), 48 deletions(-) diff --git a/source/includes/fact-hint-text-query-restriction.rst b/source/includes/fact-hint-text-query-restriction.rst index 3f346990683..f5840275cd6 100644 --- a/source/includes/fact-hint-text-query-restriction.rst +++ b/source/includes/fact-hint-text-query-restriction.rst @@ -1,4 +1,4 @@ .. hint-and-text-query -If a query includes a :query:`$text` expression, you cannot use +If a query includes a ``$text`` expression, you cannot use :method:`~cursor.hint()` to specify which index to use for the query. diff --git a/source/includes/fact-natural-sort-order-text-query-restriction.rst b/source/includes/fact-natural-sort-order-text-query-restriction.rst index 2ce2ddf108f..adb76bc7a2f 100644 --- a/source/includes/fact-natural-sort-order-text-query-restriction.rst +++ b/source/includes/fact-natural-sort-order-text-query-restriction.rst @@ -1,2 +1,2 @@ You cannot specify :operator:`$natural` sort order if the query -includes a :query:`$text` expression. +includes a ``$text`` expression. diff --git a/source/includes/fact-text-search-phrase-and-term.rst b/source/includes/fact-text-search-phrase-and-term.rst index 21f105a51ad..a2c878e8bb7 100644 --- a/source/includes/fact-text-search-phrase-and-term.rst +++ b/source/includes/fact-text-search-phrase-and-term.rst @@ -1,3 +1,3 @@ -If the ``$search`` string of a :query:`$text` operation includes a phrase and +If the ``$search`` string of a ``$text`` operation includes a phrase and individual terms, text search only matches the documents that include the phrase. diff --git a/source/includes/fact-text-search-score.rst b/source/includes/fact-text-search-score.rst index a176429775e..b060cd2eedf 100644 --- a/source/includes/fact-text-search-score.rst +++ b/source/includes/fact-text-search-score.rst @@ -1,8 +1,8 @@ -The :query:`$text` operator assigns a score to each document that +The ``$text`` operator assigns a score to each document that contains the search term in the indexed fields. The score represents the relevance of a document to a given text search query. The score can be part of a |sort-object| specification as well as part of the projection expression. The ``{ $meta: "textScore" }`` expression -provides information on the processing of the :query:`$text` operation. +provides information on the processing of the ``$text`` operation. See |meta-object| for details on accessing the score for projection or sort. diff --git a/source/includes/list-text-search-restrictions-in-agg.rst b/source/includes/list-text-search-restrictions-in-agg.rst index 78c6ddb4de5..e4e76b7628b 100644 --- a/source/includes/list-text-search-restrictions-in-agg.rst +++ b/source/includes/list-text-search-restrictions-in-agg.rst @@ -1,9 +1,9 @@ -- The :pipeline:`$match` stage that includes a :query:`$text` must be +- The :pipeline:`$match` stage that includes a ``$text`` must be the **first** stage in the pipeline. -- A :query:`$text` operator can only occur once in the stage. +- A ``$text`` operator can only occur once in the stage. -- The :query:`$text` operator expression cannot appear in +- The ``$text`` operator expression cannot appear in :expression:`$or` or :expression:`$not` expressions. - The text search, by default, does not return the matching documents diff --git a/source/reference/operator/query/text.txt b/source/reference/operator/query/text.txt index fffc501b42b..770cecd2e2a 100644 --- a/source/reference/operator/query/text.txt +++ b/source/reference/operator/query/text.txt @@ -19,14 +19,14 @@ $text .. include:: /includes/extracts/fact-text-search-legacy-atlas.rst -This page describes :query:`$text` operator for self-managed deployments. +This page describes the ``$text`` operator for self-managed deployments. Definition ---------- .. query:: $text - :query:`$text` performs a text search on the content of the fields + ``$text`` performs a text search on the content of the fields indexed with a :ref:`text index `. Compatibility @@ -39,7 +39,7 @@ Compatibility Syntax ------ -A :query:`$text` expression has the following syntax: +A ``$text`` expression has the following syntax: .. code-block:: javascript @@ -52,7 +52,7 @@ A :query:`$text` expression has the following syntax: } } -The :query:`$text` operator accepts a text query document with the +The ``$text`` operator accepts a text query document with the following fields: .. |object-behavior| replace:: :ref:`text-query-operator-behavior` @@ -107,7 +107,7 @@ following fields: For more information, see :ref:`text-operator-diacritic-sensitivity`. -The :query:`$text` operator, by default, does *not* return results +The ``$text`` operator, by default, does *not* return results sorted in terms of the results' scores. For more information on sorting by the text search scores, see the :ref:`text-operator-text-score` documentation. @@ -120,35 +120,35 @@ Behavior Restrictions ~~~~~~~~~~~~ -- A query can specify, at most, one :query:`$text` expression. +- A query can specify, at most, one ``$text`` expression. -- The :query:`$text` query can not appear in :query:`$nor` expressions. +- The ``$text`` query can not appear in :query:`$nor` expressions. -- The :query:`$text` query can not appear in :query:`$elemMatch` query +- The ``$text`` query can not appear in :query:`$elemMatch` query expressions or :projection:`$elemMatch` projection expressions. -- To use a :query:`$text` query in an :query:`$or` expression, all +- To use a ``$text`` query in an :query:`$or` expression, all clauses in the :query:`$or` array must be indexed. - .. include:: /includes/fact-hint-text-query-restriction.rst - .. include:: /includes/fact-natural-sort-order-text-query-restriction.rst - .. |operation| replace:: :query:`$text` expression + .. |operation| replace:: ``$text`` expression - .. include:: /includes/fact-special-indexes-and-text.rst - .. include:: /includes/extracts/views-unsupported-text-search.rst -- :query:`$text` is unsupported for creating indexes using the +- ``$text`` is unsupported for creating indexes using the :ref:`Stable API ` V1. -If using the :query:`$text` operator in aggregation, the following +If using the ``$text`` operator in aggregation, the following restrictions also apply. .. include:: /includes/list-text-search-restrictions-in-agg.rst -.. |text-object| replace:: :query:`$text` +.. |text-object| replace:: ``$text`` .. |meta-object| replace:: :expression:`$meta` projection operator .. |sort-object| replace:: :method:`~cursor.sort()` method @@ -156,16 +156,16 @@ restrictions also apply. ~~~~~~~~~~~~~~~~~ In the ``$search`` field, specify a string of words that the -:query:`$text` operator parses and uses to query the :ref:`text index +``$text`` operator parses and uses to query the :ref:`text index `. -The :query:`$text` operator treats most punctuation +The ``$text`` operator treats most punctuation in the string as delimiters, except a hyphen-minus (``-``) that negates term or an escaped double quotes ``\"`` that specifies a phrase. .. note:: - The ``$search`` field for the :query:`$text` expression is different + The ``$search`` field for the ``$text`` expression is different than the :atlas:`$search aggregation stage ` provided by :atlas:`Atlas Search `. The ``$search`` aggregation @@ -192,7 +192,7 @@ For example, passed a ``$search`` string: "\"ssl certificate\" authority key" -The :query:`$text` operator searches for the phrase ``"ssl +The ``$text`` operator searches for the phrase ``"ssl certificate"``. .. note:: @@ -213,12 +213,12 @@ Prefixing a word with a hyphen-minus (``-``) negates a word: search will not match any documents. - A hyphenated word, such as ``pre-market``, is not a negation. If used - in a hyphenated word, :query:`$text` operator treats the hyphen-minus + in a hyphenated word, the ``$text`` operator treats the hyphen-minus (``-``) as a delimiter. To negate the word ``market`` in this instance, include a space between ``pre`` and ``-market``, i.e., ``pre -market``. -The :query:`$text` operator adds all negations to the query with the +The ``$text`` operator adds all negations to the query with the logical ``AND`` operator. Match Operation @@ -227,7 +227,7 @@ Match Operation Stop Words `````````` -The :query:`$text` operator ignores language-specific stop words, such +The ``$text`` operator ignores language-specific stop words, such as ``the`` and ``and`` in English. .. _match-operation-stemmed-words: @@ -236,7 +236,7 @@ Stemmed Words ````````````` For case insensitive and diacritic insensitive text searches, the -:query:`$text` operator matches on the complete *stemmed* word. So if a +``$text`` operator matches on the complete *stemmed* word. So if a document field contains the word ``blueberry``, a search on the term ``blue`` will not match. However, ``blueberry`` or ``blueberries`` will match. @@ -248,7 +248,7 @@ Case Sensitive Search and Stemmed Words For :ref:`case sensitive ` search (i.e. ``$caseSensitive: true``), if the suffix stem contains uppercase -letters, the :query:`$text` operator matches on the exact word. +letters, the ``$text`` operator matches on the exact word. .. _diacritic-sensitivity-and-stemming: @@ -257,7 +257,7 @@ Diacritic Sensitive Search and Stemmed Words For :ref:`diacritic sensitive ` search (i.e. ``$diacriticSensitive: true``), if the suffix stem -contains the diacritic mark or marks, the :query:`$text` operator +contains the diacritic mark or marks, the ``$text`` operator matches on the exact word. .. _text-operator-case-sensitivity: @@ -265,7 +265,7 @@ matches on the exact word. Case Insensitivity ~~~~~~~~~~~~~~~~~~ -The :query:`$text` operator defaults to the case insensitivity of the +The ``$text`` operator defaults to the case insensitivity of the :ref:`text ` index: - The version 3 :ref:`text index ` is @@ -286,19 +286,19 @@ Case Sensitive Search Process ````````````````````````````` When performing a case sensitive search (``$caseSensitive: true``) -where the ``text`` index is case insensitive, the :query:`$text` +where the ``text`` index is case insensitive, the ``$text`` operator: - First searches the ``text`` index for case insensitive and diacritic matches. - Then, to return just the documents that match the case of the search - terms, the :query:`$text` query operation includes an additional + terms, the ``$text`` query operation includes an additional stage to filter out the documents that do not match the specified case. For case sensitive search (i.e. ``$caseSensitive: true``), if -the suffix stem contains uppercase letters, the :query:`$text` operator +the suffix stem contains uppercase letters, the ``$text`` operator matches on the exact word. Specifying ``$caseSensitive: true`` may impact performance. @@ -312,7 +312,7 @@ Specifying ``$caseSensitive: true`` may impact performance. Diacritic Insensitivity ~~~~~~~~~~~~~~~~~~~~~~~ -The :query:`$text` operator defaults to the diacritic insensitivity of +The ``$text`` operator defaults to the diacritic insensitivity of the :ref:`text ` index: - The version 3 :ref:`text index ` is @@ -330,30 +330,30 @@ specify ``$diacriticSensitive: true``. Text searches against earlier versions of the ``text`` index are inherently diacritic sensitive and cannot be diacritic insensitive. As -such, the ``$diacriticSensitive`` option for the :query:`$text` +such, the ``$diacriticSensitive`` option for the ``$text`` operator has no effect with earlier versions of the ``text`` index. Diacritic Sensitive Search Process `````````````````````````````````` To perform a diacritic sensitive text search (``$diacriticSensitive: -true``) against a version 3 ``text`` index, the :query:`$text` operator: +true``) against a version 3 ``text`` index, the ``$text`` operator: - First searches the ``text`` index, which is diacritic insensitive. - Then, to return just the documents that match the diacritic marked - characters of the search terms, the :query:`$text` query operation + characters of the search terms, the ``$text`` query operation includes an additional stage to filter out the documents that do not match. Specifying ``$diacriticSensitive: true`` may impact performance. To perform a diacritic sensitive search against an earlier version of -the ``text`` index, the :query:`$text` operator searches the ``text`` +the ``text`` index, the ``$text`` operator searches the ``text`` index, which is diacritic sensitive. For diacritic sensitive search, if the suffix stem contains the -diacritic mark or marks, the :query:`$text` operator matches on the +diacritic mark or marks, the ``$text`` operator matches on the exact word. .. seealso:: @@ -422,7 +422,7 @@ the word: Match Any of the Search Terms ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If the search string is a space-delimited string, :query:`$text` +If the search string is a space-delimited string, the ``$text`` operator performs a logical ``OR`` search on each term and returns documents that contains any of the terms. @@ -496,7 +496,7 @@ Exclude Documents That Contain a Term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A *negated* term is a term that is prefixed by a minus sign ``-``. If -you negate a term, the :query:`$text` operator will exclude the +you negate a term, the ``$text`` operator will exclude the documents that contain those terms from the results. The following example searches for documents that contain the words @@ -522,7 +522,7 @@ The query returns the following documents: Search a Different Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use the optional ``$language`` field in the :query:`$text` expression +Use the optional ``$language`` field in the ``$text`` expression to specify a language that determines the list of stop words and the rules for the stemmer and tokenizer for the search string. @@ -544,7 +544,7 @@ The query returns the following documents: { "_id" : 5, "subject" : "Café Con Leche", "author" : "abc", "views" : 200 } { "_id" : 8, "subject" : "Cafe con Leche", "author" : "xyz", "views" : 10 } -The :query:`$text` expression can also accept the language by name, +The ``$text`` expression can also accept the language by name, ``spanish``. See :ref:`text-search-languages` for the supported languages. @@ -555,7 +555,7 @@ languages. Case and Diacritic Insensitive Search ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The :query:`$text` operator defers to the case and diacritic +The ``$text`` operator defers to the case and diacritic insensitivity of the ``text`` index. The version 3 ``text`` index is diacritic insensitive and expands its case insensitivity to include the Cyrillic alphabet as well as characters with diacritics. For details, @@ -645,7 +645,7 @@ Case Sensitivity with Negated Term `````````````````````````````````` A *negated* term is a term that is prefixed by a minus sign ``-``. If -you negate a term, the :query:`$text` operator will exclude the +you negate a term, the ``$text`` operator will exclude the documents that contain those terms from the results. You can also specify case sensitivity for negated terms. @@ -703,7 +703,7 @@ Diacritic Sensitivity with Negated Term The ``$diacriticSensitive`` option applies also to negated terms. A negated term is a term that is prefixed by a minus sign ``-``. If you -negate a term, the :query:`$text` operator will exclude the documents that +negate a term, the ``$text`` operator will exclude the documents that contain those terms from the results. The following query performs a diacritic sensitive text search for From cb833493c10a5b767dc265850b8120d48a658a51 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Tue, 26 Mar 2024 10:33:48 -0400 Subject: [PATCH 280/308] DOCS-16706 updating clustered collection behavior version (#6956) --- source/core/clustered-collections.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core/clustered-collections.txt b/source/core/clustered-collections.txt index ab16a5bbd3c..863a9b2cb28 100644 --- a/source/core/clustered-collections.txt +++ b/source/core/clustered-collections.txt @@ -81,12 +81,12 @@ from secondary indexes: collection size returned by the :dbcommand:`collStats` command includes the clustered index size. -Starting in MongoDB 6.2, if a usable clustered index exists, the MongoDB +Starting in MongoDB 6.0.7, if a usable clustered index exists, the MongoDB query planner evaluates the clustered index against secondary indexes in the query planning process. When a query uses a clustered index, MongoDB performs a :term:`bounded collection scan`. -Prior to MongoDB 6.2, if a :term:`secondary index ` +Prior to MongoDB 6.0.7, if a :term:`secondary index ` existed on a clustered collection and the secondary index was usable by your query, the query planner selected the secondary index instead of the clustered index by default. In MongoDB 6.1 and prior, to use the From fcaba2923b8c83a74bf8ea53fdcb24fde8c68aca Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Tue, 26 Mar 2024 10:37:21 -0400 Subject: [PATCH 281/308] DOCSP 24949 improve low selectivity example (#6626) * empty * DOCSP-24949 improve low-selectivity example * DOCSP-24949 improve low-selectivity example * DOCSP-24949 improve low-selectivity example * DOCSP-24949 improve low-selectivity example * DOCSP-24949 improve low-selectivity example * DOCSP-24949 copy edits and changing second example * DOCSP-24949 copy edits * DOCSP-24949 copy edits * DOCSP-24949 copy edits * DOCSP-24949 copy edits * DOCSP-24949 copy edits * DOCSP-24949 copy edits * DOCSP-24949 copy edits * DOCSP-24949 copy edits * DOCSP-24949 copy edits * DOCSP-24949 tech edits * DOCSP-24949 tech edits * DOCSP-24949 tech edits from asya and katya * DOCSP-24949 tech edits from asya and katya * DOCSP-24949 tech edits from asya and katya * DOCSP-24949 tech edits from asya and katya --- ...create-queries-that-ensure-selectivity.txt | 174 ++++++++++-------- 1 file changed, 96 insertions(+), 78 deletions(-) diff --git a/source/tutorial/create-queries-that-ensure-selectivity.txt b/source/tutorial/create-queries-that-ensure-selectivity.txt index 67142e7c76b..a32a036765a 100644 --- a/source/tutorial/create-queries-that-ensure-selectivity.txt +++ b/source/tutorial/create-queries-that-ensure-selectivity.txt @@ -1,8 +1,8 @@ .. _index-selectivity: -====================================== -Create Queries that Ensure Selectivity -====================================== +========================================== +Create Indexes to Ensure Query Selectivity +========================================== .. default-domain:: mongodb @@ -12,80 +12,98 @@ Create Queries that Ensure Selectivity :depth: 1 :class: singlecol -Selectivity is the ability of a query to narrow results using the index. -Effective indexes are more selective and allow MongoDB to use the index +Selectivity is the ability of a query to narrow results using indexes. +Effective queries are more selective and allow MongoDB to use indexes for a larger portion of the work associated with fulfilling the query. -To ensure selectivity, -write queries that limit the number of possible documents with the -indexed field. Write queries that are appropriately selective relative -to your indexed data. - -.. example:: - - Suppose you have a field called ``status`` where the possible values - are ``new`` and ``processed``. If you add an index on ``status`` - you've created a low-selectivity index. The index will - be of little help in locating records. - - A better strategy, depending on your queries, would be to create a - :ref:`compound index ` that includes the - low-selectivity field and another field. For example, you could - create a compound index on ``status`` and ``created_at.`` - - Another option, again depending on your use case, might be to use - separate collections, one for each status. - -.. example:: - - Consider an index ``{ a : 1 }`` (i.e. an index on the key ``a`` - sorted in ascending order) on a collection where ``a`` has three - values evenly distributed across the collection: - - .. code-block:: javascript - - { _id: ObjectId(), a: 1, b: "ab" } - { _id: ObjectId(), a: 1, b: "cd" } - { _id: ObjectId(), a: 1, b: "ef" } - { _id: ObjectId(), a: 2, b: "jk" } - { _id: ObjectId(), a: 2, b: "lm" } - { _id: ObjectId(), a: 2, b: "no" } - { _id: ObjectId(), a: 3, b: "pq" } - { _id: ObjectId(), a: 3, b: "rs" } - { _id: ObjectId(), a: 3, b: "tv" } - - If you query for ``{ a: 2, b: "no" }`` MongoDB must scan 3 - :term:`documents ` in the collection to return the one - matching result. Similarly, a query for ``{ a: { $gt: 1}, b: "tv" }`` - must scan 6 documents, also to return one result. - - Consider the same index on a collection where ``a`` has *nine* values - evenly distributed across the collection: - - .. code-block:: javascript - - { _id: ObjectId(), a: 1, b: "ab" } - { _id: ObjectId(), a: 2, b: "cd" } - { _id: ObjectId(), a: 3, b: "ef" } - { _id: ObjectId(), a: 4, b: "jk" } - { _id: ObjectId(), a: 5, b: "lm" } - { _id: ObjectId(), a: 6, b: "no" } - { _id: ObjectId(), a: 7, b: "pq" } - { _id: ObjectId(), a: 8, b: "rs" } - { _id: ObjectId(), a: 9, b: "tv" } - - If you query for ``{ a: 2, b: "cd" }``, MongoDB must scan only one - document to fulfill the query. The index and query are more selective - because the values of ``a`` are evenly distributed *and* the query - can select a specific document using the index. - - However, although the index on ``a`` is more selective, a query such - as ``{ a: { $gt: 5 }, b: "tv" }`` would still need to scan 4 - documents. - - .. todo:: is there an answer to that last "However" paragraph? - -If overall selectivity is low, and if MongoDB must read a number of -documents to return results, then some queries may perform faster -without indexes. To determine performance, see -:ref:`indexes-measuring-use`. +To ensure selectivity, write queries that limit the number of possible +documents with the indexed field or fields. Write queries that are +appropriately selective relative to your indexed data. + +Examples +-------- + +Selectivity with Many Common Values +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Consider a collection of documents that have the following form: + +.. code-block:: javascript + + { + status: "processed", + product_type: "electronics" + } + +In this example, the ``status`` of 99% of documents in the collection is +``processed``. If you add an index on ``status`` and query for documents +with the ``status`` of ``processed``, the index has low selectivity with +this query. However, if you want to query for documents that do **not** +have the ``status`` of ``processed``, this index has high selectivity +because the query only reads 1% of the index. + +Selectivity with Distributed Values +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Consider a collection of documents where the ``status`` field has three +values distributed across the collection: + +.. code-block:: javascript + + [ + { _id: ObjectId(), "status": "processed", "product_type": "electronics" }, + { _id: ObjectId(), "status": "processed", "product_type": "grocery" }, + { _id: ObjectId(), "status": "processed", "product_type": "household" }, + { _id: ObjectId(), "status": "pending", "product_type": "electronics" }, + { _id: ObjectId(), "status": "pending", "product_type": "grocery" }, + { _id: ObjectId(), "status": "pending", "product_type": "household" }, + { _id: ObjectId(), "status": "new", "product_type": "electronics" }, + { _id: ObjectId(), "status": "new", "product_type": "grocery" }, + { _id: ObjectId(), "status": "new", "product_type": "household" } + ] + +If you add an index on ``status`` and query for ``{ "status": "pending", +"product_type": "electronics" }``, MongoDB must read three index keys to +return the one matching result. Similarly, a query for ``{ "status": { +$in: ["processed", "pending"] }, "product_type" : "electronics" }`` must +read six documents to return the two matching documents. + +Consider the same index on a collection where ``status`` has *nine* +values distributed across the collection: + +.. code-block:: javascript + + [ + { _id: ObjectId(), "status": 1, "product_type": "electronics" }, + { _id: ObjectId(), "status": 2, "product_type": "grocery" }, + { _id: ObjectId(), "status": 3, "product_type": "household"}, + { _id: ObjectId(), "status": 4, "product_type": "electronics" }, + { _id: ObjectId(), "status": 5, "product_type": "grocery"}, + { _id: ObjectId(), "status": 6, "product_type": "household"}, + { _id: ObjectId(), "status": 7, "product_type": "electronics" }, + { _id: ObjectId(), "status": 8, "product_type": "grocery" }, + { _id: ObjectId(), "status": 9, "product_type": "household" } + ] + +If you query for ``{ "status": 2, "product_type": "grocery" }``, MongoDB +only reads one document to fulfill the query. The index and query are +more selective because there is only one matching document and the query +can select that specific document using the index. + +Although this example's query on ``status`` equality is more selective, +a query such as ``{ "status": { $gt: 5 }, "product_type": "grocery" }`` +would still need to read four documents. However, if you create a +compound index on ``product_type`` and ``status``, a query for ``{ +"status": { $gt: 5 }, "product_type": "grocery" }`` would only need to +read two documents. + +To improve selectivity, you can create a :ref:`compound index +` that narrows the documents that queries read. For +example, if you want to improve selectivity for queries on ``status`` +and ``product_type``, you could create a compound index on those two +fields. + +If MongoDB reads a high number of documents to return results, some +queries may perform faster without indexes. To determine performance, +see :ref:`indexes-measuring-use`. + From 5b0a574094ec3e1ca7a29c5d390ccd92ea9122ba Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:10:21 -0400 Subject: [PATCH 282/308] DOCSP-26465 Replace complete list of FAQs - downgrading (#6961) --- source/faq.txt | 2 ++ source/faq/diagnostics.txt | 5 +++-- source/reference/method/js-bulk.txt | 2 ++ source/release-notes/3.2.txt | 2 +- source/release-notes/5.0-downgrade-replica-set.txt | 2 ++ source/release-notes/5.0-downgrade-sharded-cluster.txt | 2 ++ source/release-notes/5.0-downgrade-standalone.txt | 2 ++ source/release-notes/5.0-upgrade-replica-set.txt | 2 +- source/release-notes/5.0-upgrade-sharded-cluster.txt | 2 +- source/release-notes/5.0-upgrade-standalone.txt | 2 +- source/release-notes/6.0-upgrade-replica-set.txt | 2 +- source/release-notes/6.0-upgrade-sharded-cluster.txt | 2 +- source/release-notes/6.0-upgrade-standalone.txt | 2 +- 13 files changed, 20 insertions(+), 9 deletions(-) diff --git a/source/faq.txt b/source/faq.txt index 2e52f5a981f..d8686571ddd 100644 --- a/source/faq.txt +++ b/source/faq.txt @@ -1,3 +1,5 @@ +.. _faq-manual: + ========================== Frequently Asked Questions ========================== diff --git a/source/faq/diagnostics.txt b/source/faq/diagnostics.txt index bf9d5a92435..230e1ea950c 100644 --- a/source/faq/diagnostics.txt +++ b/source/faq/diagnostics.txt @@ -16,8 +16,9 @@ This document provides answers to common diagnostic questions and issues. If you don't find the answer you're looking for, check -the :doc:`complete list of FAQs ` or post your question to the -`MongoDB Community `_. +the :ref:`complete list of FAQs ` or post your question to +the `MongoDB Community +`_. Where can I find information about a ``mongod`` process that stopped running unexpectedly? ------------------------------------------------------------------------------------------ diff --git a/source/reference/method/js-bulk.txt b/source/reference/method/js-bulk.txt index c49f4e49b81..485afe83841 100644 --- a/source/reference/method/js-bulk.txt +++ b/source/reference/method/js-bulk.txt @@ -1,3 +1,5 @@ +.. _js-bulk-methods: + ====================== Bulk Operation Methods ====================== diff --git a/source/release-notes/3.2.txt b/source/release-notes/3.2.txt index 4976d19d035..20b23a25307 100644 --- a/source/release-notes/3.2.txt +++ b/source/release-notes/3.2.txt @@ -1107,7 +1107,7 @@ additional CRUD methods that are consistent with the drivers' CRUD API: running :method:`Bulk.execute()` to execute the operations. MongoDB 3.2 deprecates :method:`Bulk()` and its associated - :doc:`methods `. + methods. * - :method:`db.collection.deleteMany()` - Equivalent to :method:`db.collection.remove()`. diff --git a/source/release-notes/5.0-downgrade-replica-set.txt b/source/release-notes/5.0-downgrade-replica-set.txt index 7e7dbf4bea4..2225d3494e6 100644 --- a/source/release-notes/5.0-downgrade-replica-set.txt +++ b/source/release-notes/5.0-downgrade-replica-set.txt @@ -1,3 +1,5 @@ +.. _5.0-downgrade-replica-set: + ================================================== Downgrade |newversion| Replica Set to |oldversion| ================================================== diff --git a/source/release-notes/5.0-downgrade-sharded-cluster.txt b/source/release-notes/5.0-downgrade-sharded-cluster.txt index 9a7de9f7dbd..16ab1aa6668 100644 --- a/source/release-notes/5.0-downgrade-sharded-cluster.txt +++ b/source/release-notes/5.0-downgrade-sharded-cluster.txt @@ -1,3 +1,5 @@ +.. _5.0-downgrade-sharded-cluster: + ====================================================== Downgrade |newversion| Sharded Cluster to |oldversion| ====================================================== diff --git a/source/release-notes/5.0-downgrade-standalone.txt b/source/release-notes/5.0-downgrade-standalone.txt index a92473cfbe6..4a27f3893be 100644 --- a/source/release-notes/5.0-downgrade-standalone.txt +++ b/source/release-notes/5.0-downgrade-standalone.txt @@ -1,3 +1,5 @@ +.. _5.0-downgrade-standalone: + ================================================= Downgrade |newversion| Standalone to |oldversion| ================================================= diff --git a/source/release-notes/5.0-upgrade-replica-set.txt b/source/release-notes/5.0-upgrade-replica-set.txt index 47db437999b..97d93a3e393 100644 --- a/source/release-notes/5.0-upgrade-replica-set.txt +++ b/source/release-notes/5.0-upgrade-replica-set.txt @@ -22,7 +22,7 @@ The following steps outline the procedure to upgrade a .. include:: /includes/upgrade-guidance-checklists.rst -.. |downgrading| replace:: :doc:`downgrading ` +.. |downgrading| replace:: :ref:`downgrading <5.0-downgrade-replica-set>` Prerequisites ------------- diff --git a/source/release-notes/5.0-upgrade-sharded-cluster.txt b/source/release-notes/5.0-upgrade-sharded-cluster.txt index 6247a5abca1..2e78e08a54b 100644 --- a/source/release-notes/5.0-upgrade-sharded-cluster.txt +++ b/source/release-notes/5.0-upgrade-sharded-cluster.txt @@ -22,7 +22,7 @@ to |newversion|. .. include:: /includes/upgrade-guidance-checklists.rst -.. |downgrading| replace:: :doc:`downgrading ` +.. |downgrading| replace:: :ref:`downgrading <5.0-downgrade-sharded-cluster>` Prerequisites diff --git a/source/release-notes/5.0-upgrade-standalone.txt b/source/release-notes/5.0-upgrade-standalone.txt index 17239a4661c..618cf3d0eec 100644 --- a/source/release-notes/5.0-upgrade-standalone.txt +++ b/source/release-notes/5.0-upgrade-standalone.txt @@ -20,7 +20,7 @@ Upgrade a Standalone to 5.0 The following steps outline the procedure to upgrade a standalone :binary:`~bin.mongod` from version |oldversion| to |newversion|. -.. |downgrading| replace:: :doc:`downgrading ` +.. |downgrading| replace:: :ref:`downgrading <5.0-downgrade-standalone>` .. include:: /includes/upgrade-guidance-checklists.rst diff --git a/source/release-notes/6.0-upgrade-replica-set.txt b/source/release-notes/6.0-upgrade-replica-set.txt index b7a97246323..2c21fc33eea 100644 --- a/source/release-notes/6.0-upgrade-replica-set.txt +++ b/source/release-notes/6.0-upgrade-replica-set.txt @@ -22,7 +22,7 @@ The following steps outline the procedure to upgrade a .. include:: /includes/upgrade-guidance-checklists.rst -.. |downgrading| replace:: :doc:`downgrading ` +.. |downgrading| replace:: :ref:`downgrading <6.0-downgrade-replica-set>` Prerequisites ------------- diff --git a/source/release-notes/6.0-upgrade-sharded-cluster.txt b/source/release-notes/6.0-upgrade-sharded-cluster.txt index 453639208c9..b39a724bd85 100644 --- a/source/release-notes/6.0-upgrade-sharded-cluster.txt +++ b/source/release-notes/6.0-upgrade-sharded-cluster.txt @@ -22,7 +22,7 @@ to |newversion|. .. include:: /includes/upgrade-guidance-checklists.rst -.. |downgrading| replace:: :doc:`downgrading ` +.. |downgrading| replace:: :ref:`downgrading <6.0-downgrade-sharded-cluster>` Prerequisites diff --git a/source/release-notes/6.0-upgrade-standalone.txt b/source/release-notes/6.0-upgrade-standalone.txt index 5c6b561ca67..dff3f854159 100644 --- a/source/release-notes/6.0-upgrade-standalone.txt +++ b/source/release-notes/6.0-upgrade-standalone.txt @@ -22,7 +22,7 @@ The following steps outline the procedure to upgrade a standalone .. include:: /includes/upgrade-guidance-checklists.rst -.. |downgrading| replace:: :doc:`downgrading ` +.. |downgrading| replace:: :ref:`downgrading <6.0-downgrade-standalone>` Prerequisites ------------- From 75b7ccd884ce4119a9c11a972b3c882d3518daee Mon Sep 17 00:00:00 2001 From: jocelyn-mendez1 <91144778+jocelyn-mendez1@users.noreply.github.com> Date: Tue, 26 Mar 2024 15:11:40 -0400 Subject: [PATCH 283/308] DOCSP-38046 fix typo (#6980) --- source/reference/command/serverStatus.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index da03d6a709e..aaf689b303f 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -687,7 +687,7 @@ primary: The :serverstatus:`electionMetrics.freezeTimeout` includes both the number of elections called and the number of elections that succeeded. - ..versionadded:: 4.2.1 + .. versionadded:: 4.2.1 .. serverstatus:: electionMetrics.numStepDownsCausedByHigherTerm From d7131d57848939b88b563288c88113086c593530 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Tue, 26 Mar 2024 14:00:58 -0700 Subject: [PATCH 284/308] DOCSP-37896-5.0.26-release-notes (#6986) * DOCSP-37896-5.0.26-release-notes * DOCSP-37896-5.0.26-release-notes * DOCSP-37896-5.0.26-release-notes --------- Co-authored-by: jason-price-mongodb --- source/includes/changelogs/releases/5.0.26.rst | 15 ++------------- source/release-notes/5.0.txt | 4 ++-- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/source/includes/changelogs/releases/5.0.26.rst b/source/includes/changelogs/releases/5.0.26.rst index f669456b594..e4e5dc6b49d 100644 --- a/source/includes/changelogs/releases/5.0.26.rst +++ b/source/includes/changelogs/releases/5.0.26.rst @@ -35,7 +35,6 @@ Internals sort pattern - :issue:`SERVER-72703` Downgrade $out's db lock to MODE_IX - :issue:`SERVER-75355` Improve explain with Queryable Encryption -- :issue:`SERVER-77559` Implement file system log handler for resmoke - :issue:`SERVER-79235` rolling_index_builds_interrupted.js checkLog relies on clearRawMongoProgramOutput - :issue:`SERVER-79286` Create a query knob @@ -47,8 +46,6 @@ Internals - :issue:`SERVER-81021` Improve index prefix heuristic by taking into account closed intervals - :issue:`SERVER-82476` Disable diagnostics latches by default -- :issue:`SERVER-84004` Add FCV gating to dots and dollars validation on - 5.0 - :issue:`SERVER-84336` Timeseries inserts can leave dangling BSONObj in WriteBatches in certain cases - :issue:`SERVER-84612` Define a version for immer @@ -56,8 +53,6 @@ Internals - :issue:`SERVER-85534` Checkpoint the vector clock after committing shard collection - :issue:`SERVER-85633` Add lock around res_ninit call -- :issue:`SERVER-85721` Point evergreen task log lobster links to - Parsley - :issue:`SERVER-85843` A write operation may fail with NamespaceNotFound if the database has been concurrently dropped (sharding-only) @@ -67,6 +62,7 @@ Internals Valgrind is licensed under BSD-4-Clause - :issue:`SERVER-86017` Backport multi-planner tie breaking improvements to v6.0 +- :issue:`SERVER-86214` add all bazel-* output dirs to git ignore - :issue:`SERVER-86388` Remove fle_drivers_integration.js test from 6.0 - :issue:`SERVER-86395` Investigate DuplicateKey error while recovering convertToCapped from stable checkpoint @@ -76,18 +72,13 @@ Internals - :issue:`SERVER-86562` Backport multi-planner tie breaking improvements to v5.0 - :issue:`SERVER-86619` Document::shouldSkipDeleted() accesses string - without checking for missingg + without checking for missing string - :issue:`SERVER-86622` Resharding coordinator use possibly stale database info - :issue:`SERVER-86632` plan_cache_drop_database.js should catch DatabaseDropPending errors - :issue:`SERVER-86717` Resharding should validate user provided zone range doesn't include $-prefixed fields. -- :issue:`SERVER-86774` Increase oplog size for PIT (point in time - restore) tests -- :issue:`SERVER-86782` geo_axis_aligned.js takes too long -- :issue:`SERVER-86973` Add debug log around helloResponse and - splitHorizon - :issue:`SERVER-87198` [5.0] Make shard registry reads fallback to majority readConcern if snapshot reads fail - :issue:`SERVER-87224` Enable diagnostic latching in test variants on @@ -104,8 +95,6 @@ Internals - :issue:`SERVER-87626` [v5.0] Add san_options to buildvariant config - :issue:`SERVER-87653` Prevent latch_analyzer.js from being run as part of the parallelTester -- :issue:`SERVER-87881` Exclude latch analysis testing from certain - buildvariants in v5.0 - :issue:`WT-9057` Null address read in compact walk - :issue:`WT-12077` Incorrect hardware checksum calculation on zSeries for buffers on stack diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index 043ad317016..0b639b7e58f 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -57,8 +57,8 @@ Patch Releases .. _5.0.26-release-notes: -5.0.26 - Upcoming -~~~~~~~~~~~~~~~~~ +5.0.26 - Mar 26, 2024 +~~~~~~~~~~~~~~~~~~~~~ - :issue:`SERVER-68128` Exceptions thrown while generating command response lead to network error From 61400d716cff9c57fdade5b16c0a6e0fc652db04 Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Wed, 27 Mar 2024 08:47:52 -0500 Subject: [PATCH 285/308] DOCS-16564 writeConcernErrors (#5776) * DOCS-16564 writeConcernError on mongos * Adds include to other commands * Edits substitution * Minor edits * fixes minor issue * Adds facets * Minor edits * Fixes per Joe * Fixes per Brett * Fixes per Brett * Renames file --- .../includes/fact-bulk-writeConcernError-mongos.rst | 11 +++++++++++ source/includes/fact-writeConcernError-mongos.rst | 11 +++++++++++ source/reference/command/delete.txt | 12 ++++++++++-- source/reference/command/insert.txt | 12 ++++++++++-- source/reference/command/update.txt | 12 ++++++++++-- source/reference/method/BulkWriteResult.txt | 12 ++++++++++-- source/reference/method/WriteResult.txt | 10 ++++++++-- 7 files changed, 70 insertions(+), 10 deletions(-) create mode 100644 source/includes/fact-bulk-writeConcernError-mongos.rst create mode 100644 source/includes/fact-writeConcernError-mongos.rst diff --git a/source/includes/fact-bulk-writeConcernError-mongos.rst b/source/includes/fact-bulk-writeConcernError-mongos.rst new file mode 100644 index 00000000000..9ad10d31113 --- /dev/null +++ b/source/includes/fact-bulk-writeConcernError-mongos.rst @@ -0,0 +1,11 @@ + +.. versionchanged:: 7.1 + + When |cmd| is received from :program:`mongos`, write concern + errors are always reported, even when one or more write + errors occur. + + In previous releases, the occurrence of write errors could + cause the |cmd| to not report write concern errors. + + diff --git a/source/includes/fact-writeConcernError-mongos.rst b/source/includes/fact-writeConcernError-mongos.rst new file mode 100644 index 00000000000..7a10ebfcfc8 --- /dev/null +++ b/source/includes/fact-writeConcernError-mongos.rst @@ -0,0 +1,11 @@ + +.. versionchanged:: 7.1 + + When |cmd| executes on :program:`mongos`, write concern + errors are always reported, even when one or more write + errors occur. + + In previous releases, the occurrence of write errors could + cause the |cmd| to not report write concern errors. + + diff --git a/source/reference/command/delete.txt b/source/reference/command/delete.txt index bb238b9e87e..4a43c065044 100644 --- a/source/reference/command/delete.txt +++ b/source/reference/command/delete.txt @@ -4,6 +4,10 @@ delete .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -479,8 +483,12 @@ The returned document contains a subset of the following fields: .. data:: delete.writeConcernError - Document that describe error related to write concern and contains - the fields: + Document describing errors that relate to the write concern. + + .. |cmd| replace:: :dbcommand:`delete` + .. include:: /includes/fact-writeConcernError-mongos + + The ``writeConcernError`` documents contian the following fields: .. data:: delete.writeConcernError.code diff --git a/source/reference/command/insert.txt b/source/reference/command/insert.txt index 54869b957a7..fe394c5569a 100644 --- a/source/reference/command/insert.txt +++ b/source/reference/command/insert.txt @@ -4,6 +4,10 @@ insert .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -325,8 +329,12 @@ The returned document contains a subset of the following fields: .. data:: insert.writeConcernError - Document that describe error related to write concern and contains - the field: + Document describing errors that relate to the write concern. + + .. |cmd| replace:: :dbcommand:`insert` + .. include:: /includes/fact-writeConcernError-mongos + + The ``writeConcernError`` documents contain the following fields: .. data:: insert.writeConcernError.code diff --git a/source/reference/command/update.txt b/source/reference/command/update.txt index fd63e72bee4..04cc7202f14 100644 --- a/source/reference/command/update.txt +++ b/source/reference/command/update.txt @@ -4,6 +4,10 @@ update .. default-domain:: mongodb +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -1236,8 +1240,12 @@ The returned document contains a subset of the following fields: .. data:: update.writeConcernError - Document that describe error related to write concern and contains - the field: + Document describing errors that relate to the write concern. + + .. |cmd| replace:: :dbcommand:`update` + .. include:: /includes/fact-writeConcernError-mongos + + The ``writeConcernError`` documents contain the following fields: .. data:: update.writeConcernError.code diff --git a/source/reference/method/BulkWriteResult.txt b/source/reference/method/BulkWriteResult.txt index 9bb2e256062..dd84d48a936 100644 --- a/source/reference/method/BulkWriteResult.txt +++ b/source/reference/method/BulkWriteResult.txt @@ -6,6 +6,10 @@ BulkWriteResult() .. default-domain:: mongodb +.. facet:: + :name: programming_language + :values: shell + .. contents:: On this page :local: :backlinks: none @@ -129,8 +133,12 @@ property with the following fields: .. data:: writeConcernError - Document that describes the error related to write concern and - contains the fields: + Document describing errors that relate to the write concern. + + .. |cmd| replace:: :method:`BulkWriteResult` + .. include:: /includes/fact-bulk-writeConcernError-mongos + + The ``writeConcernError`` documents contains the following fields: .. data:: writeConcernError.code diff --git a/source/reference/method/WriteResult.txt b/source/reference/method/WriteResult.txt index 85fd3f11522..9eac52c9841 100644 --- a/source/reference/method/WriteResult.txt +++ b/source/reference/method/WriteResult.txt @@ -4,6 +4,10 @@ WriteResult() .. default-domain:: mongodb +.. facet:: + :name: programming_language + :values: shell + .. contents:: On this page :local: :backlinks: none @@ -98,8 +102,10 @@ The :method:`WriteResult` has the following properties: .. data:: WriteResult.writeConcernError - A document that contains information regarding any write concern errors encountered - during the write operation. + Document describing errors that relate to the write concern. + + .. |cmd| replace:: :method:`WriteResult` + .. include:: /includes/fact-bulk-writeConcernError-mongos .. data:: WriteResult.writeConcernError.code From 51f381543dcd8ecbc21c3988d6691abec1a3284f Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Wed, 27 Mar 2024 09:50:26 -0400 Subject: [PATCH 286/308] DOCS-16708 Comment Out 8.0 Redirects (#6964) --- config/redirects | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/redirects b/config/redirects index a4866e402de..6dece379ef3 100644 --- a/config/redirects +++ b/config/redirects @@ -1865,11 +1865,11 @@ raw: ${prefix}/v2.8/release-notes/2.8-changes -> ${base}/v3.0/release-notes/3.0/ [*]: ${prefix}/${version}/applications/drivers -> ${base}/drivers/ # DOCSP-33707 redirects for QE and CSFLE tutorials post-restructure -[v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/aws/aws-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe -[v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/azure/azure-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe -[v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/gcp/gcp-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe -[v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/kmip/kmip-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe -[v8.0-*]: ${prefix}/${version}/core/csfle/reference/compatibility -> ${base}/${version}/core/queryable-encryption/reference/compatibility +# [v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/aws/aws-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe +# [v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/azure/azure-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe +# [v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/gcp/gcp-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe +# [v8.0-*]: ${prefix}/${version}/core/queryable-encryption/tutorials/kmip/kmip-automatic -> ${base}/${version}/core/queryable-encryption/overview-enable-qe +# [v8.0-*]: ${prefix}/${version}/core/csfle/reference/compatibility -> ${base}/${version}/core/queryable-encryption/reference/compatibility # Redirects for 4.2 and greater From 0f92ab6735f850a8476455308aa5ccc692cc0dfb Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Wed, 27 Mar 2024 08:52:51 -0500 Subject: [PATCH 287/308] DOCSP-37082 Adds setAt text to Authentication Parameters (#6921) * DOCSP-37082 SetAt for Auth Parameters * Parameter updates * Parameter updates * Parameter updates --- source/reference/parameters.txt | 110 ++++++++++++++------------------ 1 file changed, 49 insertions(+), 61 deletions(-) diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 62e3008a762..1048622c5d1 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -73,8 +73,7 @@ Authentication Parameters .. include:: /includes/list-table-auth-mechanisms.rst - You can only set :parameter:`authenticationMechanisms` during - start-up. + .. include:: /includes/fact-startup-parameter For example, to specify both ``PLAIN`` and ``SCRAM-SHA-256`` as the authentication mechanisms, use the following command: @@ -130,6 +129,8 @@ Authentication Parameters .. include:: /includes/extracts/ssl-facts-see-more.rst + .. include:: /includes/fact-runtime-parameter + .. code-block:: bash db.adminCommand( { setParameter: 1, clusterAuthMode: "sendX509" } ) @@ -141,11 +142,7 @@ Authentication Parameters Specify ``0`` or ``false`` to disable localhost authentication bypass. Enabled by default. - :parameter:`enableLocalhostAuthBypass` is not available using - :dbcommand:`setParameter` database command. Use the - :setting:`setParameter` option in the configuration file or the - :option:`--setParameter ` option on the - command line. + .. include:: /includes/fact-startup-parameter See :ref:`localhost-exception` for more information. @@ -158,9 +155,7 @@ Authentication Parameters is valid before rotating to the next one. This parameter is intended primarily to facilitate authentication testing. - You can only set :parameter:`KeysRotationIntervalSec` during - start-up, and cannot change this setting with the - :dbcommand:`setParameter` database command. + .. include:: /includes/fact-startup-parameter .. parameter:: ldapForceMultiThreadMode @@ -489,9 +484,7 @@ Authentication Parameters :dbcommand:`validate` returns as many results as possible and warns that not all corruption might be reported because of the limit. - You can set :parameter:`maxValidateMemoryUsageMB` during startup, and - can change this setting using the :dbcommand:`setParameter` database - command. + .. include:: /includes/fact-runtime-startup-parameter .. parameter:: oidcIdentityProviders @@ -511,9 +504,7 @@ Authentication Parameters .. include:: /includes/fact-oidc-providers.rst - You can only set ``oidcIdentityProviders`` during startup in the - :setting:`configuration file ` or with the - ``--setParameter`` option on the command line. + .. include:: /includes/fact-startup-parameter .. parameter:: ocspEnabled @@ -523,10 +514,9 @@ Authentication Parameters The flag that enables or disables OCSP. - You can only set :parameter:`ocspEnabled` during startup in the - :setting:`configuration file ` or with the - ``--setParameter`` option on the command line. For example, the - following disables OCSP: + .. include:: /includes/fact-startup-parameter + + For example, the following disables OCSP: .. code-block:: bash @@ -585,9 +575,7 @@ Authentication Parameters cipher suites for use with TLS 1.3, use the :parameter:`opensslCipherSuiteConfig` parameter. - You can only set :parameter:`opensslCipherConfig` during start-up, - and cannot change this setting using the :dbcommand:`setParameter` - database command. + .. include:: /includes/fact-startup-parameter For version 4.2 and greater, the use of ``TLS`` options is preferred over ``SSL`` options. The TLS options have the same functionality as @@ -618,11 +606,10 @@ Authentication Parameters strings for use with TLS 1.2 or earlier, use the :parameter:`opensslCipherConfig` parameter. - You can only set :parameter:`opensslCipherSuiteConfig` during - start-up, and cannot change this setting using the - :dbcommand:`setParameter` database command. For example, the - following configures a :binary:`~bin.mongod` with a - :parameter:`opensslCipherSuiteConfig` cipher suite of + .. include:: /includes/fact-startup-parameter + + For example, the following configures a :binary:`~bin.mongod` + with a :parameter:`opensslCipherSuiteConfig` cipher suite of ``'TLS_AES_256_GCM_SHA384'`` for use with TLS 1.3: .. code-block:: bash @@ -659,9 +646,7 @@ Authentication Parameters not supported with Java 6 and 7 unless extended support has been purchased from Oracle. - You can only set :parameter:`opensslDiffieHellmanParameters` during - startup, and cannot change this setting using the - :dbcommand:`setParameter` database command. + .. include:: /includes/fact-startup-parameter If for performance reasons, you need to disable support for DHE cipher suites, use the :parameter:`opensslCipherConfig` parameter: @@ -679,6 +664,8 @@ Authentication Parameters Specify the path to the Unix Domain Socket of the ``saslauthd`` instance to use for proxy authentication. + .. include:: /includes/fact-startup-parameter + .. parameter:: saslHostName |both| @@ -691,9 +678,7 @@ Authentication Parameters :binary:`~bin.mongod` or :binary:`~bin.mongos` instance for any purpose beyond the configuration of SASL and Kerberos. - You can only set :parameter:`saslHostName` during start-up, and - cannot change this setting using the :dbcommand:`setParameter` - database command. + .. include:: /includes/fact-startup-parameter .. note:: @@ -717,9 +702,7 @@ Authentication Parameters principal name, on a per-instance basis. If unspecified, the default value is ``mongodb``. - MongoDB only permits setting :parameter:`saslServiceName` at - startup. The :dbcommand:`setParameter` command can not change - this setting. + .. include:: /includes/fact-startup-parameter :parameter:`saslServiceName` is only available in MongoDB Enterprise. @@ -744,6 +727,8 @@ Authentication Parameters existing passwords. The :parameter:`scramIterationCount` value must be ``5000`` or greater. + .. include:: /includes/fact-runtime-startup-parameter + For example, the following sets the :parameter:`scramIterationCount` to ``12000``. @@ -780,6 +765,8 @@ Authentication Parameters existing passwords. The :parameter:`scramSHA256IterationCount` value must be ``5000`` or greater. + .. include:: /includes/fact-runtime-startup-parameter + For example, the following sets the :parameter:`scramSHA256IterationCount` to ``20000``. @@ -810,6 +797,8 @@ Authentication Parameters .. include:: /includes/extracts/ssl-facts-see-more.rst + .. include:: /includes/fact-runtime-parameter + .. code-block:: bash db.adminCommand( { setParameter: 1, sslMode: "preferSSL" } ) @@ -834,6 +823,8 @@ Authentication Parameters upgrade to TLS/SSL ` to minimize downtime. + .. include:: /includes/fact-runtime-parameter + .. code-block:: bash db.adminCommand( { setParameter: 1, tlsMode: "preferTLS" } ) @@ -862,6 +853,8 @@ Authentication Parameters Use this parameter to rotate certificates when the new certificates have different attributes or extension values. + .. include:: /includes/fact-startup-parameter + .. parameter:: tlsOCSPStaplingTimeoutSecs Available for Linux. @@ -874,11 +867,10 @@ Authentication Parameters :parameter:`tlsOCSPStaplingTimeoutSecs` uses the :parameter:`tlsOCSPVerifyTimeoutSecs` value. - You can only set :parameter:`tlsOCSPStaplingTimeoutSecs` during - startup in the :setting:`configuration file ` or with - the ``--setParameter`` option on the command line. For example, the - following sets the :parameter:`tlsOCSPStaplingTimeoutSecs` to 20 - seconds: + .. include:: /includes/fact-startup-parameter + + For example, the following sets the + :parameter:`tlsOCSPStaplingTimeoutSecs` to 20 seconds: .. code-block:: bash @@ -902,11 +894,10 @@ Authentication Parameters Specify an integer greater than or equal to (``>=``) 1. - You can only set :parameter:`tlsOCSPVerifyTimeoutSecs` during - startup in the :setting:`configuration file ` or with - the ``--setParameter`` option on the command line. For example, the - following sets the :parameter:`tlsOCSPVerifyTimeoutSecs` to 20 - seconds: + .. include:: /includes/fact-startup-parameter + + For example, the following sets the + :parameter:`tlsOCSPVerifyTimeoutSecs` to 20 seconds: .. code-block:: bash @@ -933,10 +924,9 @@ Authentication Parameters .. include:: /includes/fact-ssl-tlsCAFile-tlsUseSystemCA.rst - You can set ``tlsUseSystemCA`` only during startup in the - :setting:`configuration file ` or with the ``--setParameter`` - option on the command line. For example, to set ``tlsUseSystemCA`` to - ``true``: + .. include:: /includes/fact-startup-parameter + + For example, to set ``tlsUseSystemCA`` to ``true``: .. code-block:: bash @@ -968,6 +958,8 @@ Authentication Parameters deployment. ``tlsWithholdClientCertificate`` is mutually exclusive with :option:`--clusterAuthMode x509 `. + .. include:: /includes/fact-startup-parameter + .. parameter:: tlsX509ClusterAuthDNOverride .. versionadded:: 4.2 @@ -1002,6 +994,8 @@ Authentication Parameters If set, you must set this parameter on all members of the deployment. + .. include:: /includes/fact-runtime-startup-parameter + You can use this parameter for a rolling update of certificates to new certificates that contain a new ``DN`` value. See :doc:`/tutorial/rotate-x509-membership-certificates`. @@ -1031,14 +1025,7 @@ Authentication Parameters This parameter has a minimum value of ``0``. - You can only set :parameter:`tlsX509ExpirationWarningThresholdDays` - during ``mongod/mongos`` startup using either: - - - The :setting:`setParameter` configuration setting, *or* - - - The :option:`mongod --setParameter ` / - :option:`mongos --setParameter ` command - line option. + .. include:: /includes/fact-startup-parameter See :ref:`4.4-rel-notes-certificate-expiration-warning` for more information on x.509 expiration warnings. @@ -1088,6 +1075,8 @@ Authentication Parameters This parameter has a minimum value of ``1`` second and a maximum value of ``86400`` seconds (24 hours). + .. include:: /includes/fact-runtime-startup-parameter + .. parameter:: authFailedDelayMs |both| @@ -1115,8 +1104,7 @@ Authentication Parameters A boolean flag that allows or disallows the retrieval of authorization roles from client x.509 certificates. - You can only set :parameter:`allowRolesFromX509Certificates` during - startup in the config file or on the command line. + .. include:: /includes/fact-startup-parameter General Parameters ~~~~~~~~~~~~~~~~~~ From 5996801cefe8e57e54ad183d3724ea2fa1509857 Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Wed, 27 Mar 2024 09:53:45 -0400 Subject: [PATCH 288/308] DOCSP-38060 fixes analyzeShardKey example (#6989) --- source/reference/command/analyzeShardKey.txt | 7 +- .../method/db.collection.analyzeShardKey.txt | 74 ++++++++++++++++++- 2 files changed, 76 insertions(+), 5 deletions(-) diff --git a/source/reference/command/analyzeShardKey.txt b/source/reference/command/analyzeShardKey.txt index cc2d666a715..2ff104e6b4e 100644 --- a/source/reference/command/analyzeShardKey.txt +++ b/source/reference/command/analyzeShardKey.txt @@ -1,4 +1,3 @@ -.. _analyzeShardKey-command: =============== analyzeShardKey @@ -172,12 +171,12 @@ This |analyzeShardKey| command provides metrics on the .. code-block:: javascript - use social - db.post.analyzeShardKey( + db.adminCommand( { + analyzeShardKey: "social.post", key: { lastName: 1 }, keyCharacteristics: true, - readWriteDistribution: false, + readWriteDistribution: false } ) diff --git a/source/reference/method/db.collection.analyzeShardKey.txt b/source/reference/method/db.collection.analyzeShardKey.txt index 3446a8527f4..56d5d5c41b5 100644 --- a/source/reference/method/db.collection.analyzeShardKey.txt +++ b/source/reference/method/db.collection.analyzeShardKey.txt @@ -77,7 +77,79 @@ For sample output, see :ref:`analyzeShardKey Output `. Examples -------- -For examples, see :ref:`analyzeShardKey Examples `. +.. |analyzeShardKey| replace:: ``db.collection.analyzeShardKey`` + +.. include:: /includes/analyzeShardKey-example-intro.rst + +.. note:: + + Before you run the |analyzeShardKey| method, read the + :ref:`supporting-indexes-ref` section. If you require supporting + indexes for the shard key you are analyzing, use the + :method:`db.collection.createIndex()` method to create the indexes. + +{ lastName: 1 } keyCharacteristics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This |analyzeShardKey| method provides metrics on the +``{ lastName: 1 }`` shard key on the ``social.post`` collection: + +.. code-block:: javascript + + use social + db.post.analyzeShardKey( + { lastName: 1 }, + { + keyCharacteristics: true, + readWriteDistribution: false + } + ) + +The output for this command is similar to the following: + +.. include:: /includes/analyzeShardKey-example1-output.rst + +{ userId: 1 } keyCharacteristics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This |analyzeShardKey| method provides metrics on the +``{ userId: 1 }`` shard key on the ``social.post`` collection: + +.. code-block:: javascript + + use social + db.post.analyzeShardKey( + { userId: 1 }, + { + keyCharacteristics: true, + readWriteDistribution: false + } + ) + +The output for this method is similar to the following: + +.. include:: /includes/analyzeShardKey-example2-output.rst + +{ userId: 1 } readWriteDistribution +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This |analyzeShardKey| command provides metrics on the +``{ userId: 1 }`` shard key on the ``social.post`` collection: + +.. code-block:: javascript + + use social + db.post.analyzeShardKey( + { userId: 1 }, + { + keyCharacteristics: false, + readWriteDistribution: true + } + ) + +The output for this method is similar to the following: + +.. include:: /includes/analyzeShardKey-example3-output.rst Learn More ---------- From 7e7f3b0c6bbf29a8017e9e5a954af3a88eb0a616 Mon Sep 17 00:00:00 2001 From: lmkerbey-mdb <105309825+lmkerbey-mdb@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:35:04 -0400 Subject: [PATCH 289/308] (DOCSP-36026) Add Atlas SP mongosh commands. (#7001) * (DOCSP-36026) Add Atlas SP mongosh commands. * (DOCSP-36026) Formatting fixes. * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) Various corrections to createStreamProcessor * (DOCSP-36026) Various fixes to create and list * (DOCSP-36026) Add ToC Page + various fixes * (DOCSP-36026) ToC fixes. * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) Fixes to sample * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) * (DOCSP-36026) Copy review. * (DOCSP-36026) --- snooty.toml | 1 + source/reference/method.txt | 63 ++++++ source/reference/method/js-atlas-streams.txt | 86 ++++++++ .../method/sp.createStreamProcessor.txt | 202 ++++++++++++++++++ .../method/sp.listStreamProcessors.txt | 198 +++++++++++++++++ source/reference/method/sp.process.txt | 198 +++++++++++++++++ source/reference/method/sp.processor.drop.txt | 69 ++++++ .../reference/method/sp.processor.sample.txt | 131 ++++++++++++ .../reference/method/sp.processor.start.txt | 67 ++++++ .../reference/method/sp.processor.stats.txt | 170 +++++++++++++++ source/reference/method/sp.processor.stop.txt | 68 ++++++ 11 files changed, 1253 insertions(+) create mode 100644 source/reference/method/js-atlas-streams.txt create mode 100644 source/reference/method/sp.createStreamProcessor.txt create mode 100644 source/reference/method/sp.listStreamProcessors.txt create mode 100644 source/reference/method/sp.process.txt create mode 100644 source/reference/method/sp.processor.drop.txt create mode 100644 source/reference/method/sp.processor.sample.txt create mode 100644 source/reference/method/sp.processor.start.txt create mode 100644 source/reference/method/sp.processor.stats.txt create mode 100644 source/reference/method/sp.processor.stop.txt diff --git a/snooty.toml b/snooty.toml index 579ebfb5f6b..a7bf1eddee1 100644 --- a/snooty.toml +++ b/snooty.toml @@ -154,6 +154,7 @@ toc_landing_pages = [ "/reference/inconsistency-type", "/reference/method", "/reference/method/js-atlas-search", + "/reference/method/js-atlas-streams", "/reference/method/js-bulk", "/reference/method/js-client-side-field-level-encryption", "/reference/method/js-collection", diff --git a/source/reference/method.txt b/source/reference/method.txt index 5bb19da9751..ba03a34c62d 100644 --- a/source/reference/method.txt +++ b/source/reference/method.txt @@ -34,6 +34,69 @@ Atlas Search Index Methods /reference/method/js-atlas-search +Atlas Stream Processing Methods +------------------------------------------------------ + +:atlas:`Atlas Stream Processors +` +let you perform aggregation operations against streams of +continuous data using the same data model and query API that +you use with at-rest data. + +Use the following methods to manage Stream Processors: + +.. important:: + + The following methods can only be run on deployments hosted on + :atlas:`MongoDB Atlas `. + +.. list-table:: + :widths: 30 70 + :header-rows: 1 + + * - Name + + - Description + + * - :method:`sp.createStreamProcessor()` + + - Creates a stream processor. + + * - :method:`sp.listStreamProcessors()` + + - Lists all existing stream processors on the current stream + processing instance. + + * - :method:`sp.process()` + + - Creates an ephemeral stream processor. + + * - :method:`sp.processor.drop()` + + - Deletes an existing stream processor. + + * - :method:`sp.processor.sample()` + + - Returns an array of sampled results from a currently running stream processor. + + * - :method:`sp.processor.start()` + + - Starts an existing stream processor. + + * - :method:`sp.processor.stats()` + + - Returns statistics summarizing an existing stream processor. + + * - :method:`sp.processor.stop()` + + - Stops a currently running stream processor. + +.. toctree:: + :titlesonly: + :hidden: + + /reference/method/js-atlas-streams + Collection ---------- diff --git a/source/reference/method/js-atlas-streams.txt b/source/reference/method/js-atlas-streams.txt new file mode 100644 index 00000000000..cde9e794591 --- /dev/null +++ b/source/reference/method/js-atlas-streams.txt @@ -0,0 +1,86 @@ +.. _doc-stream-methods: + +=============================== +Atlas Stream Processing Methods +=============================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +.. note:: ``mongosh`` Methods + + .. include:: /includes/fact-mongosh-shell-method-toc.rst + +:atlas:`Atlas Stream Processors +` +let you perform aggregation operations against streams of +continuous data using the same data model and query API that +you use with at-rest data. + +Use the following methods to manage Stream Processors + +.. important:: + + The following methods can only be run on deployments hosted on + :atlas:`MongoDB Atlas `. + +.. include:: /includes/extracts/methods-toc-explanation.rst + +.. list-table:: + :widths: 30 70 + :header-rows: 1 + + * - Name + + - Description + + * - :method:`sp.createStreamProcessor()` + + - Creates a stream processor. + + * - :method:`sp.listStreamProcessors()` + + - Lists all existing stream processors on the current stream + processing instance. + + * - :method:`sp.process()` + + - Creates an ephemeral stream processor. + + * - :method:`sp.processor.drop()` + + - Deletes an existing stream processor. + + * - :method:`sp.processor.sample()` + + - Returns an array of sampled results from a currently running stream processor. + + * - :method:`sp.processor.start()` + + - Starts an existing stream processor. + + * - :method:`sp.processor.stats()` + + - Returns statistics summarizing an existing stream processor. + + * - :method:`sp.processor.stop()` + + - Stops a currently running stream processor. + +.. toctree:: + :titlesonly: + :hidden: + + /reference/method/sp.createStreamProcessor + /reference/method/sp.listStreamProcessors + /reference/method/sp.process + /reference/method/sp.processor.drop + /reference/method/sp.processor.sample + /reference/method/sp.processor.start + /reference/method/sp.processor.stats + /reference/method/sp.processor.stop diff --git a/source/reference/method/sp.createStreamProcessor.txt b/source/reference/method/sp.createStreamProcessor.txt new file mode 100644 index 00000000000..e0c89f83504 --- /dev/null +++ b/source/reference/method/sp.createStreamProcessor.txt @@ -0,0 +1,202 @@ +========================== +sp.createStreamProcessor() +========================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Definition +----------- + +.. method:: sp.createStreamProcessor() + +.. versionadded:: 7.0 + + Creates a :atlas:`Stream Processor + ` on + the current :atlas:`Stream Processing Instance + `. + +Syntax +----------- + +The :method:`sp.createStreamProcessor()` method has the following +syntax: + +.. code-block:: json + + sp.createStreamProcessor( + , + [ + + ], + { + + } + ) + +Command Fields +--------------------------- + +``sp.createStreamProcessor()`` takes these fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 20 40 + + * - Field + - Type + - Necessity + - Description + + * - ``name`` + - string + - Required + - Logical name for the stream processor. This must be unique + within the stream processing instance. + + * - ``pipeline`` + - array + - Required + - :ref:`Stream aggregation pipeline ` you + want to apply to your streaming data. + + * - ``options`` + - object + - Optional + - Object defining various optional settings for your stream + processor. + + * - ``options.dlq`` + - object + - Conditional + - Object assigning a + :term:`dead letter queue` for your stream processing instance. + This field is necessary if you define the ``options`` field. + + * - ``options.dlq.connectionName`` + - string + - Conditional + - Label that identifies a connection in your + connection registry. This connection must reference an + Atlas cluster. This field is necessary if you define the + ``options.dlq`` field. + + * - ``options.dlq.db`` + - string + - Conditional + - Name of an Atlas database on the cluster specified + in ``options.dlq.connectionName``. This field is necessary if + you define the ``options.dlq`` field. + + * - ``options.dlq.coll`` + - string + - Conditional + - Name of a collection in the database specified in + ``options.dlq.db``. This field is necessary if you + define the ``options.dlq`` field. + + +Behavior +--------------- + +``sp.createStreamProcessor()`` creates a persistent, named stream +processor on the current stream processing instance. You can +initialize this stream processor with +:method:`sp.processor.start()`. If you try to create a stream +processor with the same name as an existing stream processor, +``mongosh`` will return an error. + +Access Control +------------------------ + +The user running ``sp.createStreamProcessor()`` must have the +:atlasrole:`atlasAdmin` role. + +Example +---------------- + +The following example creates a stream processor named ``solarDemo`` +which ingests data from the ``sample_stream_solar`` connection. The +processor excludes all documents where the value of the ``device_id`` +field is ``device_8``, passing the rest to a :atlas:`tumbling window +` with a 10-second +duration. Each window groups the documents it receives, then returns +various useful statistics of each group. The stream processor then +merges these records to ``solar_db.solar_coll`` over the ``mongodb1`` +connection. + +.. code-block:: json + :copyable: true + + sp.createStreamProcessor( + 'solarDemo', + [ + { + $source: { + connectionName: 'sample_stream_solar', + timeField: { + $dateFromString: { + dateString: '$timestamp' + } + } + } + }, + { + $match: { + $expr: { + $ne: [ + "$device_id", + "device_8" + ] + } + } + }, + { + $tumblingWindow: { + interval: { + size: NumberInt(10), + unit: "second" + }, + "pipeline": [ + { + $group: { + "_id": { "device_id": "$device_id" }, + "max_temp": { $max: "$obs.temp" }, + "max_watts": { $max: "$obs.watts" }, + "min_watts": { $min: "$obs.watts" }, + "avg_watts": { $avg: "$obs.watts" }, + "median_watts": { + $median: { + input: "$obs.watts", + method: "approximate" + } + } + } + } + ] + } + }, + { + $merge: { + into: { + connectionName: "mongodb1", + db: "solar_db", + coll: "solar_coll" + }, + on: ["_id"] + } + } + ] + ) + +Learn More +------------------ + +- :atlas:`Stream Aggregation ` +- :atlas:`Manage Stream Processors ` diff --git a/source/reference/method/sp.listStreamProcessors.txt b/source/reference/method/sp.listStreamProcessors.txt new file mode 100644 index 00000000000..1695a11b613 --- /dev/null +++ b/source/reference/method/sp.listStreamProcessors.txt @@ -0,0 +1,198 @@ +========================= +sp.listStreamProcessors() +========================= + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Definition +----------- + +.. method:: sp.listStreamProcessors() + +.. versionadded:: 7.0 + + Returns documents for each named + :atlas:`Stream Processor + ` on + the current :atlas:`Stream Processing Instance + `. Each + document provides descriptive information including the name, + current state, and pipeline of a stream processor. + +Syntax +----------- + +The :method:`sp.listStreamProcessors()` method has the following syntax: + +.. code-block:: json + + sp.listStreamProcessors( + { + + } + ) + + +Command Fields +--------------------------- + +``sp.listStreamProcessors()`` takes these fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 20 40 + + * - Field + - Type + - Necessity + - Description + + * - ``filter`` + - document + - Optional + - Document specifying which fields to filter stream processors + on. If you provide a filter, the command will only return + those processors which match the values for all + the fields you specify. + +Behavior +--------------- + +``sp.listStreamProcessors()`` returns documents describing all of +the named stream processors on the current stream processing instance +to ``STDOUT``. + +Access Control +------------------------ + +The user running ``sp.listStreamProcessors()`` must have the +:atlasrole:`atlasAdmin` role. + +Example +---------------- + +The following example shows an expected response from +``sp.listStreamProcessors()`` when the command is called without any +filter: + +.. io-code-block:: + :copyable: true + + .. input:: + :language: sh + + sp.listStreamProcessors() + + .. output:: + :language: json + :linenos: + + { + id: '0135', + name: "proc01", + last_modified: ISODate("2023-03-20T20:15:54.601Z"), + state: "RUNNING", + error_msg: '', + pipeline: [ + { + $source: { + connectionName: "myKafka", + topic: "stuff" + } + }, + { + $match: { + temperature: 46 + } + }, + { + $emit: { + connectionName: "mySink", + topic: "output", + } + } + ], + lastStateChange: ISODate("2023-03-20T20:15:59.442Z") + }, + { + id: '0218', + name: "proc02", + last_modified: ISODate("2023-03-21T20:17:33.601Z"), + state: "STOPPED", + error_msg: '', + pipeline: [ + { + $source: { + connectionName: "myKafka", + topic: "things" + } + }, + { + $match: { + temperature: 41 + } + }, + { + $emit: { + connectionName: "mySink", + topic: "results", + } + } + ], + lastStateChange: ISODate("2023-03-21T20:18:26.139Z") + } + +The following example shows an expected response if you invoke +``sp.listStreamProcessors()`` filtering for only those stream +processors with a ``state`` of ``running``. + +.. io-code-block:: + :copyable: true + + .. input:: + :language: sh + + sp.listStreamProcessors({"state": "running"}) + + .. output:: + :language: json + :linenos: + + { + id: '0135', + name: "proc01", + last_modified: ISODate("2023-03-20T20:15:54.601Z"), + state: "RUNNING", + error_msg: '', + pipeline: [ + { + $source: { + connectionName: "myKafka", + topic: "stuff" + } + }, + { + $match: { + temperature: 46 + } + }, + { + $emit: { + connectionName: "mySink", + topic: "output", + } + } + ], + lastStateChange: ISODate("2023-03-20T20:15:59.442Z") + } + +Learn More +------------------ + +- :atlas:`Manage Stream Processors ` diff --git a/source/reference/method/sp.process.txt b/source/reference/method/sp.process.txt new file mode 100644 index 00000000000..d5359a7342d --- /dev/null +++ b/source/reference/method/sp.process.txt @@ -0,0 +1,198 @@ +============ +sp.process() +============ + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Definition +----------- + +.. method:: sp.process() + +.. versionadded:: 7.0 + + Creates an ephemeral :atlas:`Stream Processor + ` on + the current :atlas:`Stream Processing Instance + `. + +Syntax +----------- + +The :method:`sp.process()` method has the following +syntax: + +.. code-block:: json + + sp.process( + [ + + ], + { + + } + ) + +Command Fields +--------------------------- + +``sp.createStreamProcessor()`` takes these fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 20 40 + + * - Field + - Type + - Necessity + - Description + + * - ``name`` + - string + - Required + - Logical name for the stream processor. This must be unique + within the stream processing instance. + + * - ``pipeline`` + - array + - Required + - :ref:`Stream aggregation pipeline ` you + want to apply to your streaming data. + + * - ``options`` + - object + - Optional + - Object defining various optional settings for your stream + processor. + + * - ``options.dlq`` + - object + - Conditional + - Object assigning a + :term:`dead letter queue` for your stream processing instance. + This field is necessary if you define the ``options`` field. + + * - ``options.dlq.connectionName`` + - string + - Conditional + - Label that identifies a connection in your + connection registry. This connection must reference an + Atlas cluster. This field is necessary if you define the + ``options.dlq`` field. + + * - ``options.dlq.db`` + - string + - Conditional + - Name of an Atlas database on the cluster specified + in ``options.dlq.connectionName``. This field is necessary if + you define the ``options.dlq`` field. + + * - ``options.dlq.coll`` + - string + - Conditional + - Name of a collection in the database specified in + ``options.dlq.db``. This field is necessary if you + define the ``options.dlq`` field. + +Behavior +--------------- + +``sp.process()`` creates an ephemeral, unnamed stream +processor on the current stream processing instance and immediately +initializes it. This stream processor only persists as long as it +runs. If you terminate an ephemeral stream processor, you must create +it again in order to use it. + +Access Control +------------------------ + +The user running ``sp.process()`` must have the +:atlasrole:`atlasAdmin` role. + +Example +---------------- + +The following example creates an ephemeral stream processor +which ingests data from the ``sample_stream_solar`` connection. The +processor excludes all documents where the value of the ``device_id`` +field is ``device_8``, passing the rest to a :atlas:`tumbling window +` with a 10-second +duration. Each window groups the documents it receives, then returns +various useful statistics of each group. The stream processor then +merges these records to ``solar_db.solar_coll`` over the ``mongodb1`` +connection. + +.. code-block:: json + :copyable: true + + sp.process( + [ + { + $source: { + connectionName: 'sample_stream_solar', + timeField: { + $dateFromString: { + dateString: '$timestamp' + } + } + } + }, + { + $match: { + $expr: { + $ne: [ + "$device_id", + "device_8" + ] + } + } + }, + { + $tumblingWindow: { + interval: { + size: NumberInt(10), + unit: "second" + }, + "pipeline": [ + { + $group: { + "_id": { "device_id": "$device_id" }, + "max_temp": { $max: "$obs.temp" }, + "max_watts": { $max: "$obs.watts" }, + "min_watts": { $min: "$obs.watts" }, + "avg_watts": { $avg: "$obs.watts" }, + "median_watts": { + $median: { + input: "$obs.watts", + method: "approximate" + } + } + } + } + ] + } + }, + { + $merge: { + into: { + connectionName: "mongodb1", + db: "solar_db", + coll: "solar_coll" + }, + on: ["_id"] + } + } + ] + ) + +Learn More +------------------ + +- :atlas:`Stream Aggregation ` +- :atlas:`Manage Stream Processors ` diff --git a/source/reference/method/sp.processor.drop.txt b/source/reference/method/sp.processor.drop.txt new file mode 100644 index 00000000000..12e90e1766b --- /dev/null +++ b/source/reference/method/sp.processor.drop.txt @@ -0,0 +1,69 @@ +=================== +sp.processor.drop() +=================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Definition +----------- + +.. method:: sp.processor.drop() + +.. versionadded:: 7.0 + + Deletes a named + :atlas:`Stream Processor + ` from + the current :atlas:`Stream Processing Instance + `. + +Syntax +----------- + +The :method:`sp.processor.drop()` method has the following +syntax: + +.. code-block:: json + + sp.processor.drop() + +Command Fields +--------------------------- + +``sp.processor.drop()`` takes no fields. + +Behavior +--------------- + +``sp.processor.drop()`` deletes the given named stream processor +from the current stream processing instance. If you invoke this +command on a currently running stream processor, it stops that +processor before deleting it. + +Access Control +------------------------ + +The user running ``sp.processor.drop()`` must have the +:atlasrole:`atlasAdmin` role. + +Example +---------------- + +The following example stops a stream processor named ``solarDemo`` + +.. code-block:: + :copyable: true + + sp.solarDemo.drop() + + +Learn More +------------------ + +- :atlas:`Manage Stream Processors ` diff --git a/source/reference/method/sp.processor.sample.txt b/source/reference/method/sp.processor.sample.txt new file mode 100644 index 00000000000..bef7739524a --- /dev/null +++ b/source/reference/method/sp.processor.sample.txt @@ -0,0 +1,131 @@ +===================== +sp.processor.sample() +===================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Definition +----------- + +.. method:: sp.processor.sample() + +.. versionadded:: 7.0 + + Returns arrays of sampled results from a currently running + :atlas:`Stream Processor + ` on + the current :atlas:`Stream Processing Instance + `. + +Syntax +----------- + +The :method:`sp.processor.sample()` method has the following syntax: + +.. code-block:: json + + sp.processor.sample() + +Command Fields +--------------------------- + +``sp.processor.sample()`` takes no fields. + +Behavior +--------------- + +``sp.processor.sample()`` returns arrays of sampled results +from the named, currently running stream processor to ``STDOUT``. This +command runs continuously until you cancel it using ``CTRL-C``, or until +the returned samples cumulatively reach ``40 MB``. + +Access Control +------------------------ + +The user running ``sp.processor.sample()`` must have the +:atlasrole:`atlasAdmin` role. + +Example +---------------- + +The following example shows an expected response from calling ``sp.solarDemo.sample()`` +to sample from a stream processor called ``solarDemo``: + +.. io-code-block:: + :copyable: true + + .. input:: + :language: sh + + sp.solarDemo.sample() + + .. output:: + :language: json + + { + _id: { + device_id: 'device_5' + }, + max_temp: 8, + max_watts: 66, + min_watts: 66, + avg_watts: 66, + median_watts: 66, + _stream_meta: { + windowStartTimestamp: ISODate('2024-03-19T22:09:10.000Z'), + windowEndTimestamp: ISODate('2024-03-19T22:09:20.000Z') + } + } + { + _id: { + device_id: 'device_0' + }, + max_temp: 18, + max_watts: 210, + min_watts: 68, + avg_watts: 157, + median_watts: 193, + _stream_meta: { + windowStartTimestamp: ISODate('2024-03-19T22:09:10.000Z'), + windowEndTimestamp: ISODate('2024-03-19T22:09:20.000Z') + } + } + { + _id: { + device_id: 'device_10' + }, + max_temp: 21, + max_watts: 128, + min_watts: 4, + avg_watts: 66, + median_watts: 4, + _stream_meta: { + windowStartTimestamp: ISODate('2024-03-19T22:09:10.000Z'), + windowEndTimestamp: ISODate('2024-03-19T22:09:20.000Z') + } + } + { + _id: { + device_id: 'device_9' + }, + max_temp: 10, + max_watts: 227, + min_watts: 66, + avg_watts: 131.4, + median_watts: 108, + _stream_meta: { + windowStartTimestamp: ISODate('2024-03-19T22:09:10.000Z'), + windowEndTimestamp: ISODate('2024-03-19T22:09:20.000Z') + } + } + +Learn More +------------------ + +- :atlas:`Manage Stream Processors ` diff --git a/source/reference/method/sp.processor.start.txt b/source/reference/method/sp.processor.start.txt new file mode 100644 index 00000000000..b96754a30af --- /dev/null +++ b/source/reference/method/sp.processor.start.txt @@ -0,0 +1,67 @@ +==================== +sp.processor.start() +==================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Definition +----------- + +.. method:: sp.processor.start() + +.. versionadded:: 7.0 + + Starts a named + :atlas:`Stream Processor + ` on + the current :atlas:`Stream Processing Instance + `. + +Syntax +----------- + +The :method:`sp.processor.start()` method has the following syntax: + +.. code-block:: json + + sp.processor.start() + + +Command Fields +--------------------------- + +``sp.processor.start()`` takes no fields. + +Behavior +--------------- + +``sp.processor.start()`` starts a named stream processor on the +current stream processing instance. The stream processor must be in a +``STOPPED`` state. If you invoke ``sp.processor.start()`` for a +stream processor that is not ``STOPPED``, ``mongosh`` will return an error. + +Access Control +------------------------ + +The user running ``sp.processor.start()`` must have the +:atlasrole:`atlasAdmin` role. + +Example +---------------- + +The following example starts a stream processor named ``solarDemo``. + +.. code-block:: sh + + sp.solarDemo.start() + +Learn More +------------------ + +- :atlas:`Manage Stream Processors ` diff --git a/source/reference/method/sp.processor.stats.txt b/source/reference/method/sp.processor.stats.txt new file mode 100644 index 00000000000..6da7ad037a4 --- /dev/null +++ b/source/reference/method/sp.processor.stats.txt @@ -0,0 +1,170 @@ +==================== +sp.processor.stats() +==================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Definition +----------- + +.. method:: sp.processor.stats() + +.. versionadded:: 7.0 + + Returns a document containing statistics of a currently running + :atlas:`Stream Processor + ` on + the current :atlas:`Stream Processing Instance + `. + +Syntax +----------- + +The :method:`sp.processor.stats()` method has the following syntax: + +.. code-block:: json + + sp.processor.stats() + +Command Fields +-------------- + +``sp.processor.stats()`` takes these fields: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 20 40 + + * - Field + - Type + - Necessity + - Description + + * - ``options`` + - object + - Optional + - Object defining various optional settings for your + statistics report. + + * - ``options.scale`` + - integer + - Optional + - Unit to use for the size of items described in the + output. If set to ``1024``, the output document shows sizes in + kibibytes. Defaults to bytes. + + * - ``verbose`` + - boolean + - Optional + - Flag that specifies the verbosity level of the output + document. If set to ``true``, the output document contains a + subdocument that reports the statistics of each individual + operator in your pipeline. Defaults to false. + +Behavior +--------------- + +``sp.processor.stats()`` returns a document containing statistics about +the specified stream processor to ``STDOUT``. These statistics include +but are not limited to: + +- The number of messages ingested and processed +- The total size of all input and output +- The amount of memory used to store processor state + +You can only invoke ``sp.processor.stats()`` on a currently running +stream processor. If you try to invoke this command on a stopped stream +processor, ``mongosh`` will return an error. + +Access Control +------------------------ + +The user running ``sp.processor.stats()`` must have the +:atlasrole:`atlasAdmin` role. + +Example +---------------- + +The following example shows an expected response from calling +``sp.solarDemo.stats()`` to get the statistics of a stream processor +called ``solarDemo``: + +.. io-code-block:: + :copyable: true + + .. input:: + :language: sh + + sp.solarDemo.stats() + + .. output:: + :language: json + + { + ok: 1, + ns: '6500aa277fdbdb6e443a992e.63c1928d768e39423386aa16.solarDemo', + stats: { + name: 'solarDemo', + processorId: '65f9fea5c5154385174af71e', + status: 'running', + scaleFactor: Long('1'), + inputMessageCount: Long('926'), + inputMessageSize: 410310, + outputMessageCount: Long('383'), + outputMessageSize: 425513, + dlqMessageCount: Long('0'), + dlqMessageSize: Long('0'), + stateSize: Long('4504'), + watermark: ISODate('2024-03-19T22:16:49.523Z'), + ok: 1 + }, + pipeline: [ + { + '$source': { + connectionName: 'sample_stream_solar', + timeField: { '$dateFromString': { dateString: '$timestamp' } } + } + }, + { + '$match': { '$expr': { '$ne': [ '$device_id', 'device_8' ] } } + }, + { + '$tumblingWindow': { + interval: { size: 10, unit: 'second' }, + pipeline: [ + { + '$group': { + _id: [Object], + max_temp: [Object], + max_watts: [Object], + min_watts: [Object], + avg_watts: [Object], + median_watts: [Object] + } + } + ] + } + }, + { + '$merge': { + into: { + connectionName: 'mongodb1', + db: 'solar_db', + coll: 'solar_coll' + }, + on: [ '_id' ] + } + } + ] + } + +Learn More +------------------ + +- :atlas:`Manage Stream Processors ` diff --git a/source/reference/method/sp.processor.stop.txt b/source/reference/method/sp.processor.stop.txt new file mode 100644 index 00000000000..3e404c2ac33 --- /dev/null +++ b/source/reference/method/sp.processor.stop.txt @@ -0,0 +1,68 @@ +=================== +sp.processor.stop() +=================== + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Definition +----------- + +.. method:: sp.processor.stop() + +.. versionadded:: 7.0 + + Stops a named + :atlas:`Stream Processor + ` on + the current :atlas:`Stream Processing Instance + `. + +Syntax +----------- + +The :method:`sp.processor.stop()` method has the following syntax: + +.. code-block:: sh + + sp.processor.stop() + + +Command Fields +--------------------------- + +``sp.processor.stop()`` takes no fields. + +Behavior +--------------- + +``sp.processor.stop()`` stops a named stream processor on the +current stream processing instance. The stream processor must be in a +``running`` state. If you invoke ``sp.processor.stop()`` for a +stream processor that is not ``running``, ``mongosh`` will return an error. + +Access Control +------------------------ + +The user running ``sp.processor.stop()`` must have the +:atlasrole:`atlasAdmin` role. + +Example +---------------- + +The following example stops a stream processor named ``solarDemo``. + +.. code-block:: + :copyable: true + + sp.solarDemo.stop() + +Learn More +------------------ + +- :atlas:`Manage Stream Processors ` From 84a4090aa9a0178e3bebcebabdc7e85b1fb28a9c Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:29:49 -0400 Subject: [PATCH 290/308] DOCSP-34750 fixes admonition on findOneAndUpdate (#5516) --- source/reference/method/db.collection.findOneAndUpdate.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/method/db.collection.findOneAndUpdate.txt b/source/reference/method/db.collection.findOneAndUpdate.txt index 87b1a70c7b6..f9e190a05fe 100644 --- a/source/reference/method/db.collection.findOneAndUpdate.txt +++ b/source/reference/method/db.collection.findOneAndUpdate.txt @@ -19,7 +19,7 @@ Definition .. method:: db.collection.findOneAndUpdate( filter, update, options ) - .. |dbcommand| replace:: :dbcommand:`update` command + .. |dbcommand| replace:: :dbcommand:`findAndModify` command .. include:: /includes/fact-mongosh-shell-method-alt Updates a single document based on the ``filter`` and From 4596ae08ca14f2c85f7de3cec40e479065c8c8e3 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Wed, 27 Mar 2024 16:35:31 -0400 Subject: [PATCH 291/308] (DOCS-16193): Mention non-guaranteed order of $accumulator (#7008) * (DOCS-16193): Mention non-guaranteed order of * review edits * formatting fix * wording * formatting fix * minimalism * add copyable false * wording * change heading level * nits --- .../operator/aggregation/accumulator.txt | 70 ++++++++++++++++--- 1 file changed, 62 insertions(+), 8 deletions(-) diff --git a/source/reference/operator/aggregation/accumulator.txt b/source/reference/operator/aggregation/accumulator.txt index ba3cac28af2..c474de0f73b 100644 --- a/source/reference/operator/aggregation/accumulator.txt +++ b/source/reference/operator/aggregation/accumulator.txt @@ -246,7 +246,13 @@ may need to merge two separate, intermediate states. The :ref:`merge ` function specifies how the operator should merge two states. -For example, :group:`$accumulator` may need to combine two states when: +The :ref:`merge ` function always merges two +states at a time. In the event that more than two states must be merged, +the resulting merge of two states is merged with a single state. This +process repeats until all states are merged. + +For example, :group:`$accumulator` may need to combine two states in the +following scenarios: - :group:`$accumulator` is run on a sharded cluster. The operator needs to merge the results from each shard to obtain the final @@ -259,16 +265,64 @@ For example, :group:`$accumulator` may need to combine two states when: Once the operation finishes, the results from disk and memory are merged together using the :ref:`merge ` function. - .. seealso:: +Document Processing Order +~~~~~~~~~~~~~~~~~~~~~~~~~ - :ref:`group-memory-limit` +The order that MongoDB processes documents for the ``init()``, +``accumulate()``, and ``merge()`` functions can vary, and might differ +from the order that those documents are specified to the +``$accumulator`` function. -.. note:: +For example, consider a series of documents where the ``_id`` fields are +the letters of the alphabet: + +.. code-block:: javascript + :copyable: false + + { _id: 'a' }, + { _id: 'b' }, + { _id: 'c' } + ... + { _id: 'z' } + +Next, consider an aggregation pipeline that sorts the documents by the +``_id`` field and then uses an ``$accumulator`` function to concatenate +the ``_id`` field values: + +.. code-block:: javascript + + [ + { + $sort: { _id: 1 } + }, + { + $group: { + _id: null, + alphabet: { + $accumulator: { + init: function() { + return "" + }, + accumulate: function(state, letter) { + return(state + letter) + }, + accumulateArgs: [ "$_id" ], + merge: function(state1, state2) { + return(state1 + state2) + }, + lang: "js" + } + } + } + } + ] + +MongoDB does not guarantee that the documents are processed in the +sorted order, meaning the ``alphabet`` field does not necessarily get +set to ``abc...z``. - The :ref:`merge ` function always merges two - states at a time. In the event that more than two states must be - merged, the resulting merge of two states is merged with a single - state. This process repeats until all states are merged. +Due to this behavior, ensure that your ``$accumulator`` function does +not need to process and return documents in a specific order. Javascript Enabled ~~~~~~~~~~~~~~~~~~ From fa010d8c30260e9b825f7ecee8849cbfb90f8a50 Mon Sep 17 00:00:00 2001 From: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> Date: Thu, 28 Mar 2024 11:26:54 -0400 Subject: [PATCH 292/308] DOCS-16693 Sharded Lookup Typo (#7029) * DOCS-16693 Sharded Lookup Typo * * * extra line --- source/reference/operator/aggregation/lookup.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/reference/operator/aggregation/lookup.txt b/source/reference/operator/aggregation/lookup.txt index b1ba0f4a93e..3132249147a 100644 --- a/source/reference/operator/aggregation/lookup.txt +++ b/source/reference/operator/aggregation/lookup.txt @@ -513,7 +513,8 @@ Starting in MongoDB 5.1, you can specify :ref:`sharded collections ` in the ``from`` parameter of :pipeline:`$lookup` stages. -.. include:: /includes/graphLookup-sharded-coll-transaction-note.rst +You **cannot** use the ``$lookup`` stage within a transaction while +targeting a sharded collection. |sbe-title| ~~~~~~~~~~~ From 375bef062a1d621bca36de39018729610dad9608 Mon Sep 17 00:00:00 2001 From: jocelyn-mendez1 <91144778+jocelyn-mendez1@users.noreply.github.com> Date: Thu, 28 Mar 2024 11:27:11 -0400 Subject: [PATCH 293/308] DOCSP-27249 Cluster Key index on id:1 (#6994) * DOCSP-27249 add cluster key limitation * DOCSP-27249 add cluster key limitation * DOCSP-27249 typo fix * DOCSP-27249 external feedback --- source/core/clustered-collections.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/core/clustered-collections.txt b/source/core/clustered-collections.txt index 863a9b2cb28..ee2ea99bf83 100644 --- a/source/core/clustered-collections.txt +++ b/source/core/clustered-collections.txt @@ -65,7 +65,8 @@ Behavior -------- Clustered collections store documents ordered by the :ref:`clustered -index ` key value. +index ` key value. The clustered +index key must be ``{ _id: 1 }``. You can only have one clustered index in a collection because the documents can be stored in only one order. Only collections with a @@ -99,6 +100,8 @@ Limitations Clustered collection limitations: +- The clustered index key must be ``{ _id: 1 }``. + - You cannot transform a non-clustered collection to a clustered collection, or the reverse. Instead, you can: @@ -110,8 +113,6 @@ Clustered collection limitations: - Export collection data with :binary:`~bin.mongodump` and import the data into another collection with :binary:`~bin.mongorestore`. -- The clustered index key must be on the ``_id`` field. - - You cannot hide a clustered index. See :doc:`Hidden indexes `. From b1d438f84464e24b6224ec6247cff30166ddb2e0 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Thu, 28 Mar 2024 08:29:29 -0700 Subject: [PATCH 294/308] DOCS-15936 fix fast counts behavior of the validate command (#6884) * DOCS-15936 fix fast counts behavior of the validate command * DOCS-15936 updates for AH's feedback * Apply suggestions from code review Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> * DOCS-15936 updates for AH's feedback * Apply suggestions from code review Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> * DOCS-15936 last round of edits --------- Co-authored-by: Alison Huh <112565127+ajhuh-mdb@users.noreply.github.com> --- source/reference/command/validate.txt | 29 ++++++++++++++++++- .../db.collection.estimatedDocumentCount.txt | 2 ++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/source/reference/command/validate.txt b/source/reference/command/validate.txt index 9c01310192a..1ef1a6ead0c 100644 --- a/source/reference/command/validate.txt +++ b/source/reference/command/validate.txt @@ -18,7 +18,10 @@ Definition .. dbcommand:: validate The :dbcommand:`validate` command checks a collection's data and - indexes for correctness and returns the results. + indexes for correctness and returns the results. If you don't run the + command in the :ref:`background `, the + command also repairs any inconsistencies in the count and data size + of a collection. .. |method| replace:: :method:`~db.collection.validate` helper method .. include:: /includes/fact-dbcommand-tip @@ -64,6 +67,7 @@ The command has the following syntax: repair: , // Optional, added in MongoDB 5.0 metadata: , // Optional, added in MongoDB 5.0.4 checkBSONConformance: // Optional, added in MongoDB 6.2 + background: // Optional } ) @@ -124,6 +128,16 @@ The command takes the following fields: .. include:: /includes/fact-validate-conformance.rst + * - ``background`` + - boolean + - .. _cmd-validate-background: + + *Optional*. If ``true``, MongoDB runs the ``validate`` command in the + background. If ``false``, the command repairs any inconsistencies + in the count and data size of a collection. + + The default is ``false``. + Behavior -------- @@ -175,6 +189,19 @@ Starting in MongoDB 6.0, the ``validate`` command returns a message if a :ref:`unique index ` has a key format that is incompatible. The message indicates an old format is used. +Count and Data Size Statistics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The :dbcommand:`validate` command updates the collection's count and +data size statistics in the :dbcommand:`collStats` :ref:`output +` with their correct values. + +.. note:: + + In the event of an :ref:`unclean shutdown + `, the count and data size + statistics might be inaccurate. + Examples -------- diff --git a/source/reference/method/db.collection.estimatedDocumentCount.txt b/source/reference/method/db.collection.estimatedDocumentCount.txt index 75d3456cb4a..4575b1990ee 100644 --- a/source/reference/method/db.collection.estimatedDocumentCount.txt +++ b/source/reference/method/db.collection.estimatedDocumentCount.txt @@ -77,6 +77,8 @@ Sharded Clusters On a sharded cluster, the resulting count will not correctly filter out :term:`orphaned documents `. +.. _estimated-document-count-unclean-shutdown: + Unclean Shutdown ~~~~~~~~~~~~~~~~ From 4a6453682b9b3b7ce0a2c7c708559782ff32f4b5 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Thu, 28 Mar 2024 08:29:39 -0700 Subject: [PATCH 295/308] DOCSP-21467 doc tlsOptions for for CSFLE connection (#6974) * DOCSP-21467 doc tlsOptions for for CSFLE connection * DOCSP-21467 updates for AH's feedback * Apply suggestions from code review Co-authored-by: Anna Henningsen --------- Co-authored-by: Anna Henningsen --- source/reference/method/Mongo.txt | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/source/reference/method/Mongo.txt b/source/reference/method/Mongo.txt index 4673626dcb6..853a32202a5 100644 --- a/source/reference/method/Mongo.txt +++ b/source/reference/method/Mongo.txt @@ -107,7 +107,8 @@ syntax: "keyVaultNamespace" : "", "kmsProviders" : , "schemaMap" : , - "bypassAutoEncryption" : + "bypassAutoEncryption" : , + "tlsOptions": } The ``{+auto-encrypt-options+}`` document takes the @@ -282,6 +283,13 @@ following parameters: encryption. This option is mutually exclusive with ``schemaMap``. If omitted, defaults to ``false``. + * - ``tlsOptions`` + - object + - *(Optional)* The path to the TLS client certificate and private key file in PEM format + (``tlsCertificateKeyFile``), TLS client certificate and private key file password + (``tlsCertificateKeyFilePassword``), or TLS certificate authority file + (``tlsCAFile``) to use to connect to the KMS in PEM format. To learn more + about these options, see :mongosh:`TLS Options `. .. _mongo-api-options: @@ -439,6 +447,23 @@ The specified automatic encryption rules encrypt the ``taxid`` and algorithm. Only clients configured for the correct KMS *and* access to the specified data encryption key can decrypt the field. +The following operation creates a new connection object from within a +:binary:`~bin.mongosh` session. The ``mongo.tlsOptions`` option enables +a connection using KMIP as the KMS provider: + +.. code-block:: javascript + + var csfleConnection = { + keyVaultNamespace: "encryption.__keyVault", + kmsProviders: { kmip: { endpoint: "kmip.example.com:123" } }, + tlsOptions: { kmip: { tlsCertificateKeyFile: "/path/to/client/cert-and-key-bundle.pem" } } + } + + cluster = Mongo( + "mongodb://mymongo.example.net:27017/?replicaSet=myMongoCluster", + csfleConnection + ); + See :doc:`/reference/method/js-client-side-field-level-encryption` for a complete list of client-side field level encryption methods. From a030acc7616887b0b04138eee7d038ab7730474b Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Thu, 28 Mar 2024 08:30:00 -0700 Subject: [PATCH 296/308] DOCSP-28264 update for feedback on TTL Indexes (#7023) --- source/core/index-ttl.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/core/index-ttl.txt b/source/core/index-ttl.txt index dabb0334110..67aa3bb9cb4 100644 --- a/source/core/index-ttl.txt +++ b/source/core/index-ttl.txt @@ -201,9 +201,8 @@ For example, if a bucket covers data up until ``2023-03-27T18:29:59Z`` and ``expireAfterSeconds`` is 300, the TTL index expires the bucket after ``2023-03-27T18:34:59Z``. -If the indexed field in a document is not a -:ref:`date ` or an array that holds one or -more date values, the document will not expire. +If the indexed field in a document doesn't contain one or more date +values, the document will not expire. If a document does not contain the indexed field, the document will not expire. From eaaae0932c75da0eab88f81c9ed54693ecc78388 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Thu, 28 Mar 2024 11:49:14 -0400 Subject: [PATCH 297/308] DOCSP-38000 Merge Capped Collections IA feature branch into master (#7033) * DOCS-15096 Capped collections landing page updates (#6079) * DOCS-15096 Capped collections landing page updates * move capped collections page and update snooty.toml * add facet * formatting * reorg * fix ref * update use cases * review edits * shuffle * wording * address review comments * paragraph split * typo * undo toc update * following > these * review edits * typo * wording * clarify update note * edit * (DOCSP-37995): Change max docs for capped collection (#6948) * (DOCSP-37995): Change max docs for capped collection * edit include * add ref link * add comma * (DOCSP-38002): Change byte size of a capped collection (#6953) * (DOCSP-38002): Change byte size of a capped collection * add unit * fix command * fix command * (DOCSP-38010): convert collection to capped (#6955) * (DOCSP-38010): convert collection to capped * typo * add copyable option * change learn more link * build error * add detail for db lock * edits * remove quotes around field name * (DOCSP-38019): Check if collection is capped (#6957) * (DOCSP-38019): Check if collection is capped * fix formatting for collection names * formatting * formatting * add page meta info * fix indentation * (DOCSP-38041): Create a capped collection (#6965) * (DOCSP-38041): Create a capped collection * edits * formatting * review edits * (DOCSP-38027): Query a capped collection (#6962) * (DOCSP-38027): Query a capped collection * add code block language * edits * add page metadata * typo * add natural order and use include * edits * formatting * add learn more * add step lead-in * review edits * add detail for multiple concurrent writes * add period * nit --- snooty.toml | 1 + source/core/capped-collections.txt | 311 ++++++------------ .../change-max-docs-capped-collection.txt | 62 ++++ .../change-size-capped-collection.txt | 59 ++++ .../check-if-collection-is-capped.txt | 65 ++++ .../convert-collection-to-capped.txt | 84 +++++ .../create-capped-collection.txt | 95 ++++++ .../query-capped-collection.txt | 176 ++++++++++ .../capped-collections/concurrent-writes.rst | 2 + .../query-natural-order.rst | 3 + .../capped-collections/use-ttl-index.rst | 8 + 11 files changed, 650 insertions(+), 216 deletions(-) create mode 100644 source/core/capped-collections/change-max-docs-capped-collection.txt create mode 100644 source/core/capped-collections/change-size-capped-collection.txt create mode 100644 source/core/capped-collections/check-if-collection-is-capped.txt create mode 100644 source/core/capped-collections/convert-collection-to-capped.txt create mode 100644 source/core/capped-collections/create-capped-collection.txt create mode 100644 source/core/capped-collections/query-capped-collection.txt create mode 100644 source/includes/capped-collections/concurrent-writes.rst create mode 100644 source/includes/capped-collections/query-natural-order.rst create mode 100644 source/includes/capped-collections/use-ttl-index.rst diff --git a/snooty.toml b/snooty.toml index a7bf1eddee1..a48c3b06aee 100644 --- a/snooty.toml +++ b/snooty.toml @@ -46,6 +46,7 @@ toc_landing_pages = [ "/core/authentication", "/core/authorization", "/core/backups", + "/core/capped-collections", "/core/crud", "/core/csfle", "/core/csfle/fundamentals/", diff --git a/source/core/capped-collections.txt b/source/core/capped-collections.txt index 4d5976c55b7..d8f0d3a146c 100644 --- a/source/core/capped-collections.txt +++ b/source/core/capped-collections.txt @@ -1,4 +1,5 @@ .. _manual-capped-collection: +.. _capped_collections_remove_documents: ================== Capped Collections @@ -12,271 +13,149 @@ Capped Collections :depth: 2 :class: singlecol -:term:`Capped collections ` are fixed-size -collections that support high-throughput operations that insert -and retrieve documents based on insertion order. Capped -collections work in a way similar to circular buffers: once a -collection fills its allocated space, it makes room for new documents -by overwriting the oldest documents in the collection. - -See :method:`~db.createCollection()` or :dbcommand:`create` -for more information on creating capped collections. - -As an alternative to capped collections, consider :ref:`TTL (Time To -Live) indexes `. TTL indexes allow you to expire and -remove data from normal collections based on the value of a date-typed -field and a TTL value for the index. You can also use a TTL index on a -capped collection to remove expired documents even if the capped -collection hasn't exceeded its size limit. For details, :ref:`ttl-collections`. - - -Behavior --------- - -Insertion Order -~~~~~~~~~~~~~~~ - -Capped collections guarantee preservation of the insertion order. As a -result, queries do not need an index to return documents in insertion -order. Without this indexing overhead, capped collections can support -higher insertion throughput. - -.. _capped_collections_remove_documents: - -Automatic Removal of Oldest Documents -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To make room for new documents, capped collections automatically remove -the oldest documents in the collection without requiring scripts or -explicit remove operations. - -Consider the following potential use cases for capped -collections: - -- Store log information generated by high-volume systems. Inserting - documents in a capped collection without an index is close to the - speed of writing log information directly to a file - system. Furthermore, the built-in *first-in-first-out* property - maintains the order of events, while managing storage use. - For example, the :ref:`oplog ` - uses a capped collection. - -- Cache small amounts of data in a capped collections. Since caches - are read rather than write heavy, you would either need to ensure - that this collection *always* remains in the working set (i.e. in - RAM) *or* accept some write penalty for the required index or - indexes. - -.. _capped-collections-oplog: - -Oplog Collection -~~~~~~~~~~~~~~~~ - -The :term:`oplog.rs ` collection that stores a log -of the operations in a :term:`replica set` uses a capped collection. - -Starting in MongoDB 4.0, unlike other capped collections, the oplog can -grow past its configured size limit to avoid deleting the :data:`majority -commit point `. - -.. note:: - - MongoDB rounds the capped size of the oplog up to the nearest - integer multiple of 256, in bytes. - -.. note:: - - MongoDB rounds the capped size of the oplog - up to the nearest integer multiple of 256, in bytes. - -``_id`` Index -~~~~~~~~~~~~~ - -Capped collections have an ``_id`` field and an index on the ``_id`` -field by default. +.. facet:: + :name: genre + :values: reference -.. _capped-collections-recommendations-and-restrictions: +Capped collections are fixed-size collections that insert and retrieve +documents based on insertion order. Capped collections work similarly to +circular buffers: once a collection fills its allocated space, it makes +room for new documents by overwriting the oldest documents in the +collection. -Restrictions and Recommendations --------------------------------- - -Reads -~~~~~ - -.. include:: /includes/extracts/transactions-capped-collection-read-change.rst - -Updates -~~~~~~~ - -If you plan to update documents in a capped collection, create an index -so that these update operations do not require a collection scan. - -Sharding -~~~~~~~~ - -You cannot shard a capped collection. - -Query Efficiency -~~~~~~~~~~~~~~~~ +Restrictions +------------ -Use natural ordering to retrieve the most recently inserted elements -from the collection efficiently. This is similar to using the ``tail`` -command on a log file. +- Capped collections cannot be sharded. -Aggregation ``$out`` -~~~~~~~~~~~~~~~~~~~~ +- You cannot create capped collections on :atlas:`serverless instances + `. -The aggregation pipeline stage :pipeline:`$out` -cannot write results to a capped collection. +- Capped collections are not supported in :ref:`Stable API ` + V1. -.. include:: /includes/replacement-mms.rst +- You cannot write to capped collections in :ref:`transactions + `. -Transactions -~~~~~~~~~~~~ +- The :pipeline:`$out` aggregation pipeline stage cannot write results + to a capped collection. -.. include:: /includes/extracts/transactions-capped-collection-change.rst +- You cannot use read concern :readconcern:`"snapshot"` when reading + from a capped collection. -Stable API -~~~~~~~~~~ +Command Syntax +-------------- -Capped collections are not supported in :ref:`Stable API -` V1. - -Procedures ----------- - -Create a Capped Collection -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You must create capped collections explicitly using the -:method:`db.createCollection()` method, which is a -:binary:`~bin.mongosh` helper for the :dbcommand:`create` command. -When creating a capped collection you must specify the maximum size of -the collection in bytes, which MongoDB will pre-allocate for the -collection. The size of the capped collection includes a small amount of -space for internal overhead. +The following example creates a capped collection called ``log`` with a +maximum size of 100,000 bytes. .. code-block:: javascript db.createCollection( "log", { capped: true, size: 100000 } ) -.. note:: - - The value that you provide for the ``size`` field - must be greater than ``0`` and less than or equal to - ``1024^5`` (1 {+pb+}). MongoDB rounds the ``size`` of all capped - collections up to the nearest integer multiple of 256, in bytes. - -Additionally, you may also specify a maximum number of documents for the -collection using the ``max`` field as in the following document: - -.. code-block:: javascript +For more information on creating capped collections, see +:method:`~db.createCollection()` or :dbcommand:`create`. - db.createCollection("log", { capped : true, size : 5242880, max : - 5000 } ) +Use Cases +--------- -.. important:: - - The ``size`` field is *always* required, even when - you specify the ``max`` number of documents. MongoDB removes older - documents if a collection reaches the maximum size limit before it - reaches the maximum document count. +.. include:: /includes/capped-collections/use-ttl-index.rst -.. see:: +The most common use case for a capped collection is to store log +information. When the capped collection reaches its maximum size, old +log entries are automatically overwritten with new entries. - :method:`db.createCollection()` and :dbcommand:`create`. +Get Started +----------- -.. _capped-collections-options: +To create and query capped collections, see these pages: -Query a Capped Collection -~~~~~~~~~~~~~~~~~~~~~~~~~ +- :ref:`capped-collections-create` -If you perform a :method:`~db.collection.find()` on a capped collection -with no ordering specified, MongoDB guarantees that the ordering of -results is the same as the insertion order. +- :ref:`capped-collections-query` -To retrieve documents in reverse insertion order, issue -:method:`~db.collection.find()` along with the :method:`~cursor.sort()` -method with the :operator:`$natural` parameter set to ``-1``, as shown -in the following example: +- :ref:`capped-collections-check` -.. code-block:: javascript +- :ref:`capped-collections-convert` - db.cappedCollection.find().sort( { $natural: -1 } ) +- :ref:`capped-collections-change-size` -Check if a Collection is Capped -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- :ref:`capped-collections-change-max-docs` -Use the :method:`~db.collection.isCapped()` method to determine if a -collection is capped, as follows: +.. _capped-collections-recommendations-and-restrictions: -.. code-block:: javascript +Details +------- - db.collection.isCapped() +Consider these behavioral details for capped collections. -Convert a Collection to Capped -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _capped-collections-oplog: -You can convert a non-capped collection to a capped collection with -the :dbcommand:`convertToCapped` command: +Oplog Collection +~~~~~~~~~~~~~~~~ -.. code-block:: javascript +The :term:`oplog.rs ` collection that stores a log +of the operations in a :term:`replica set` uses a capped collection. - db.runCommand({"convertToCapped": "mycoll", size: 100000}); +Unlike other capped collections, the oplog can grow past its configured +size limit to avoid deleting the :data:`majority commit point +`. -The ``size`` parameter specifies the size of the capped collection in -bytes. +.. note:: -.. include:: /includes/fact-database-lock.rst + MongoDB rounds the capped size of the oplog up to the nearest + integer multiple of 256, in bytes. -Change a Capped Collection's Size -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +_id Index +~~~~~~~~~ -.. versionadded:: 6.0 +Capped collections have an ``_id`` field and an index on the ``_id`` +field by default. -You can resize a capped collection using the :dbcommand:`collMod` command's -``cappedSize`` option to set the ``cappedSize`` in bytes. ``cappedSize`` must be -greater than ``0`` and less than or equal to ``1024^5`` (1 {+pb+}). +Updates +~~~~~~~ -.. note:: +Avoid updating data in a capped collection. Because capped collections +are fixed-size, updates can cause your data to expand beyond the +collection's allocated space, which can cause unexpected behavior. - Before you can resize a capped collection, you must have already set - the :ref:`featureCompatibilityVersion ` to at least version - ``"6.0"``. +Query Efficiency +~~~~~~~~~~~~~~~~ -For example, the following command sets the maximum size of the ``"log"`` capped -collection to 100000 bytes: +.. include:: /includes/capped-collections/query-natural-order.rst -.. code-block:: javascript +Tailable Cursor +~~~~~~~~~~~~~~~ - db.runCommand( { collMod: "log", cappedSize: 100000 } ) +You can use a :term:`tailable cursor` with capped collections. Similar to the +Unix ``tail -f`` command, the tailable cursor "tails" the end of a +capped collection. As new documents are inserted into the capped +collection, you can use the tailable cursor to continue retrieving +documents. -Change the Maximum Number of Documents in a Capped Collection -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +For information on creating a tailable cursor, see +:ref:`tailable-cursors-landing-page`. -.. versionadded:: 6.0 +Multiple Concurrent Writes +~~~~~~~~~~~~~~~~~~~~~~~~~~ -To change the maximum number of documents in a capped collection, use the -:dbcommand:`collMod` command's ``cappedMax`` option. If ``cappedMax`` is less -than or equal to ``0``, there is no maximum document limit. If -``cappedMax`` is less than the current number of documents in the -collection, MongoDB removes the excess documents on the next insert operation. +.. include:: /includes/capped-collections/concurrent-writes.rst -For example, the following command sets the maximum number of documents in the -``"log"`` capped collection to 500: +Learn More +---------- -.. code-block:: javascript +- :ref:`index-feature-ttl` - db.runCommand( { collMod: "log", cappedMax: 500 } ) +- :ref:`index-properties` -Tailable Cursor -~~~~~~~~~~~~~~~ +- :ref:`indexing-strategies` -You can use a :term:`tailable cursor` with capped collections. Similar to the -Unix ``tail -f`` command, the tailable cursor "tails" the end of a -capped collection. As new documents are inserted into the capped -collection, you can use the tailable cursor to continue retrieving -documents. +.. toctree:: + :titlesonly: -See :doc:`/core/tailable-cursors` for information on creating -a tailable cursor. + /core/capped-collections/create-capped-collection + /core/capped-collections/query-capped-collection + /core/capped-collections/check-if-collection-is-capped + /core/capped-collections/convert-collection-to-capped + /core/capped-collections/change-size-capped-collection + /core/capped-collections/change-max-docs-capped-collection diff --git a/source/core/capped-collections/change-max-docs-capped-collection.txt b/source/core/capped-collections/change-max-docs-capped-collection.txt new file mode 100644 index 00000000000..9e7d8422db4 --- /dev/null +++ b/source/core/capped-collections/change-max-docs-capped-collection.txt @@ -0,0 +1,62 @@ +.. _capped-collections-change-max-docs: + +=============================================== +Change Maximum Documents in a Capped Collection +=============================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. facet:: + :name: genre + :values: tutorial + +.. versionadded:: 6.0 + +To change the maximum number of documents in a :ref:`capped collection +`, use the :dbcommand:`collMod` command's +``cappedMax`` option. + +- If ``cappedMax`` is less than or equal to ``0``, there is no maximum + document limit. + +- If ``cappedMax`` is less than the current number of documents in the + collection, MongoDB removes the excess documents on the next insert + operation. + +About this Task +--------------- + +.. include:: /includes/capped-collections/use-ttl-index.rst + +Before you Begin +---------------- + +Create a capped collection called ``log`` that can store a maximum of +20,000 documents: + +.. code-block:: javascript + + db.createCollection( "log", { capped: true, size: 5242880, max: 20000 } ) + +Steps +----- + +Run the following command to set the maximum number of documents in the +``log`` collection to 5,000: + +.. code-block:: javascript + + db.runCommand( { collMod: "log", cappedMax: 5000 } ) + +Learn More +---------- + +- :ref:`capped-collections-change-size` + +- :ref:`capped-collections-check` + +- :ref:`capped-collections-query` diff --git a/source/core/capped-collections/change-size-capped-collection.txt b/source/core/capped-collections/change-size-capped-collection.txt new file mode 100644 index 00000000000..ef0de5357b1 --- /dev/null +++ b/source/core/capped-collections/change-size-capped-collection.txt @@ -0,0 +1,59 @@ +.. _capped-collections-change-size: + +====================================== +Change the Size of a Capped Collection +====================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. facet:: + :name: genre + :values: tutorial + +.. versionadded:: 6.0 + +To change the size of a :ref:`capped collection +`, use the :dbcommand:`collMod` command's +``cappedSize`` option. ``cappedSize`` is specified in bytes, and must be +greater than ``0`` and less than or equal to ``1024^5`` (1 {+pb+}). + +If ``cappedSize`` is less than the current size of the collection, +MongoDB removes the excess documents on the next insert operation. + +About this Task +--------------- + +.. include:: /includes/capped-collections/use-ttl-index.rst + +Before you Begin +---------------- + +Create a capped collection called ``log`` that has a maximum size of +2,621,440 bytes: + +.. code-block:: javascript + + db.createCollection( "log", { capped: true, size: 2621440 } ) + +Steps +----- + +Run the following command to set the maximum size of the ``log`` +collection to 5,242,880 bytes: + +.. code-block:: javascript + + db.runCommand( { collMod: "log", cappedSize: 5242880 } ) + +Learn More +---------- + +- :ref:`capped-collections-change-max-docs` + +- :ref:`capped-collections-check` + +- :ref:`capped-collections-query` diff --git a/source/core/capped-collections/check-if-collection-is-capped.txt b/source/core/capped-collections/check-if-collection-is-capped.txt new file mode 100644 index 00000000000..7ff5b5c6f36 --- /dev/null +++ b/source/core/capped-collections/check-if-collection-is-capped.txt @@ -0,0 +1,65 @@ +.. _capped-collections-check: + +=============================== +Check if a Collection is Capped +=============================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. facet:: + :name: genre + :values: tutorial + +To check if a collection is capped, use the +:method:`~db.collection.isCapped()` method. + +About this Task +--------------- + +.. include:: /includes/capped-collections/use-ttl-index.rst + +Before you Begin +---------------- + +Create a non-capped collection and a capped collection: + +.. code-block:: javascript + + db.createCollection("nonCappedCollection1") + + db.createCollection("cappedCollection1", { capped: true, size: 100000 } ) + +Steps +----- + +To check if the collections are capped, use the +:method:`~db.collection.isCapped()` method: + +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.nonCappedCollection1.isCapped() + + db.cappedCollection1.isCapped() + + .. output:: + :language: javascript + + false + true + +Learn More +---------- + +- :ref:`capped-collections-create` + +- :ref:`capped-collections-convert` + +- :pipeline:`$collStats` diff --git a/source/core/capped-collections/convert-collection-to-capped.txt b/source/core/capped-collections/convert-collection-to-capped.txt new file mode 100644 index 00000000000..cc6e38274e6 --- /dev/null +++ b/source/core/capped-collections/convert-collection-to-capped.txt @@ -0,0 +1,84 @@ +.. _capped-collections-convert: + +============================== +Convert a Collection to Capped +============================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. facet:: + :name: genre + :values: tutorial + +To convert a non-capped collection to a :ref:`capped collection +`, use the :dbcommand:`convertToCapped` +database command. + +The ``convertToCapped`` command holds a database-exclusive lock for the +duration of the operation. Other operations that lock the same database +are blocked until the ``convertToCapped`` operation completes. + +About this Task +--------------- + +.. include:: /includes/capped-collections/use-ttl-index.rst + +Before you Begin +---------------- + +Create a non-capped collection called ``log2``: + +.. code-block:: javascript + + db.createCollection("log2") + +Steps +----- + +.. procedure:: + :style: normal + + .. step:: Convert the collection to a capped collection + + To convert the ``log2`` collection to a capped collection, run the + :dbcommand:`convertToCapped` command: + + .. code-block:: javascript + + db.runCommand( { + convertToCapped: "log2", + size: 100000 + } ) + + The ``log2`` collection has a maximum size of 100,000 bytes. + + .. step:: Confirm that the collection is capped + + To confirm that the ``log2`` collection is now capped, use the + :method:`~db.collection.isCapped()` method: + + .. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.log2.isCapped() + + .. output:: + :language: javascript + + true + +Learn More +---------- + +- :ref:`faq-concurrency-database-lock` + +- :ref:`capped-collections-change-size` + +- :ref:`capped-collections-query` diff --git a/source/core/capped-collections/create-capped-collection.txt b/source/core/capped-collections/create-capped-collection.txt new file mode 100644 index 00000000000..b752ccc5b46 --- /dev/null +++ b/source/core/capped-collections/create-capped-collection.txt @@ -0,0 +1,95 @@ +.. _capped-collections-create: + +========================== +Create a Capped Collection +========================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. facet:: + :name: genre + :values: tutorial + +To create a :ref:`capped collection `, specify +the ``capped`` option to either the :method:`db.createCollection()` +method or the :dbcommand:`create` command. + +You must create capped collections explicitly. You cannot create a +capped collection implicitly by inserting data into a non-existing +collection. + +When you create a capped collection you must specify the maximum size of +the collection. MongoDB pre-allocates the specified storage for the +collection. The size of the capped collection includes a small amount of +space for internal overhead. + +You can optionally specify a maximum number of documents for the +collection. MongoDB removes older documents if the collection reaches +the maximum size limit before it reaches the maximum document count. + +About this Task +--------------- + +.. include:: /includes/capped-collections/use-ttl-index.rst + +Steps +----- + +The following examples show you how to: + +- :ref:`create-capped-collection-max-size` +- :ref:`create-capped-collection-max-docs` + +.. _create-capped-collection-max-size: + +Create a Capped Collection with a Maximum Size +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Create a capped collection called ``log`` that has a maximum size of +100,000 bytes: + +.. code-block:: javascript + + db.createCollection( "log", { capped: true, size: 100000 } ) + +.. note:: + + The value that you provide for the ``size`` field + must be greater than ``0`` and less than or equal to + ``1024^5`` (1 {+pb+}). MongoDB rounds the ``size`` of all capped + collections up to the nearest integer multiple of 256, in bytes. + +.. _create-capped-collection-max-docs: + +Create a Capped Collection with a Maximum Number of Documents +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Create a capped collection called ``log2`` that has a maximum size of +5,242,880 bytes and can store a maximum of 5,000 documents: + +.. code-block:: javascript + + db.createCollection( + "log2", + { + capped: true, + size: 5242880, + max: 5000 + } + ) + +.. important:: + + The ``size`` field is always required, even when you specify the + ``max`` number of documents. + +Learn More +---------- + +- :method:`db.createCollection()` +- :ref:`capped-collections-query` +- :ref:`capped-collections-check` diff --git a/source/core/capped-collections/query-capped-collection.txt b/source/core/capped-collections/query-capped-collection.txt new file mode 100644 index 00000000000..cfc9ad7ab7c --- /dev/null +++ b/source/core/capped-collections/query-capped-collection.txt @@ -0,0 +1,176 @@ +.. _capped-collections-query: + +========================= +Query a Capped Collection +========================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. facet:: + :name: genre + :values: tutorial + +When you query a capped collection without specifying a sort order, +MongoDB returns results in the same order that they were inserted, +meaning the oldest documents are returned first. + +.. include:: /includes/capped-collections/query-natural-order.rst + +About this Task +--------------- + +.. include:: /includes/capped-collections/use-ttl-index.rst + +Multiple Concurrent Writes +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/capped-collections/concurrent-writes.rst + +Before you Begin +---------------- + +.. procedure:: + :style: normal + + .. step:: Create a capped collection + + .. code-block:: javascript + + db.createCollection("log", { capped: true, size: 100000 } ) + + .. step:: Insert sample data + + .. code-block:: javascript + + db.log.insertMany( [ + { + message: "system start", + type: "startup", + time: 1711403508 + }, + { + message: "user login attempt", + type: "info", + time: 1711403907 + }, + { + message: "user login fail", + type: "warning", + time: 1711404209 + }, + { + message: "user login success", + type: "info", + time: 1711404367 + }, + { + message: "user logout", + type: "info", + time: 1711404555 + } + ] ) + +Steps +----- + +The following examples show you how to: + +- :ref:`query-capped-collection-insertion-order` +- :ref:`query-capped-collection-recent` + +.. _query-capped-collection-insertion-order: + +Return Documents in Insertion Order +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Query the ``log`` collection for documents where ``type`` is ``info``, +and use the default sort order: + +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.log.find( { type: "info" } ) + + .. output:: + :language: javascript + + [ + { + _id: ObjectId("660204b74cabd75abebadbc2"), + message: 'user login attempt', + type: 'info', + time: 1711403907 + }, + { + _id: ObjectId("660204b74cabd75abebadbc4"), + message: 'user login success', + type: 'info', + time: 1711404367 + }, + { + _id: ObjectId("660204b74cabd75abebadbc5"), + message: 'user logout', + type: 'info', + time: 1711404555 + } + ] + +Documents are returned in the order that they were inserted. + +.. _query-capped-collection-recent: + +Return Most Recent Documents +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To return documents in reverse insertion order (meaning the most recent +documents are first), specify the :method:`~cursor.sort()` method with +the :operator:`$natural` parameter set to ``-1``. + +The following query returns the three most recent documents from the +``log`` collection, starting with the most recent document: + +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.log.find().sort( { $natural: -1 } ).limit(3) + + .. output:: + :language: javascript + + [ + { + _id: ObjectId("6601f2484cabd75abebadbbb"), + message: 'user logout', + type: 'info', + time: 1711404555 + }, + { + _id: ObjectId("6601f2484cabd75abebadbba"), + message: 'user login success', + type: 'info', + time: 1711404367 + }, + { + _id: ObjectId("6601f2484cabd75abebadbb9"), + message: 'user login fail', + type: 'warning', + time: 1711404209 + } + ] + +Learn More +---------- + +- :ref:`index-feature-ttl` +- :ref:`read-operations-indexing` +- :ref:`create-indexes-to-support-queries` diff --git a/source/includes/capped-collections/concurrent-writes.rst b/source/includes/capped-collections/concurrent-writes.rst new file mode 100644 index 00000000000..a0e31ef4fcf --- /dev/null +++ b/source/includes/capped-collections/concurrent-writes.rst @@ -0,0 +1,2 @@ +If there are concurrent writers to a capped collection, MongoDB does not +guarantee that documents are returned in insertion order. diff --git a/source/includes/capped-collections/query-natural-order.rst b/source/includes/capped-collections/query-natural-order.rst new file mode 100644 index 00000000000..89222e537ff --- /dev/null +++ b/source/includes/capped-collections/query-natural-order.rst @@ -0,0 +1,3 @@ +Use :term:`natural ordering ` to retrieve the most +recently inserted elements from the collection efficiently. This is +similar to using the ``tail`` command on a log file. diff --git a/source/includes/capped-collections/use-ttl-index.rst b/source/includes/capped-collections/use-ttl-index.rst new file mode 100644 index 00000000000..decd1360bdb --- /dev/null +++ b/source/includes/capped-collections/use-ttl-index.rst @@ -0,0 +1,8 @@ +Generally, :ref:`TTL (Time To Live) indexes ` offer +better performance and more flexibility than capped collections. TTL +indexes expire and remove data from normal collections based on the +value of a date-typed field and a TTL value for the index. + +Capped collections serialize inserts and therefore have worse concurrent +insert performance than non-capped collections. Before you create a +capped collection, consider if you can use a TTL index instead. From a24539fd65a45c1c67a38bf6f68acb43dcf5bdd6 Mon Sep 17 00:00:00 2001 From: Jeff Allen Date: Thu, 28 Mar 2024 12:23:26 -0400 Subject: [PATCH 298/308] DOCS-15150 Add dryRun flag for collMod (#7021) * WIP * WIP * WIP * wip * typos * use procedure * move tutorial * reorder * convert to task layout * add page metadata * edits * edits * remove admonition --- snooty.toml | 1 + source/core/index-unique.txt | 6 +- .../core/index-unique/convert-to-unique.txt | 191 ++++++++++++++++++ source/reference/command/collMod.txt | 150 ++++---------- 4 files changed, 231 insertions(+), 117 deletions(-) create mode 100644 source/core/index-unique/convert-to-unique.txt diff --git a/snooty.toml b/snooty.toml index a48c3b06aee..2566de34d1e 100644 --- a/snooty.toml +++ b/snooty.toml @@ -73,6 +73,7 @@ toc_landing_pages = [ "/core/index-creation", "/core/index-text", "/core/index-ttl", + "/core/index-unique", "/core/journaling", "/core/kerberos", "/core/map-reduce", diff --git a/source/core/index-unique.txt b/source/core/index-unique.txt index 6e7d86da783..03a747b7690 100644 --- a/source/core/index-unique.txt +++ b/source/core/index-unique.txt @@ -1,4 +1,3 @@ - .. _index-type-unique: ============== @@ -421,3 +420,8 @@ the unique index. .. code-block:: javascript db.scoreHistory.insert( { score : 3 } ) + +.. toctree:: + :titlesonly: + + /core/index-unique/convert-to-unique diff --git a/source/core/index-unique/convert-to-unique.txt b/source/core/index-unique/convert-to-unique.txt new file mode 100644 index 00000000000..3f4573ca6ed --- /dev/null +++ b/source/core/index-unique/convert-to-unique.txt @@ -0,0 +1,191 @@ +.. _index-convert-to-unique: + +=========================================== +Convert an Existing Index to a Unique Index +=========================================== + +.. facet:: + :name: genre + :values: tutorial + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +To convert a non-unique index to a :ref:`unique index +`, use the :dbcommand:`collMod` command. The +``collMod`` command provides options to verify that your indexed field +contains unique values before you complete the conversion. + +Before you Begin +---------------- + +.. procedure:: + :style: normal + + .. step:: Populate sample data + + Create the ``apples`` collection: + + .. code-block:: javascript + + db.apples.insertMany( [ + { type: "Delicious", quantity: 12 }, + { type: "Macintosh", quantity: 13 }, + { type: "Delicious", quantity: 13 }, + { type: "Fuji", quantity: 15 }, + { type: "Washington", quantity: 10 } + ] ) + + .. step:: Create a single field index + + Add a single field index on the ``type`` field: + + .. code-block:: javascript + + db.apples.createIndex( { type: 1 } ) + +Steps +----- + +.. procedure:: + :style: normal + + .. step:: Prepare the index to be converted to a unique index + + Run ``collMod`` on the ``type`` field index and set + ``prepareUnique`` to ``true``: + + .. code-block:: javascript + + db.runCommand( { + collMod: "apples", + index: { + keyPattern: { type: 1 }, + prepareUnique: true + } + } ) + + After ``prepareUnique`` is set, you cannot insert new documents + that duplicate an index key entry. For example, the following + insert operation results in an error: + + .. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.apples.insertOne( { type: "Delicious", quantity: 20 } ) + + .. output:: + :language: javascript + + MongoServerError: E11000 duplicate key error collection: + test.apples index: type_1 dup key: { type: "Delicious" } + + .. step:: Check for unique key violations + + To see if there are any documents that violate the unique constraint on + the ``type`` field, run ``collMod`` with ``unique: true`` and ``dryRun: + true``: + + .. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.runCommand( { + collMod: "apples", + index: { + keyPattern: { type: 1 }, + unique: true + }, + dryRun: true + } ) + + .. output:: + :language: javascript + + MongoServerError: Cannot convert the index to unique. Please resolve conflicting documents before running collMod again. + + Violations: [ + { + ids: [ + ObjectId("660489d24cabd75abebadbd0"), + ObjectId("660489d24cabd75abebadbd2") + ] + } + ] + + .. step:: Resolve duplicate key conflicts + + To complete the conversion, modify the duplicate entries to remove any + conflicts. For example: + + .. code-block:: javascript + + db.apples.deleteOne( + { _id: ObjectId("660489d24cabd75abebadbd2") } + ) + + .. step:: Confirm that all conflicts are resolved + + To confirm that the index can be converted, re-run the ``collMod()`` + command with ``dryRun: true``: + + .. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.runCommand( { + collMod: "apples", + index: { + keyPattern: { type: 1 }, + unique: true + }, + dryRun: true + } ) + + .. output:: + :language: javascript + + { ok: 1 } + + .. step:: Finalize the index conversion + + To finalize the conversion to a unique index, run the ``collMod`` + command with ``unique: true`` and remove the ``dryRun`` flag: + + .. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.runCommand( { + collMod: "apples", + index: { + keyPattern: { type: 1 }, + unique: true + } + } ) + + .. output:: + :language: javascript + + { unique_new: true, ok: 1 } + +Learn More +---------- + +- :ref:`manage-indexes` + +- :ref:`index-properties` + +- :ref:`indexing-strategies` diff --git a/source/reference/command/collMod.txt b/source/reference/command/collMod.txt index 37f03d7758b..a0dff90e170 100644 --- a/source/reference/command/collMod.txt +++ b/source/reference/command/collMod.txt @@ -69,6 +69,27 @@ Options Change Index Properties ~~~~~~~~~~~~~~~~~~~~~~~ +To change index options, specify either the key pattern or name of the +existing index options you want to change: + +.. code-block:: javascript + :copyable: false + + db.runCommand( { + collMod: , + index: { + keyPattern: | name: , + expireAfterSeconds: , // Set the TTL expiration threshold + hidden: , // Change index visibility in the query planner + prepareUnique: , // Reject new duplicate index entries + unique: // Convert an index to a unique index + }, + dryRun: + } ) + +If the index does not exist, the command errors with the message +``"cannot find index for ns "``. + .. collflag:: index The ``index`` option can change the following properties of @@ -154,32 +175,23 @@ Change Index Properties To end a conversion, set ``prepareUnique`` to ``false``. - .. versionadded:: 6.0 - - To change index options, specify either the key pattern or name of - the existing index and the index option or options you wish to - change: - - .. code-block:: javascript - :copyable: false + To see an example of how to convert a non-unique index to a + unique index, see :ref:`index-convert-to-unique`. - db.runCommand( { - collMod: , - index: { - keyPattern: | name: , - expireAfterSeconds: , // Set the TTL expiration threshold - hidden: , // Change index visibility in the query planner - prepareUnique: , // Reject new duplicate index entries - unique: // Convert an index to a unique index - } - } ) + .. versionadded:: 6.0 - If the index does not exist, the command errors with the message - ``"cannot find index for ns "``. +.. collflag:: dryRun - .. seealso:: + *Default value:* ``false`` + + Only used when ``index.unique`` is ``true``. + + Before you convert a non-unique index to a unique index, you can run + the ``collMod`` command with ``dryRun: true``. If you do, MongoDB + checks the collection for duplicate keys and returns any violations. - - :ref:`index-type-hidden` + Use ``dryRun: true`` to confirm that you can convert an index to be + unique without any errors. Validate Documents ~~~~~~~~~~~~~~~~~~ @@ -570,97 +582,3 @@ To hide a text index, you must specify the index by ``name`` and not by - :ref:`index-type-hidden` - :method:`db.collection.hideIndex()` - :method:`db.collection.unhideIndex()` - -Convert an Existing Index to a Unique Index -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Create the ``apples`` collection: - -.. code-block:: javscript - - db.apples.insertMany( [ - { type: "Delicious", quantity: 12 }, - { type: "Macintosh", quantity: 13 }, - { type: "Delicious", quantity: 13 }, - { type: "Fuji", quantity: 15 }, - { type: "Washington", quantity: 10 }, - ] ) - -Add a single field index on ``type``: - -.. code-block:: javscript - - db.apples.createIndex( { type: 1 } ) - -Prepare the index on the ``type`` field for conversion: - -.. code-block:: javscript - - db.runCommand( { - collMod: "apples", - index: { - keyPattern: { type: 1 }, - prepareUnique: true - } - } ) - -The existing index may contain duplicate entries, but it will not -accept new documents that duplicate an index entry when -``prepareUnique`` is ``true``. - -Try to insert a document with a duplicate index value: - -.. code-block:: javscript - - db.apples.insertOne( { type: "Delicious", quantity: 200 } ) - -The operation returns an error. The index will not accept new -duplicate entries. - -Use the ``unique``option to convert the index to a unique index. -``collMod`` checks the collection for duplicate index entries before -converting the index: - -.. code-block:: javscript - - db.runCommand( { - collMod: "apples", - index: { - keyPattern: { type: 1 }, - unique: true - } - } ) - -The response to this operation varies by driver. You will always -receive an error message about the duplicate entries. - -.. code-block:: shell - :copyable: false - - "errmsg" : "Cannot convert the index to unique. Please resolve - conflicting documents before running collMod again." - -Some drivers also return a list of ``ObjectIds`` for the duplicate -entries: - -.. code-block:: shell - :copyable: false - - { - "ok" : 0, - "errmsg" : "Cannot convert the index to unique. Please resolve \ - conflicting documents before running collMod again.", - "code" : 359, - "codeName" : "CannotConvertIndexToUnique", - "violations" : [ - { - "ids" : [ - ObjectId("62a2015777e2d47c4da33146"), - ObjectId("62a2015777e2d47c4da33148") - ] - } - ] - } - -To complete the conversion, modify the duplicate entries to remove any -conflicts and re-run ``collMod()`` with the ``unique`` option. From 5edcb00bfa257fe4bee7203fcfce7267b2d0fa73 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Thu, 28 Mar 2024 09:32:56 -0700 Subject: [PATCH 299/308] DOCSP-38081-7.3.1-release-notes (#7014) * DOCSP-38081-7.3.1-release-notes * DOCSP-38081-7.3.1-release-notes * DOCSP-38081-7.3.1-release-notes * DOCSP-38081-7.3.1-release-notes * DOCSP-38081-7.3.1-release-notes --------- Co-authored-by: jason-price-mongodb --- source/includes/changelogs/releases/7.3.1.rst | 16 ++++++++++++++++ source/release-notes/7.3-changelog.txt | 13 +++++++++++++ source/release-notes/7.3.txt | 18 ++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 source/includes/changelogs/releases/7.3.1.rst create mode 100644 source/release-notes/7.3-changelog.txt diff --git a/source/includes/changelogs/releases/7.3.1.rst b/source/includes/changelogs/releases/7.3.1.rst new file mode 100644 index 00000000000..c204a955dbe --- /dev/null +++ b/source/includes/changelogs/releases/7.3.1.rst @@ -0,0 +1,16 @@ +.. _7.3.1-changelog: + +7.3.1 Changelog +--------------- + +Sharding +~~~~~~~~ + +:issue:`SERVER-87191` Update without shard key might miss documents + +Internals +~~~~~~~~~ + +:issue:`SERVER-88360` Remove "Sharding catalog and local catalog +collection uuid do not match" tripwire assertion + diff --git a/source/release-notes/7.3-changelog.txt b/source/release-notes/7.3-changelog.txt new file mode 100644 index 00000000000..b574f16d471 --- /dev/null +++ b/source/release-notes/7.3-changelog.txt @@ -0,0 +1,13 @@ +============= +7.3 Changelog +============= + +.. default-domain:: mongodb + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +.. include:: /includes/changelogs/releases/7.3.1.rst diff --git a/source/release-notes/7.3.txt b/source/release-notes/7.3.txt index 0aec14a88ce..88f8505e7a9 100644 --- a/source/release-notes/7.3.txt +++ b/source/release-notes/7.3.txt @@ -42,3 +42,21 @@ includes the following new metrics: - :serverstatus:`planCache.classic.skipped` - :serverstatus:`planCache.sbe.skipped` + +Patch Releases +-------------- + +.. _7.3.1-release-notes: + +7.3.1 - Upcoming +~~~~~~~~~~~~~~~~ + +Issues fixed: + +- :issue:`SERVER-87191` Update without shard key might miss documents +- :issue:`SERVER-88360` Remove "Sharding catalog and local catalog + collection uuid do not match" tripwire assertion + +- `All Jira issues closed in 7.3.1 + `__ +- :ref:`7.3.1-changelog` From 95164b97844ae2d74f89495c610f8227dfc30f9e Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Thu, 28 Mar 2024 12:50:51 -0400 Subject: [PATCH 300/308] DOCSP-26451 replace $sort-WiredTiger (#7034) --- source/administration/sharded-cluster-administration.txt | 2 +- source/includes/driver-examples/driver-example-query-42.rst | 2 +- ...extracts-export-tools-performance-considerations-base.yaml | 2 +- source/includes/fact-selinux-redhat-with-policy.rst | 2 +- source/reference/operator/query/comment.txt | 2 +- source/reference/parameters.txt | 2 +- source/reference/program/mongod.txt | 2 +- source/release-notes/3.2.txt | 2 +- source/release-notes/3.6-compatibility.txt | 2 +- source/tutorial/configure-ssl-clients.txt | 4 ++-- source/tutorial/configure-x509-member-authentication.txt | 2 +- source/tutorial/upgrade-keyfile-to-x509.txt | 4 ++-- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/source/administration/sharded-cluster-administration.txt b/source/administration/sharded-cluster-administration.txt index 8613a60f5d5..1b71254080c 100644 --- a/source/administration/sharded-cluster-administration.txt +++ b/source/administration/sharded-cluster-administration.txt @@ -30,7 +30,7 @@ Sharded Cluster Administration /tutorial/convert-replica-set-to-replicated-shard-cluster /tutorial/drop-a-hashed-shard-key-index -:doc:`Config Server Administration ` +:ref:`Config Server Administration ` This section contains articles and tutorials related to sharded cluster config server administration diff --git a/source/includes/driver-examples/driver-example-query-42.rst b/source/includes/driver-examples/driver-example-query-42.rst index aaba2bfa3f9..52f2ce24119 100644 --- a/source/includes/driver-examples/driver-example-query-42.rst +++ b/source/includes/driver-examples/driver-example-query-42.rst @@ -27,7 +27,7 @@ ] For instructions on inserting documents in MongoDB Compass, - see :doc:`Insert Documents `. + see :ref:`Insert Documents `. - id: c content: | diff --git a/source/includes/extracts-export-tools-performance-considerations-base.yaml b/source/includes/extracts-export-tools-performance-considerations-base.yaml index 75fb22fc94c..1686519cf1c 100644 --- a/source/includes/extracts-export-tools-performance-considerations-base.yaml +++ b/source/includes/extracts-export-tools-performance-considerations-base.yaml @@ -15,7 +15,7 @@ content: | backup as well as the point in time that the backup reflects. - Use an alternative backup strategy such as - :doc:`Filesystem Snapshots ` + :ref:`Filesystem Snapshots ` or :atlas:`Cloud Backups in MongoDB Atlas ` if the performance impact of {{out_tool}} and {{in_tool}} is unacceptable for your use case. diff --git a/source/includes/fact-selinux-redhat-with-policy.rst b/source/includes/fact-selinux-redhat-with-policy.rst index 5b753f5a549..726a774ee0f 100644 --- a/source/includes/fact-selinux-redhat-with-policy.rst +++ b/source/includes/fact-selinux-redhat-with-policy.rst @@ -15,7 +15,7 @@ packages. If your MongoDB deployment uses custom settings for any of the following: - - :doc:`MongoDB connection ports ` + - :ref:`MongoDB connection ports ` - :setting:`~storage.dbPath` - :setting:`systemLog.path` - :setting:`~processManagement.pidFilePath` diff --git a/source/reference/operator/query/comment.txt b/source/reference/operator/query/comment.txt index 054aacbe7ba..e5cd6fa4449 100644 --- a/source/reference/operator/query/comment.txt +++ b/source/reference/operator/query/comment.txt @@ -77,7 +77,7 @@ the following output shows the comment in the "comment" : "Find even values.", ... -Comments also appear in the :doc:`MongoDB log ` +Comments also appear in the :ref:`MongoDB log ` if the :ref:`database profiler level ` is set to 2 and :ref:`slowms ` is set to 0ms. This :method:`db.setProfilingLevel()` command sets these two diff --git a/source/reference/parameters.txt b/source/reference/parameters.txt index 1048622c5d1..c8b99e15514 100644 --- a/source/reference/parameters.txt +++ b/source/reference/parameters.txt @@ -2128,7 +2128,7 @@ Logging Parameters *Default*: false By default, a :binary:`~bin.mongod` or :binary:`~bin.mongos` with - :doc:`TLS/SSL enabled ` and + :ref:`TLS/SSL enabled ` and :setting:`net.ssl.allowConnectionsWithoutCertificates` : ``true`` lets clients connect without providing a certificate for validation while logging an warning. Set diff --git a/source/reference/program/mongod.txt b/source/reference/program/mongod.txt index fcf6b43cb2e..fbee9d7a39c 100644 --- a/source/reference/program/mongod.txt +++ b/source/reference/program/mongod.txt @@ -1663,7 +1663,7 @@ Sharded Cluster Options config servers (SCCC) is no longer supported. The replica set config servers (CSRS) must run the - :doc:`WiredTiger storage engine `. + :ref:`WiredTiger storage engine `. The :option:`--configsvr` option creates a local :term:`oplog`. diff --git a/source/release-notes/3.2.txt b/source/release-notes/3.2.txt index 20b23a25307..0e6b3aef10f 100644 --- a/source/release-notes/3.2.txt +++ b/source/release-notes/3.2.txt @@ -1232,7 +1232,7 @@ Geospatial Optimization ~~~~~~~~~~~~~~~~~~~~~~~ MongoDB 3.2 introduces version 3 of :ref:`2dsphere-index`, which index -:doc:`GeoJSON geometries ` at a finer gradation. The +:ref:`GeoJSON geometries ` at a finer gradation. The new version improves performance of ``2dsphere`` index queries over smaller regions. In addition, for both :ref:`2d-index` and ``2dsphere`` indexes, the performance of geoNear queries has been improved for dense diff --git a/source/release-notes/3.6-compatibility.txt b/source/release-notes/3.6-compatibility.txt index 71363e2a982..f1bf6edee62 100644 --- a/source/release-notes/3.6-compatibility.txt +++ b/source/release-notes/3.6-compatibility.txt @@ -242,7 +242,7 @@ breaks the tie and the document with ``_id: 0`` sorts first. For more information on sorting with the :ref:`Aggregation Pipeline `, see -:doc:`$sort `. +:pipeline:`$sort`. Sorting with a Compound Sort Pattern on Multiple Array Fields with ``aggregate`` ```````````````````````````````````````````````````````````````````````````````` diff --git a/source/tutorial/configure-ssl-clients.txt b/source/tutorial/configure-ssl-clients.txt index 41749bf2716..86d4eb2b39a 100644 --- a/source/tutorial/configure-ssl-clients.txt +++ b/source/tutorial/configure-ssl-clients.txt @@ -13,8 +13,8 @@ TLS/SSL Configuration for Clients :class: singlecol Clients must have support for TLS/SSL to connect to a -:binary:`~bin.mongod` or a :binary:`~bin.mongos` instance that require -:doc:`TLS/SSL connections`. +:binary:`~bin.mongod` or a :binary:`~bin.mongos` instance that require +:ref:`TLS/SSL connections `. .. note:: diff --git a/source/tutorial/configure-x509-member-authentication.txt b/source/tutorial/configure-x509-member-authentication.txt index 85f1e789c22..26ebde1067c 100644 --- a/source/tutorial/configure-x509-member-authentication.txt +++ b/source/tutorial/configure-x509-member-authentication.txt @@ -13,7 +13,7 @@ Use x.509 Certificate for Membership Authentication :class: singlecol MongoDB supports x.509 certificate authentication for use with a secure -:doc:`TLS/SSL connection `. Sharded cluster +:ref:`TLS/SSL connection `. Sharded cluster members and replica set members can use x.509 certificates to verify their membership to the cluster or the replica set instead of using :ref:`keyfiles `. The membership authentication is diff --git a/source/tutorial/upgrade-keyfile-to-x509.txt b/source/tutorial/upgrade-keyfile-to-x509.txt index 59229d87063..b52ae6c147f 100644 --- a/source/tutorial/upgrade-keyfile-to-x509.txt +++ b/source/tutorial/upgrade-keyfile-to-x509.txt @@ -68,7 +68,7 @@ cluster authentication, use the following rolling upgrade process: :binary:`mongod` / :binary:`mongos` presents this file to other members of the cluster to identify itself as a member. - Include other :doc:`TLS/SSL options ` and + Include other :ref:`TLS/SSL options ` and any other options as appropriate for your specific configuration. For example: @@ -221,7 +221,7 @@ to x.509 membership authentication and TLS/SSL connections: each node can receive either a keyfile or an x.509 certificate from other members to authenticate those members. - Include other :doc:`TLS/SSL options ` and + Include other :ref:`TLS/SSL options ` and any other options as appropriate for your specific configuration. For example: From f790687401bdcd99fb0a6c71b9a438bc97d1c33d Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:51:55 -0700 Subject: [PATCH 301/308] DOCSP-25292 $elemMatch should describe non-object array fields (#6993) * DOCSP-25292 should describe non-object array fields * Apply suggestions from code review Co-authored-by: Mihai Andrei * DOCSP-25292 updates for MA's feedback --------- Co-authored-by: Mihai Andrei --- .../operator/projection/elemMatch.txt | 43 ++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/source/reference/operator/projection/elemMatch.txt b/source/reference/operator/projection/elemMatch.txt index 9b2ab309788..eb3b31fcc51 100644 --- a/source/reference/operator/projection/elemMatch.txt +++ b/source/reference/operator/projection/elemMatch.txt @@ -68,7 +68,8 @@ assumes a collection ``schools`` with the following documents: students: [ { name: "ajax", school: 100, age: 7 }, { name: "achilles", school: 100, age: 8 }, - ] + ], + athletics: [ "swimming", "basketball", "football" ] } { _id: 3, @@ -76,7 +77,8 @@ assumes a collection ``schools`` with the following documents: students: [ { name: "ajax", school: 100, age: 7 }, { name: "achilles", school: 100, age: 8 }, - ] + ], + athletics: [ "baseball", "basketball", "soccer" ] } { _id: 4, @@ -151,6 +153,43 @@ The operation returns the three documents that have ``zipcode`` equal to ``63109 The document with ``_id`` equal to ``3`` does not contain the ``students`` field since no array element matched the :projection:`$elemMatch` criteria. +The argument to :projection:`$elemMatch` matches elements of the array that +``$elemMatch`` is projecting. If you specify an equality with a field +name to ``$elemMatch``, it attempts to match objects within the array. +For example, ``$elemMatch`` attempts to match objects, instead of scalar +values, within the array for the following in the projection: + +.. code-block:: javascript + + db.schools.find( { zipcode: "63109" }, + { athletics: { $elemMatch: { athletics: "basketball" } } }) + +To match scalar values, use the equality operator along with the scalar +value that you want to match (``{$eq: }``). For example, +the following :method:`~db.collection.find()` operation queries for all +documents where the value of the ``zipcode`` field is ``63109``. The +projection includes the matching element of the ``athletics`` array +where the value is ``basketball``: + +.. code-block:: javascript + + db.schools.find( { zipcode: "63109" }, + { athletics: { $elemMatch: { $eq: "basketball" } } }) + +The operation returns the three documents that have ``zipcode`` equal to +``63109``: + +.. code-block:: javascript + + [ + { _id : 1 }, + { _id: 3, athletics: [ 'basketball' ] }, + { _id : 4 } + ] + +The document with ``_id`` equal to ``3`` is the only document that +matched the :projection:`$elemMatch` criteria. + .. seealso:: :projection:`$ (projection) <$>` operator From 89514183eb7ee4a29e44f7d9c9365fb21fd71eeb Mon Sep 17 00:00:00 2001 From: MongoCaleb <32645888+MongoCaleb@users.noreply.github.com> Date: Thu, 28 Mar 2024 14:14:59 -0700 Subject: [PATCH 302/308] Merge $lastN (agg) with $lastN (array) and $firstN (agg) with $firstN (array) (#6944) * WIP to see how formatting looks * updating $last docs * toic too deep (dood); remove self-referntial * re-add expression * remove extraneous file * separated group and expression directives * remove wrong info on limitations and fix $group page --- config/redirects | 2 +- source/reference/operator/aggregation.txt | 2 - .../aggregation/firstN-array-element.txt | 135 ------------- .../reference/operator/aggregation/firstN.txt | 182 ++++++++++++++---- .../reference/operator/aggregation/group.txt | 14 +- .../aggregation/lastN-array-element.txt | 134 ------------- .../reference/operator/aggregation/lastN.txt | 182 ++++++++++++++---- 7 files changed, 302 insertions(+), 349 deletions(-) delete mode 100644 source/reference/operator/aggregation/firstN-array-element.txt delete mode 100644 source/reference/operator/aggregation/lastN-array-element.txt diff --git a/config/redirects b/config/redirects index 6dece379ef3..07a243cccd8 100644 --- a/config/redirects +++ b/config/redirects @@ -2586,4 +2586,4 @@ raw: https://mongodb.github.io/mongo-java-driver/ -> ${base}/drivers/java/sync/c (v6.1-*]: ${prefix}/${version}/reference/operator/aggregation/first-array-element -> ${base}/${version}/reference/operator/aggregation/first/ # DOCSP-36940 -(v6.1-*]: ${prefix}/${version}/reference/operator/aggregation/last-array-element -> ${base}/${version}/reference/operator/aggregation/lastN-array-element/ +(v6.1-*]: ${prefix}/${version}/reference/operator/aggregation/last-array-element -> ${base}/${version}/reference/operator/aggregation/last/ diff --git a/source/reference/operator/aggregation.txt b/source/reference/operator/aggregation.txt index 78d1cb133ed..f6c1cd1fef1 100644 --- a/source/reference/operator/aggregation.txt +++ b/source/reference/operator/aggregation.txt @@ -243,7 +243,6 @@ Window Operators /reference/operator/aggregation/filter /reference/operator/aggregation/first /reference/operator/aggregation/firstN - /reference/operator/aggregation/firstN-array-element /reference/operator/aggregation/floor /reference/operator/aggregation/function /reference/operator/aggregation/getField @@ -263,7 +262,6 @@ Window Operators /reference/operator/aggregation/isoWeekYear /reference/operator/aggregation/last /reference/operator/aggregation/lastN - /reference/operator/aggregation/lastN-array-element /reference/operator/aggregation/let /reference/operator/aggregation/linearFill /reference/operator/aggregation/literal diff --git a/source/reference/operator/aggregation/firstN-array-element.txt b/source/reference/operator/aggregation/firstN-array-element.txt deleted file mode 100644 index a940da08783..00000000000 --- a/source/reference/operator/aggregation/firstN-array-element.txt +++ /dev/null @@ -1,135 +0,0 @@ -======================== -$firstN (array operator) -======================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Definition ----------- - -.. expression:: $firstN - - .. versionadded:: 5.2 - - Returns a specified number of elements from the beginning of an - array. - -.. seealso:: - - - :expression:`$lastN` - - - :expression:`$sortArray` - -Syntax ------- - -:expression:`$firstN` has the following syntax: - -.. code-block:: javascript - - { $firstN: { n: , input: } } - -.. list-table:: - :header-rows: 1 - :class: border-table - - * - Field - - Description - - * - ``n`` - - An :ref:`expression ` that resolves to a - positive integer. The integer specifies the number of array elements - that :expression:`$firstN` returns. - - * - ``input`` - - An :ref:`expression ` that resolves to the - array from which to return ``n`` elements. - -Behavior --------- - -- :expression:`$firstN` returns elements in the same order they appear in - the input array. - -- :expression:`$firstN` does not filter out ``null`` values in the input - array. - -- You cannot specify a value of ``n`` less than ``1``. - -- If the specified ``n`` is greater than or equal to the number of elements - in the ``input`` array, :expression:`$firstN` returns the ``input`` array. - -- If ``input`` resolves to a non-array value, the aggregation operation - errors. - -Example -------- - -The collection ``games`` has the following documents: - -.. code-block:: javascript - :copyable: true - - db.games.insertMany([ - { "playerId" : 1, "score" : [ 1, 2, 3 ] }, - { "playerId" : 2, "score" : [ 12, 90, 7, 89, 8 ] }, - { "playerId" : 3, "score" : [ null ] }, - { "playerId" : 4, "score" : [ ] }, - { "playerId" : 5, "score" : [ 1293, null, 3489, 9 ]}, - { "playerId" : 6, "score" : [ "12.1", 2, NumberLong("2090845886852"), 23 ]} - ]) - -The following example uses the :expression:`$firstN` operator to retrieve the -first three scores for each player. The scores are returned in the new field -``firstScores`` created by :pipeline:`$addFields`. - -.. code-block:: javascript - :copyable: true - - db.games.aggregate([ - { $addFields: { firstScores: { $firstN: { n: 3, input: "$score" } } } } - ]) - -The operation returns the following results: - -.. code-block:: javascript - :copyable: true - :emphasize-lines: 4, 9, 14, 19, 24, 29 - - [{ - "playerId": 1, - "score": [ 1, 2, 3 ], - "firstScores": [ 1, 2, 3 ] - }, - { - "playerId": 2, - "score": [ 12, 90, 7, 89, 8 ], - "firstScores": [ 12, 90, 7 ] - }, - { - "playerId": 3, - "score": [ null ], - "firstScores": [ null ] - }, - { - "playerId": 4, - "score": [ ], - "firstScores": [ ] - }, - { - "playerId": 5, - "score": [ 1293, null, 3489, 9 ], - "firstScores": [ 1293, null, 3489 ] - }, - { - "playerId": 6, - "score": [ "12.1", 2, NumberLong("2090845886852"), 23 ], - "firstScores": [ "12.1", 2, NumberLong("2090845886852") ] - }] - diff --git a/source/reference/operator/aggregation/firstN.txt b/source/reference/operator/aggregation/firstN.txt index 99783a2c702..83bd7811253 100644 --- a/source/reference/operator/aggregation/firstN.txt +++ b/source/reference/operator/aggregation/firstN.txt @@ -1,29 +1,37 @@ -================================= -$firstN (aggregation accumulator) -================================= +======= +$firstN +======= .. default-domain:: mongodb .. contents:: On this page :local: :backlinks: none - :depth: 1 + :depth: 2 :class: singlecol Definition ---------- -.. group:: $firstN +.. versionadded:: 5.2 + + +``$firstN`` can be used as an aggregation accumulator or array operator. As +an aggregation accumulator, it returns an aggregation of the first ``n`` +elements within a group. As an array operator, it returns the +specified number of elements from the beginning of an array. - .. versionadded:: 5.2 +Aggregation Accumulator +----------------------- +.. group:: $firstN - Returns an aggregation of the first ``n`` elements within a group. - The elements returned are meaningful only if in a specified sort order. - If the group contains fewer than ``n`` elements, ``$firstN`` - returns all elements in the group. +When ``$firstN`` is used as an aggregation accumulator, the elements returned +are meaningful only if they are in a specified sort order. If the group contains +fewer than ``n`` elements, ``$firstN`` returns all elements in the group. Syntax ------- +~~~~~~ +When used as an aggregation accumulator, ``$firstN`` has the following syntax: .. code-block:: none :copyable: false @@ -43,10 +51,10 @@ Syntax For details see :ref:`group key example`. Behavior --------- +~~~~~~~~ Null and Missing Values -~~~~~~~~~~~~~~~~~~~~~~~ +``````````````````````` - ``$firstN`` does not filter out null values. - ``$firstN`` converts missing values to null. @@ -107,7 +115,7 @@ In this example: ] Comparison of ``$firstN`` and ``$topN`` Accumulators -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +```````````````````````````````````````````````````` Both ``$firstN`` and ``$topN`` accumulators can accomplish similar results. @@ -121,31 +129,19 @@ In general: - ``$firstN`` can be used as an aggregation expression, ``$topN`` cannot. Restrictions ------------- +~~~~~~~~~~~~ Window Function and Aggregation Expression Support -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +`````````````````````````````````````````````````` ``$firstN`` is supported as an :ref:`aggregation expression `. -For details on aggregation expression usage see -:ref:`Using $firstN as an Aggregation Expression -`. - ``$firstN`` is supported as a :pipeline:`window operator <$setWindowFields>`. -Memory Limit Considerations -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Aggregation pipelines which call ``$firstN`` are subject to the -:ref:`100 MB limit `. If this -limit is exceeded for an individual group, the aggregation fails -with an error. - Examples --------- +~~~~~~~~ Consider a ``gamescores`` collection with the following documents: @@ -163,7 +159,7 @@ Consider a ``gamescores`` collection with the following documents: ]) Find the First Three Player Scores for a Single Game -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +```````````````````````````````````````````````````` You can use the ``$firstN`` accumulator to find the first three scores in a single game. @@ -214,7 +210,7 @@ The operation returns the following results: ] Finding the First Three Player Scores Across Multiple Games -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``````````````````````````````````````````````````````````` You can use the ``$firstN`` accumulator to find the first ``n`` input fields in each game. @@ -262,7 +258,7 @@ The operation returns the following results: ] Using ``$sort`` With ``$firstN`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +```````````````````````````````` Using a ``$sort`` stage earlier in the pipeline can influence the results of the ``$firstN`` accumulator. @@ -311,7 +307,7 @@ The operation returns the following results: .. _first-n-with-group-key: Computing ``n`` Based on the Group Key for ``$group`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +````````````````````````````````````````````````````` You can also assign the value of ``n`` dynamically. In this example, the :expression:`$cond` expression is used on the ``gameId`` field. @@ -357,7 +353,7 @@ The operation returns the following results: .. _firstN-aggregation-expression: Using ``$firstN`` as an Aggregation Expression -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +`````````````````````````````````````````````` You can also use ``$firstN`` as an aggregation expression. @@ -399,3 +395,121 @@ The operation returns the following results: [ { firstThreeElements: [ 10, 20, 30 ] } ] + +Array Operator +-------------- + +.. expression:: $firstN + + +Syntax +~~~~~~ + +When used as an array operator, ``$firstN`` has the following syntax: + +.. code-block:: javascript + + { $firstN: { n: , input: } } + +.. list-table:: + :header-rows: 1 + :class: border-table + + * - Field + - Description + + * - ``n`` + - An :ref:`expression ` that resolves to a + positive integer. The integer specifies the number of array elements + that :expression:`$firstN` returns. + + * - ``input`` + - An :ref:`expression ` that resolves to the + array from which to return ``n`` elements. + +Behavior +~~~~~~~~ + +- :expression:`$firstN` returns elements in the same order they appear in + the input array. + +- :expression:`$firstN` does not filter out ``null`` values in the input + array. + +- You cannot specify a value of ``n`` less than ``1``. + +- If the specified ``n`` is greater than or equal to the number of elements + in the ``input`` array, :expression:`$firstN` returns the ``input`` array. + +- If ``input`` resolves to a non-array value, the aggregation operation + errors. + +Example +~~~~~~~ + +The collection ``games`` has the following documents: + +.. code-block:: javascript + :copyable: true + + db.games.insertMany([ + { "playerId" : 1, "score" : [ 1, 2, 3 ] }, + { "playerId" : 2, "score" : [ 12, 90, 7, 89, 8 ] }, + { "playerId" : 3, "score" : [ null ] }, + { "playerId" : 4, "score" : [ ] }, + { "playerId" : 5, "score" : [ 1293, null, 3489, 9 ]}, + { "playerId" : 6, "score" : [ "12.1", 2, NumberLong("2090845886852"), 23 ]} + ]) + +The following example uses the :expression:`$firstN` operator to retrieve the +first three scores for each player. The scores are returned in the new field +``firstScores`` created by :pipeline:`$addFields`. + +.. code-block:: javascript + :copyable: true + + db.games.aggregate([ + { $addFields: { firstScores: { $firstN: { n: 3, input: "$score" } } } } + ]) + +The operation returns the following results: + +.. code-block:: javascript + :copyable: true + :emphasize-lines: 4, 9, 14, 19, 24, 29 + + [{ + "playerId": 1, + "score": [ 1, 2, 3 ], + "firstScores": [ 1, 2, 3 ] + }, + { + "playerId": 2, + "score": [ 12, 90, 7, 89, 8 ], + "firstScores": [ 12, 90, 7 ] + }, + { + "playerId": 3, + "score": [ null ], + "firstScores": [ null ] + }, + { + "playerId": 4, + "score": [ ], + "firstScores": [ ] + }, + { + "playerId": 5, + "score": [ 1293, null, 3489, 9 ], + "firstScores": [ 1293, null, 3489 ] + }, + { + "playerId": 6, + "score": [ "12.1", 2, NumberLong("2090845886852"), 23 ], + "firstScores": [ "12.1", 2, NumberLong("2090845886852") ] + }] + +.. seealso:: + + - :expression:`$lastN` + - :expression:`$sortArray` \ No newline at end of file diff --git a/source/reference/operator/aggregation/group.txt b/source/reference/operator/aggregation/group.txt index 3a27b8e136e..f11969ce7b9 100644 --- a/source/reference/operator/aggregation/group.txt +++ b/source/reference/operator/aggregation/group.txt @@ -101,15 +101,11 @@ operators: ``$group`` and Memory Restrictions ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The :pipeline:`$group` stage has a limit of 100 megabytes of RAM. By -default, if the stage exceeds this limit, :pipeline:`$group` returns an -error. To allow more space for stage processing, use the -:ref:`allowDiskUse ` option to enable -aggregation pipeline stages to write data to temporary files. - -.. seealso:: - - :doc:`/core/aggregation-pipeline-limits` +If the :pipeline:`$group` stage exceeds 100 megabytes of RAM, MongoDB writes +data to temporary files. However, if the +:ref:`allowDiskUse ` option is set to ``false``, +``$group`` returns an error. For more information, refer to +:doc:`/core/aggregation-pipeline-limits`. .. _group-pipeline-optimization: diff --git a/source/reference/operator/aggregation/lastN-array-element.txt b/source/reference/operator/aggregation/lastN-array-element.txt deleted file mode 100644 index 74f2feb5c2d..00000000000 --- a/source/reference/operator/aggregation/lastN-array-element.txt +++ /dev/null @@ -1,134 +0,0 @@ -======================== -$lastN (array operator) -======================== - -.. default-domain:: mongodb - -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol - -Definition ----------- - -.. expression:: $lastN - - .. versionadded:: 5.2 - - Returns a specified number of elements from the end of an - array. - -.. seealso:: - - - :expression:`$firstN` - - - :expression:`$sortArray` - -Syntax ------- - -:expression:`$lastN` has the following syntax: - -.. code-block:: javascript - - { $lastN: { n: , input: } } - -.. list-table:: - :header-rows: 1 - :class: border-table - - * - Field - - Description - - * - ``n`` - - An :ref:`expression ` that resolves to a - positive integer. The integer specifies the number of array elements - that :expression:`$lastN` returns. - - * - ``input`` - - An :ref:`expression ` that resolves to the - array from which to return ``n`` elements. - -Behavior --------- - -- :expression:`$lastN` returns elements in the same order they appear in - the input array. - -- :expression:`$lastN` does not filter out ``null`` values in the input - array. - -- You cannot specify a value of ``n`` less than ``1``. - -- If the specified ``n`` is greater than or equal to the number of elements - in the ``input`` array, :expression:`$lastN` returns the ``input`` array. - -- If ``input`` resolves to a non-array value, the aggregation operation - errors. - -Example -------- - -The collection ``games`` has the following documents: - -.. code-block:: javascript - :copyable: true - - db.games.insertMany([ - { "playerId" : 1, "score" : [ 1, 2, 3 ] }, - { "playerId" : 2, "score" : [ 12, 90, 7, 89, 8 ] }, - { "playerId" : 3, "score" : [ null ] }, - { "playerId" : 4, "score" : [ ] }, - { "playerId" : 5, "score" : [ 1293, null, 3489, 9 ]}, - { "playerId" : 6, "score" : [ "12.1", 2, NumberLong("2090845886852"), 23 ]} - ]) - -The following example uses the :expression:`$lastN` operator to retrieve the -last three scores for each player. The scores are returned in the new field -``lastScores`` created by :pipeline:`$addFields`. - -.. code-block:: javascript - :copyable: true - - db.games.aggregate([ - { $addFields: { lastScores: { $lastN: { n: 3, input: "$score" } } } } - ]) - -The operation returns the following results: - -.. code-block:: javascript - :copyable: true - :emphasize-lines: 4, 9, 14, 19, 24, 29 - - [{ - "playerId": 1, - "score": [ 1, 2, 3 ], - "lastScores": [ 1, 2, 3 ] - }, - { - "playerId": 2, - "score": [ 12, 90, 7, 89, 8 ], - "lastScores": [ 7, 89, 8 ] - }, - { - "playerId": 3, - "score": [ null ], - "lastScores": [ null ] - }, - { - "playerId": 4, - "score": [ ], - "lastScores": [ ] - }, - { - "playerId": 5, - "score": [ 1293, null, 3489, 9 ], - "lastScores": [ null, 3489, 9 ] - }, - { - "playerId": 6, - "score": [ "12.1", 2, NumberLong("2090845886852"), 23 ], - "lastScores": [ 2, NumberLong("2090845886852"), 23 ] - }] diff --git a/source/reference/operator/aggregation/lastN.txt b/source/reference/operator/aggregation/lastN.txt index eb90d0dcc67..b5dedb75369 100644 --- a/source/reference/operator/aggregation/lastN.txt +++ b/source/reference/operator/aggregation/lastN.txt @@ -1,29 +1,36 @@ -================================== -$lastN (aggregation accumulator) -================================== +====== +$lastN +====== .. default-domain:: mongodb .. contents:: On this page :local: :backlinks: none - :depth: 1 + :depth: 2 :class: singlecol Definition ---------- -.. group:: $lastN +.. versionadded:: 5.2 + +``$lastN`` can be used as an aggregation accumulator or array operator. As +an aggregation accumulator, it an aggregation of the last ``n`` elements within +a group. As an array operator, it returns the specified number of elements +from the end of an array. + +Aggregation Accumulator +----------------------- - .. versionadded:: 5.2 +.. group:: $lastN - Returns an aggregation of the last ``n`` elements within a group. - The elements returned are meaningful only if in a specified sort order. - If the group contains fewer than ``n`` elements, ``$lastN`` - returns all elements in the group. +When ``$lasttN`` is used as an aggregation accumulator, the elements returned +are meaningful only if they are in a specified sort order. If the group contains +fewer than ``n`` elements, ``$lastN`` returns all elements in the group. Syntax ------- +~~~~~~ .. code-block:: none :copyable: false @@ -43,10 +50,10 @@ Syntax For details see :ref:`group key example `. Behavior --------- +~~~~~~~~ Null and Missing Values -~~~~~~~~~~~~~~~~~~~~~~~ +``````````````````````` - ``$lastN`` does not filter out null values. - ``$lastN`` converts missing values to null. @@ -107,7 +114,7 @@ In this example: ] Comparison of ``$lastN`` and ``$bottomN`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +````````````````````````````````````````` Both ``$lastN`` and ``$bottomN`` accumulators can accomplish similar results. @@ -121,31 +128,19 @@ In general: - ``$lastN`` can be used as an aggregation expression, ``$bottomN`` cannot. Restrictions ------------- +~~~~~~~~~~~~ Window Function and Aggregation Expression Support -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +`````````````````````````````````````````````````` ``$lastN`` is supported as an :ref:`aggregation expression `. -For details on aggregation expression usage see -:ref:`Using $lastN as an Aggregation Expression -`. - ``$lastN`` is supported as a :pipeline:`window operator <$setWindowFields>`. -Memory Limit Considerations -~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Aggregation pipelines which call ``$lastN`` are subject to the -:ref:`100 MB limit `. If this -limit is exceeded for an individual group, the aggregation fails -with an error. - Examples --------- +~~~~~~~~ Consider a ``gamescores`` collection with the following documents: @@ -163,7 +158,7 @@ Consider a ``gamescores`` collection with the following documents: ]) Find the Last Three Player Scores for a Single Game -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``````````````````````````````````````````````````` You can use the ``$lastN`` accumulator to find the last three scores in a single game. @@ -214,7 +209,7 @@ The operation returns the following results: ] Finding the Last Three Player Scores Across Multiple Games -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +`````````````````````````````````````````````````````````` You can use the ``$lastN`` accumulator to find the last ``n`` input fields in each game. @@ -262,7 +257,7 @@ The operation returns the following results: ] Using ``$sort`` With ``$lastN`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +``````````````````````````````` Using a ``$sort`` stage earlier in the pipeline can influence the results of the ``$lastN`` accumulator. @@ -311,7 +306,7 @@ The operation returns the following results: .. _last-n-with-group-key: Computing ``n`` Based on the Group Key for ``$group`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +````````````````````````````````````````````````````` You can also assign the value of ``n`` dynamically. In this example, the :expression:`$cond` expression is used on the ``gameId`` field. @@ -356,7 +351,7 @@ The operation returns the following results: .. _lastN-aggregation-expression: Using ``$lastN`` as an Aggregation Expression -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +````````````````````````````````````````````` You can also use ``$lastN`` as an aggregation expression. @@ -396,3 +391,122 @@ The operation returns the following results: :copyable: false [ { lastThreeElements: [ 20, 30, 40 ] } ] + + +Array Operator +-------------- + +.. expression:: $lastN + +Syntax +~~~~~~ + +:expression:`$lastN` has the following syntax: + +.. code-block:: javascript + + { $lastN: { n: , input: } } + +.. list-table:: + :header-rows: 1 + :class: border-table + + * - Field + - Description + + * - ``n`` + - An :ref:`expression ` that resolves to a + positive integer. The integer specifies the number of array elements + that :expression:`$lastN` returns. + + * - ``input`` + - An :ref:`expression ` that resolves to the + array from which to return ``n`` elements. + +Behavior +~~~~~~~~ + +- :expression:`$lastN` returns elements in the same order they appear in + the input array. + +- :expression:`$lastN` does not filter out ``null`` values in the input + array. + +- You cannot specify a value of ``n`` less than ``1``. + +- If the specified ``n`` is greater than or equal to the number of elements + in the ``input`` array, :expression:`$lastN` returns the ``input`` array. + +- If ``input`` resolves to a non-array value, the aggregation operation + errors. + +Example +~~~~~~~ + +The collection ``games`` has the following documents: + +.. code-block:: javascript + :copyable: true + + db.games.insertMany([ + { "playerId" : 1, "score" : [ 1, 2, 3 ] }, + { "playerId" : 2, "score" : [ 12, 90, 7, 89, 8 ] }, + { "playerId" : 3, "score" : [ null ] }, + { "playerId" : 4, "score" : [ ] }, + { "playerId" : 5, "score" : [ 1293, null, 3489, 9 ]}, + { "playerId" : 6, "score" : [ "12.1", 2, NumberLong("2090845886852"), 23 ]} + ]) + +The following example uses the :expression:`$lastN` operator to retrieve the +last three scores for each player. The scores are returned in the new field +``lastScores`` created by :pipeline:`$addFields`. + +.. code-block:: javascript + :copyable: true + + db.games.aggregate([ + { $addFields: { lastScores: { $lastN: { n: 3, input: "$score" } } } } + ]) + +The operation returns the following results: + +.. code-block:: javascript + :copyable: true + :emphasize-lines: 4, 9, 14, 19, 24, 29 + + [{ + "playerId": 1, + "score": [ 1, 2, 3 ], + "lastScores": [ 1, 2, 3 ] + }, + { + "playerId": 2, + "score": [ 12, 90, 7, 89, 8 ], + "lastScores": [ 7, 89, 8 ] + }, + { + "playerId": 3, + "score": [ null ], + "lastScores": [ null ] + }, + { + "playerId": 4, + "score": [ ], + "lastScores": [ ] + }, + { + "playerId": 5, + "score": [ 1293, null, 3489, 9 ], + "lastScores": [ null, 3489, 9 ] + }, + { + "playerId": 6, + "score": [ "12.1", 2, NumberLong("2090845886852"), 23 ], + "lastScores": [ 2, NumberLong("2090845886852"), 23 ] + }] + + +.. seealso:: + + - :expression:`$firstN` + - :expression:`$sortArray` \ No newline at end of file From fc717cc7e44e9f769749c6ba7f164887910039e4 Mon Sep 17 00:00:00 2001 From: jmd-mongo <73852296+jmd-mongo@users.noreply.github.com> Date: Thu, 28 Mar 2024 18:23:28 -0400 Subject: [PATCH 303/308] DOCS-26453 authorization - collection methods doc replacments (#7045) --- source/core/authentication.txt | 4 ++-- source/core/authorization.txt | 2 +- source/includes/extracts-changestream.yaml | 5 +---- source/includes/fact-validate-metadata.rst | 2 +- source/includes/steps-clear-jumbo-flag-refine-key.yaml | 2 +- source/reference/command/refineCollectionShardKey.txt | 2 +- source/reference/method/db.collection.find.txt | 8 ++++---- source/reference/method/db.getCollection.txt | 2 +- source/reference/operator/aggregation/out.txt | 2 +- source/reference/read-concern-snapshot.txt | 2 +- source/release-notes/4.0.txt | 2 +- source/release-notes/5.0.txt | 2 +- source/replication.txt | 6 +++--- source/sharding.txt | 2 +- source/tutorial/iterate-a-cursor.txt | 2 +- source/tutorial/kerberos-auth-activedirectory-authz.txt | 2 +- source/tutorial/manage-the-database-profiler.txt | 2 +- source/tutorial/manage-users-and-roles.txt | 2 +- 18 files changed, 24 insertions(+), 27 deletions(-) diff --git a/source/core/authentication.txt b/source/core/authentication.txt index 26d7b8f20c1..3d2a85daada 100644 --- a/source/core/authentication.txt +++ b/source/core/authentication.txt @@ -20,11 +20,11 @@ Authentication :class: singlecol Authentication is the process of verifying the identity of a client. -When access control (:doc:`authorization `) is +When access control (:ref:`authorization `) is enabled, MongoDB requires all clients to authenticate themselves in order to determine their access. -Although authentication and :doc:`authorization ` +Although authentication and :ref:`authorization ` are closely connected, authentication is distinct from authorization: - **Authentication** verifies the identity of a :ref:`user `. diff --git a/source/core/authorization.txt b/source/core/authorization.txt index d808de98306..d03097cf13c 100644 --- a/source/core/authorization.txt +++ b/source/core/authorization.txt @@ -118,7 +118,7 @@ other databases. Built-In Roles and User-Defined Roles ------------------------------------- -MongoDB provides :doc:`built-in roles ` that +MongoDB provides :ref:`built-in roles ` that provide set of privileges commonly needed in a database system. If these built-in-roles cannot provide the desired set of privileges, diff --git a/source/includes/extracts-changestream.yaml b/source/includes/extracts-changestream.yaml index 45a7f756d52..827129cce03 100644 --- a/source/includes/extracts-changestream.yaml +++ b/source/includes/extracts-changestream.yaml @@ -188,15 +188,12 @@ content: | ref: changestream-rc-majority-4.2 content: | - Starting in MongoDB 4.2, :doc:`change streams ` are + :ref:`Change streams ` are available regardless of the :readconcern:`"majority"` read concern support; that is, read concern ``majority`` support can be either enabled (default) or :ref:`disabled ` to use change streams. - In MongoDB 4.0 and earlier, :doc:`change streams ` are - available only if :readconcern:`"majority"` read concern support is - enabled (default). --- ref: changestream-available-pipeline-stages content: | diff --git a/source/includes/fact-validate-metadata.rst b/source/includes/fact-validate-metadata.rst index 953c37b4960..e98448f8a7b 100644 --- a/source/includes/fact-validate-metadata.rst +++ b/source/includes/fact-validate-metadata.rst @@ -17,7 +17,7 @@ The ``metadata`` validation option: only collections metadata. - Provides an alternative to dropping and recreating multiple invalid - indexes when used with the :doc:`collMod ` + indexes when used with the :dbcommand:`collMod` command. The ``metadata`` validation option only scans collection metadata to diff --git a/source/includes/steps-clear-jumbo-flag-refine-key.yaml b/source/includes/steps-clear-jumbo-flag-refine-key.yaml index 64be6f8030d..e08c140af6b 100644 --- a/source/includes/steps-clear-jumbo-flag-refine-key.yaml +++ b/source/includes/steps-clear-jumbo-flag-refine-key.yaml @@ -80,7 +80,7 @@ content: | } ) The :dbcommand:`refineCollectionShardKey` command updates the - :doc:`chunk ranges ` and + :ref:`chunk ranges ` and :ref:`zone ranges ` to incorporate the new fields without modifying the range values of the existing key fields. That is, the refinement of the shard key does not diff --git a/source/reference/command/refineCollectionShardKey.txt b/source/reference/command/refineCollectionShardKey.txt index 1da22a25789..f732dd713c4 100644 --- a/source/reference/command/refineCollectionShardKey.txt +++ b/source/reference/command/refineCollectionShardKey.txt @@ -27,7 +27,7 @@ Definition As part of refining the shard key, the :dbcommand:`refineCollectionShardKey` command updates the - :doc:`chunk ranges ` and + :ref:`chunk ranges ` and :ref:`zone ranges ` to incorporate the new fields without modifying the range values of the existing key fields. That is, the refinement of the shard key does not diff --git a/source/reference/method/db.collection.find.txt b/source/reference/method/db.collection.find.txt index 0951fa7de04..d94f85ab293 100644 --- a/source/reference/method/db.collection.find.txt +++ b/source/reference/method/db.collection.find.txt @@ -265,7 +265,7 @@ Find All Documents in a Collection The :method:`find() ` method with no parameters returns all documents from a collection and returns all fields for the documents. For example, the following operation returns all documents in -the :doc:`bios collection `: +the :ref:`bios collection `: .. code-block:: javascript @@ -382,7 +382,7 @@ Query Embedded Documents ~~~~~~~~~~~~~~~~~~~~~~~~ The following examples query the ``name`` embedded field in the -:doc:`bios collection `. +:ref:`bios collection `. Query Exact Matches on Embedded Documents ````````````````````````````````````````` @@ -824,7 +824,7 @@ Limit the Number of Documents to Return The :method:`~cursor.limit()` method limits the number of documents in the result set. The following operation returns at most ``5`` documents -in the :doc:`bios collection `: +in the :ref:`bios collection `: .. code-block:: javascript @@ -838,7 +838,7 @@ Set the Starting Point of the Result Set The :method:`~cursor.skip()` method controls the starting point of the results set. The following operation skips the first ``5`` documents in -the :doc:`bios collection ` and +the :ref:`bios collection ` and returns all remaining documents: .. code-block:: javascript diff --git a/source/reference/method/db.getCollection.txt b/source/reference/method/db.getCollection.txt index d697ae7be1e..bf83b64e169 100644 --- a/source/reference/method/db.getCollection.txt +++ b/source/reference/method/db.getCollection.txt @@ -49,7 +49,7 @@ Behavior -------- The :method:`db.getCollection()` object can access any -:doc:`collection methods`. +:ref:`collection methods `. The collection specified may or may not exist on the server. If the collection does not exist, MongoDB creates it implicitly as part of diff --git a/source/reference/operator/aggregation/out.txt b/source/reference/operator/aggregation/out.txt index 431040d27b9..8dec38bd8b3 100644 --- a/source/reference/operator/aggregation/out.txt +++ b/source/reference/operator/aggregation/out.txt @@ -136,7 +136,7 @@ The ``$out`` stage has the following syntax: collection. The input collection for a pipeline can be sharded. To output to a sharded collection, see :pipeline:`$merge`. - The ``$out`` operator cannot write results to a - :doc:`capped collection `. + :ref:`capped collection `. - If you modify a collection with an :atlas:`Atlas Search ` index, you must first delete and then re-create the search index. Consider using :pipeline:`$merge` instead. diff --git a/source/reference/read-concern-snapshot.txt b/source/reference/read-concern-snapshot.txt index 6ba758139f4..e1a88554a47 100644 --- a/source/reference/read-concern-snapshot.txt +++ b/source/reference/read-concern-snapshot.txt @@ -137,4 +137,4 @@ Read Concern on Capped Collections Starting in version 5.0, you cannot use read concern :readconcern:`"snapshot"` when reading from a -:doc:`capped ` collection. +:ref:`capped ` collection. diff --git a/source/release-notes/4.0.txt b/source/release-notes/4.0.txt index e9136e675c4..00b5a23dcf4 100644 --- a/source/release-notes/4.0.txt +++ b/source/release-notes/4.0.txt @@ -1244,7 +1244,7 @@ MongoDB adds the ability to specify a start time Change Event Document Changes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The :doc:`change event documents ` include +The :ref:`change event documents ` include the new fields: - the ``clusterTime`` which corresponds to timestamp from the oplog diff --git a/source/release-notes/5.0.txt b/source/release-notes/5.0.txt index 0b639b7e58f..afcfda30e33 100644 --- a/source/release-notes/5.0.txt +++ b/source/release-notes/5.0.txt @@ -1519,7 +1519,7 @@ Closure of Inactive Cursors Opened Within a Session ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Starting in MongoDB 5.0, cursors created within a -:doc:`client session ` close +:ref:`client session ` close when the corresponding :ref:`server session ` ends with the :dbcommand:`killSessions` command, if the session times out, or if the client has exhausted the cursor. diff --git a/source/replication.txt b/source/replication.txt index 2d03df930fc..4fde62bec66 100644 --- a/source/replication.txt +++ b/source/replication.txt @@ -318,8 +318,8 @@ field in the operation: Transactions ------------ -Starting in MongoDB 4.0, :doc:`multi-document transactions -` are available for replica sets. +:ref:`Multi-document transactions ` are available for +replica sets. .. include:: /includes/extracts/transactions-read-pref.rst @@ -329,7 +329,7 @@ Starting in MongoDB 4.0, :doc:`multi-document transactions Change Streams -------------- -Starting in MongoDB 3.6, :doc:`change streams ` are +:ref:`Change streams ` are available for replica sets and sharded clusters. Change streams allow applications to access real-time data changes without the complexity and risk of tailing the oplog. Applications can use change streams to diff --git a/source/sharding.txt b/source/sharding.txt index 9270cfa3dda..9ac86c31411 100644 --- a/source/sharding.txt +++ b/source/sharding.txt @@ -368,7 +368,7 @@ and collation. Change Streams -------------- -Starting in MongoDB 3.6, :doc:`change streams ` are +:ref:`Change streams ` are available for replica sets and sharded clusters. Change streams allow applications to access real-time data changes without the complexity and risk of tailing the oplog. Applications can use change streams to diff --git a/source/tutorial/iterate-a-cursor.txt b/source/tutorial/iterate-a-cursor.txt index 097e05bacf3..511b0371bc5 100644 --- a/source/tutorial/iterate-a-cursor.txt +++ b/source/tutorial/iterate-a-cursor.txt @@ -122,7 +122,7 @@ Cursors Opened Within a Session ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Starting in MongoDB 5.0, cursors created within a -:doc:`client session ` close +:ref:`client session ` close when the corresponding :ref:`server session ` ends with the :dbcommand:`killSessions` command, if the session times out, or if the client has exhausted the cursor. diff --git a/source/tutorial/kerberos-auth-activedirectory-authz.txt b/source/tutorial/kerberos-auth-activedirectory-authz.txt index 28167d721d4..0d0d8bc482e 100644 --- a/source/tutorial/kerberos-auth-activedirectory-authz.txt +++ b/source/tutorial/kerberos-auth-activedirectory-authz.txt @@ -207,7 +207,7 @@ For more information on configuring roles and privileges, see: - :ref:`privilege actions ` -- :doc:`collection level access control ` +- :ref:`collection level access control ` Testing and Verification ------------------------ diff --git a/source/tutorial/manage-the-database-profiler.txt b/source/tutorial/manage-the-database-profiler.txt index 059e085ebae..a867d1a1c24 100644 --- a/source/tutorial/manage-the-database-profiler.txt +++ b/source/tutorial/manage-the-database-profiler.txt @@ -20,7 +20,7 @@ administration commands. The profiler writes all the data it collects to a :data:`system.profile <.system.profile>` collection, a -:doc:`capped collection ` in each profiled +:ref:`capped collection ` in each profiled database. See :doc:`/reference/database-profiler` for an overview of the :data:`system.profile <.system.profile>` documents created by the profiler. diff --git a/source/tutorial/manage-users-and-roles.txt b/source/tutorial/manage-users-and-roles.txt index 301578f43d0..ff262b6cf89 100644 --- a/source/tutorial/manage-users-and-roles.txt +++ b/source/tutorial/manage-users-and-roles.txt @@ -64,7 +64,7 @@ Create a User-Defined Role -------------------------- Roles grant users access to MongoDB resources. MongoDB provides a -number of :doc:`built-in roles ` that +number of :ref:`built-in roles ` that administrators can use to control access to a MongoDB system. However, if these roles cannot describe the desired set of privileges, you can create new roles in a particular database. From a2da958c3e90044a7cf41b4d819d66063ff753ca Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Thu, 28 Mar 2024 16:15:05 -0700 Subject: [PATCH 304/308] DOCS-16213-change-streams-update (#7049) Co-authored-by: jason-price-mongodb --- source/reference/command/serverStatus.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index aaf689b303f..2829e9dde57 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -1916,8 +1916,7 @@ metrics MB. To prevent the exception, see :pipeline:`$changeStreamSplitLargeEvent`. - .. versionadded:: 7.0 - + .. versionadded:: 7.0 (*Also available in 6.0.9 and 5.0.19*) .. serverstatus:: metrics.changeStreams.showExpandedEvents From cba7eeac64f3d2079e7cb77fd798fe516dcebf34 Mon Sep 17 00:00:00 2001 From: kanchana-mongodb <54281287+kanchana-mongodb@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:14:03 -0700 Subject: [PATCH 305/308] DOCSP-34454 Investigate feedback about anyElementTrue (#7047) --- .../operator/aggregation/anyElementTrue.txt | 50 ++++++++++++------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/source/reference/operator/aggregation/anyElementTrue.txt b/source/reference/operator/aggregation/anyElementTrue.txt index dc5e3faa0db..bb25ef3bccf 100644 --- a/source/reference/operator/aggregation/anyElementTrue.txt +++ b/source/reference/operator/aggregation/anyElementTrue.txt @@ -86,25 +86,41 @@ The following operation uses the :expression:`$anyElementTrue` operator to determine if the ``responses`` array contains any value that evaluates to ``true``: -.. code-block:: javascript +.. io-code-block:: + :copyable: true + + .. input:: + :language: javascript + + db.survey.aggregate( + [ + { $project: { responses: 1, isAnyTrue: { $anyElementTrue: [ "$responses" ] }, _id: 1 } } + ] + ) + + .. output:: + :language: javascript - db.survey.aggregate( [ - { $project: { responses: 1, isAnyTrue: { $anyElementTrue: [ "$responses" ] }, _id: 0 } } + { _id: 1, responses: [ true ], isAnyTrue: true }, + { _id: 2, responses: [ true, false ], isAnyTrue: true }, + { _id: 3, responses: [], isAnyTrue: false }, + { _id: 4, responses: [ 1, true, 'seven' ], isAnyTrue: true }, + { _id: 5, responses: [ 0 ], isAnyTrue: false }, + { _id: 6, responses: [ [] ], isAnyTrue: true }, + { _id: 7, responses: [ [ 0 ] ], isAnyTrue: true }, + { _id: 8, responses: [ [ false ] ], isAnyTrue: true }, + { _id: 9, responses: [ null ], isAnyTrue: false }, + { _id: 10, responses: [ null ], isAnyTrue: false } ] - ) - -The operation returns the following results: -.. code-block:: javascript +In the results: - { "responses" : [ true ], "isAnyTrue" : true } - { "responses" : [ true, false ], "isAnyTrue" : true } - { "responses" : [ ], "isAnyTrue" : false } - { "responses" : [ 1, true, "seven" ], "isAnyTrue" : true } - { "responses" : [ 0 ], "isAnyTrue" : false } - { "responses" : [ [ ] ], "isAnyTrue" : true } - { "responses" : [ [ 0 ] ], "isAnyTrue" : true } - { "responses" : [ [ false ] ], "isAnyTrue" : true } - { "responses" : [ null ], "isAnyTrue" : false } - { "responses" : [ undefined ], "isAnyTrue" : false } +- Document with ``_id: 1`` is ``true`` because the element inside the + ``responses`` array evaluates as ``true``. +- Documents with ``_id: 2`` and ``_id: 4`` are ``true`` because at least + one element inside the ``responses`` array evaluates as ``true``. +- Documents with ``_id: 6``, ``_id: 7``, and ``_id: 8`` are ``true`` + because the ``responses`` array, which is the array that + ``$anyElementTrue`` evaluated for the operation, contains a nested + array, which ``$anyElementTrue`` always evaluates as ``true``. From 050a4e1fc2f48c2807b9da2abaf3ad349579448f Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:15:55 -0500 Subject: [PATCH 306/308] DOCSP-37283 Fixes uniqueness bug for shard key (#6675) * DOCSP-37283 Fixes uniqueness bug for shard key * Fixes per Jocelyn * Fixes per Matt * Fixes per Matt --- source/core/sharding-shard-key.txt | 32 ++++++++++++++---------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/source/core/sharding-shard-key.txt b/source/core/sharding-shard-key.txt index 82b18d7844c..9ee95182623 100644 --- a/source/core/sharding-shard-key.txt +++ b/source/core/sharding-shard-key.txt @@ -64,30 +64,28 @@ of the shard key. For a ranged sharded collection, only the following indexes can be :ref:`unique `: -- the index on the shard key +- The index on the shard key -- a :term:`compound index` where the shard key is a :ref:`prefix +- A :term:`compound index` where the shard key is a :ref:`prefix ` -- the default ``_id`` index; **however**, the ``_id`` index only - enforces the uniqueness constraint per shard **if** the ``_id`` field - is **not** the shard key or the prefix of the shard key. +- The default ``_id`` index. - .. important:: Uniqueness and the ``_id`` Index + .. important:: - If the ``_id`` field is not the shard key or the prefix of the - shard key, ``_id`` index only enforces the uniqueness constraint - per shard and **not** across shards. + Sharded clusters only enforce the uniqueness constraint on + ``_id`` fields across the cluster when the ``_id`` field is + also the shard key. - For example, consider a sharded collection (with shard key ``{x: - 1}``) that spans two shards A and B. Because the ``_id`` key is - not part of the shard key, the collection could have a document - with ``_id`` value ``1`` in shard A and another document with - ``_id`` value ``1`` in shard B. + If the ``_id`` field is not the shard key or if it is only + the prefix to the shard key, the uniqueness constraint + applies only to the shard that stores the document. This + means that two or more documents can have the same ``_id`` + value, provided they occur on different shards. - If the ``_id`` field is not the shard key nor the prefix of the - shard key, MongoDB expects applications to enforce the uniqueness - of the ``_id`` values across the shards. + In cases where the ``_id`` field is not the shard key, + MongoDB expects applications to enforce the uniqueness of + ``_id`` values across the shards. The unique index constraints mean that: From 5c19c1e629f34a6a86416e3a7edef0e35101c6d4 Mon Sep 17 00:00:00 2001 From: Nick Villahermosa Date: Fri, 29 Mar 2024 13:09:27 -0400 Subject: [PATCH 307/308] DOCSP-38148 Removed link (#7056) * Removed link * removed link --- source/core/queryable-encryption/about-qe-csfle.txt | 7 +++---- source/core/queryable-encryption/features.txt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/source/core/queryable-encryption/about-qe-csfle.txt b/source/core/queryable-encryption/about-qe-csfle.txt index ea9a02e857e..1c2eba6847f 100644 --- a/source/core/queryable-encryption/about-qe-csfle.txt +++ b/source/core/queryable-encryption/about-qe-csfle.txt @@ -51,10 +51,9 @@ Encryption Algorithms ~~~~~~~~~~~~~~~~~~~~~ The new encryption algorithm for {+qe+} uses randomized encryption based on -`structured encryption -`__, which -produces different encrypted output values from the same input. This -prevents attackers from reverse-engineering the encryption. +structured encryption, which produces different encrypted output values +from the same input. This prevents attackers from reverse-engineering +the encryption. For detailed information on MongoDB's approach to {+qe+}, see the `Overview of {+qe+} diff --git a/source/core/queryable-encryption/features.txt b/source/core/queryable-encryption/features.txt index da9efe6aefe..110534cc6df 100644 --- a/source/core/queryable-encryption/features.txt +++ b/source/core/queryable-encryption/features.txt @@ -33,7 +33,7 @@ and only communicated to and from the server in encrypted form. Unlike :ref:`Client-Side Field Level Encryption ` that can use :ref:`Deterministic Encryption `, -{+qe+} uses fast, searchable encryption schemes based on `Structured Encryption `__. +{+qe+} uses fast, searchable encryption schemes based on structured encryption. These schemes produce different encrypted output values even when given the same cleartext input. From fb1e4831eac558bcfddb56fe2fcc84c6c2171c0f Mon Sep 17 00:00:00 2001 From: ayoubmanie <50721412+ayoubmanie@users.noreply.github.com> Date: Sun, 31 Mar 2024 12:37:49 +0000 Subject: [PATCH 308/308] Update model-embedded-one-to-many-relationships-between-documents.txt by removing redundant "the-the" error --- ...del-embedded-one-to-many-relationships-between-documents.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tutorial/model-embedded-one-to-many-relationships-between-documents.txt b/source/tutorial/model-embedded-one-to-many-relationships-between-documents.txt index a1a66848579..24784143764 100644 --- a/source/tutorial/model-embedded-one-to-many-relationships-between-documents.txt +++ b/source/tutorial/model-embedded-one-to-many-relationships-between-documents.txt @@ -22,7 +22,7 @@ relationship between connected data. Embedding connected data in a single document can reduce the number of read operations required to obtain data. In general, structure your schema so your application receives all of its required information in a single read operation. For example, you -can use the the embedded one-to-many model to describe the following relationships: +can use the embedded one-to-many model to describe the following relationships: - Country to major cities - Author to books