From 73bc1b5aa5ef3ff90d49b5f7de7f90d9caf53d40 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Thu, 15 Jul 2021 17:23:58 +0200 Subject: [PATCH] DOCS-14542: Update resharding related states --- source/reference/command/currentOp.txt | 62 ++++---- source/reference/command/serverStatus.txt | 143 +++++++++--------- .../operator/aggregation/currentOp.txt | 63 ++++---- 3 files changed, 129 insertions(+), 139 deletions(-) diff --git a/source/reference/command/currentOp.txt b/source/reference/command/currentOp.txt index 1e8281e4509..f7d6f180516 100644 --- a/source/reference/command/currentOp.txt +++ b/source/reference/command/currentOp.txt @@ -1272,7 +1272,8 @@ Output Fields - Description * - ``unused`` - - The resharding operation is about to start. + - The resharding operation is about to start or recovering from + a primary failover. * - ``preparing-to-donate`` - The donor shard is preparing to donate data to the recipient @@ -1285,23 +1286,21 @@ Output Fields - The donor shard is donating :term:`oplog` entries to the recipient shards. - * - ``preparing-to-mirror`` - - The donor shard is preventing new incoming write operations to - the collection that is being resharded. + * - ``preparing-to-block-writes`` + - The donor shard is about to prevent new incoming write + operations to the collection that is being resharded. - * - ``mirroring`` + * - ``error`` + - An error occurred during the resharding operation. + + * - ``blocking-writes`` - The donor shard is preventing new incoming write operations and the donor shard has notified all recipient shards that new incoming writes are prevented. - * - ``dropping`` - - The donor shard is dropping the old sharded collection. - * - ``done`` - - The resharding operation is complete. - - * - ``error`` - - An error occurred during the resharding operation. + - The donor shard has dropped the old sharded collection and the + resharding operation is complete. .. versionadded:: 5.0 @@ -1322,7 +1321,8 @@ Output Fields - Description * - ``unused`` - - The resharding operation is about to start. + - The resharding operation is about to start or recovering from + a primary failover. * - ``awaiting-fetch-timestamp`` - The recipient shard is waiting for the donor shards to be @@ -1337,24 +1337,18 @@ Output Fields * - ``applying`` - The recipient shard is applying :term:`oplog` entries to modify its copy of the data based on the new incoming writes - from donor shards. The recipient shard data is not yet - consistent with the donor shard data. + from donor shards. - * - ``steady-state`` - - The recipient shard data is consistent with the donor shard - data. + * - ``error`` + - An error occurred during the resharding operation. * - ``strict-consistency`` - - The recipient shard has all data changes. - - * - ``renaming`` - - The recipient shard renames the new sharded collection. + - The recipient shard has all data changes stored in a temporary + collection. * - ``done`` - The resharding operation is complete. - * - ``error`` - - An error occurred during the resharding operation. .. versionadded:: 5.0 @@ -1376,7 +1370,8 @@ Output Fields - Description * - ``unused`` - - The resharding operation is about to start. + - The resharding operation is about to start or recovering from + a primary failover. * - ``initializing`` - The resharding coordinator has inserted the coordinator @@ -1394,7 +1389,7 @@ Output Fields - has inserted entries into ``config.tags`` for any zones associated with the new shard key. - The coordinator informs participants shards to begin the + The coordinator informs participant shards to begin the resharding operation. The coordinator then waits until all donor shards have picked a ``minFetchTimestamp`` and are ready to donate. @@ -1410,24 +1405,23 @@ Output Fields shards. The coordinator waits for all recipients to finish applying :term:`oplog` entries. - * - ``mirroring`` + * - ``blocking-writes`` - The resharding coordinator informs donor shards to prevent new incoming write operations to the collection being resharded. The coordinator then waits for all recipients to have all data changes. - * - ``decision-persisted`` + * - ``aborting`` + - An unrecoverable error occurred during the resharding + operation or the :dbcommand:`abortReshardCollection` command + (or the :method:`sh.abortReshardCollection()` method) was run. + + * - ``committing`` - The resharding coordinator removes the ``config.collections`` entry for the temporary resharding collection. The coordinator then adds the ``recipientFields`` to the source collection's entry. - * - ``done`` - - The resharding operation is complete. - - * - ``error`` - - An error occurred during the resharding operation. - .. versionadded:: 5.0 .. data:: currentOp.opStatus diff --git a/source/reference/command/serverStatus.txt b/source/reference/command/serverStatus.txt index ddfb42cacaf..c514914dff1 100644 --- a/source/reference/command/serverStatus.txt +++ b/source/reference/command/serverStatus.txt @@ -3253,42 +3253,41 @@ shardingStatistics * - 0 - ``unused`` - - Shard is not a donor in the current resharding operation. + - The shard is not a donor in the current resharding operation. * - 1 - ``preparing-to-donate`` - - Donor shard preparing to donate data to recipient shard. + - The donor shard is preparing to donate data to the recipient + shards. * - 2 - ``donating-initial-data`` - - Donor shard donating data to recipient shard. + - The donor shard is donating data to the recipient shards. * - 3 - ``donating-oplog-entries`` - - Donor shard donating :term:`oplog` entries to recipient shard. + - The donor shard is donating :term:`oplog` entries to the + recipient shards. * - 4 - - ``preparing-to-mirror`` - - Donor shard preventing new incoming write operations to the - collection being resharded. + - ``preparing-to-block-writes`` + - The donor shard is about to prevent new incoming write + operations to the collection that is being resharded. * - 5 - - ``mirroring`` - - Donor shard preventing new incoming write operations, and - donor shard has notified all recipient shards that new - incoming writes are prevented. + - ``error`` + - An error occurred during the resharding operation. * - 6 - - ``dropping`` - - Donor shard dropping old sharded collection. + - ``blocking-writes`` + - The donor shard is preventing new incoming write operations + and the donor shard has notified all recipient shards that new + incoming writes are prevented. * - 7 - ``done`` - - Resharding operation is complete. - - * - 8 - - ``error`` - - Error occurred during resharding operation. + - The donor shard has dropped the old sharded collection and the + resharding operation is complete. *Only present when run on a shard or config server. Returns 0 on a config server.* @@ -3313,42 +3312,37 @@ shardingStatistics - Shard is not a recipient in the current resharding operation. * - 1 - - ``creating-collection`` - - Recipient shard creating new sharded collection. + - ``awaiting-fetch-timestamp`` + - The recipient shard is waiting for the donor shards to be + prepared to donate their data * - 2 - - ``cloning`` - - Recipient shard receiving data from donor shards. + - ``creating-collection`` + - The recipient shard is creating the new sharded collection. * - 3 - - ``applying`` - - Recipient shard modifying its copy of the data based on the - new incoming writes from donor shards. Recipient shards - apply changes from :term:`oplog` entries generated by - donor shards. Recipient shard data is not yet consistent with - donor shard data, but will be when the steady state is - reached. + - ``cloning`` + - The recipient shard is receiving data from the donor shards. * - 4 - - ``steady-state`` - - Steady state is reached. Recipient shard data is consistent - with donor shard data. + - ``applying`` + - The recipient shard is applying :term:`oplog` entries to + modify its copy of the data based on the new incoming writes + from donor shards. * - 5 - - ``strict-consistency`` - - Recipient shard has all data changes. + - ``error`` + - An error occurred during the resharding operation. * - 6 - - ``renaming`` - - Recipient shard renaming new sharded collection. + - ``strict-consistency`` + - The recipient shard has all data changes stored in a temporary + collection. * - 7 - ``done`` - - Resharding operation is complete. + - The resharding operation is complete. - * - 8 - - ``error`` - - Error occurred during resharding operation. *Only present when run on a shard or config server. Returns 0 on a config server.* @@ -3372,55 +3366,64 @@ shardingStatistics * - 0 - ``unused`` - - Shard is not the coordinator in the current resharding + - The shard is not the coordinator in the current resharding operation. * - 1 - ``initializing`` - - Resharding coordinator informs shards to begin resharding - operation. + - The resharding coordinator has inserted the coordinator + document into ``config.reshardingOperations`` and has added + the ``reshardingFields`` to the ``config.collections`` entry + for the original collection. * - 2 - ``preparing-to-donate`` - - Resharding coordinator informs donor shards to prepare to - donate data to recipient shards. + - The resharding coordinator + + - has created a ``config.collections`` entry for the temporary + resharding collection. + - has inserted entries into ``config.chunks`` for ranges based + on the new shard key. + - has inserted entries into ``config.tags`` for any zones + associated with the new shard key. + + The coordinator informs participant shards to begin the + resharding operation. The coordinator then waits until all + donor shards have picked a ``minFetchTimestamp`` and are ready + to donate. * - 3 - ``cloning`` - - Resharding coordinator informs donor shards to donate data to - recipient shards. + - The resharding coordinator informs donor shards to donate data + to recipient shards. The coordinator waits for all recipients + to finish cloning the data from the donor. * - 4 - ``applying`` - - Resharding coordinator informs recipient shards to modify the - copy of data based on new incoming writes from donor shards. + - The resharding coordinator informs recipient shards to modify + their copies of data based on new incoming writes from donor + shards. The coordinator waits for all recipients to finish + applying :term:`oplog` entries. * - 5 - - ``mirroring`` - - Resharding coordinator informs donor shards to prevent new + - ``blocking-writes`` + - The resharding coordinator informs donor shards to prevent new incoming write operations to the collection being resharded. + The coordinator then waits for all recipients to have all data + changes. * - 6 - - ``committed`` - - Resharding coordinator has updated the metadata - for the collection being resharded, but the resharding - coordinator has not yet informed the donor or recipient shards - of the update. The metadata is stored in the - :data:`~config.collections`, :data:`~config.chunks`, and - :data:`~config.tags` collections. + - ``aborting`` + - An unrecoverable error occurred during the resharding + operation or the :dbcommand:`abortReshardCollection` command + (or the :method:`sh.abortReshardCollection()` method) was run. - * - 7 - - ``renaming`` - - Resharding coordinator informs recipient shards to rename new - sharded collection. - - * - 8 - - ``done`` - - Resharding operation is complete. - - * - 9 - - ``error`` - - Error occurred during resharding operation. + * - 6 + - ``committing`` + - The resharding coordinator removes the ``config.collections`` + entry for the temporary resharding collection. The coordinator + then adds the ``recipientFields`` to the source collection's + entry. *Only present when run on a shard or config server.* diff --git a/source/reference/operator/aggregation/currentOp.txt b/source/reference/operator/aggregation/currentOp.txt index 7f4e7796e0f..c5309cdb259 100644 --- a/source/reference/operator/aggregation/currentOp.txt +++ b/source/reference/operator/aggregation/currentOp.txt @@ -1739,7 +1739,8 @@ relevant for the operation: - Description * - ``unused`` - - The resharding operation is about to start. + - The resharding operation is about to start or recovering from + a primary failover. * - ``preparing-to-donate`` - The donor shard is preparing to donate data to the recipient @@ -1752,23 +1753,21 @@ relevant for the operation: - The donor shard is donating :term:`oplog` entries to the recipient shards. - * - ``preparing-to-mirror`` - - The donor shard is preventing new incoming write operations to - the collection that is being resharded. + * - ``preparing-to-block-writes`` + - The donor shard is about to prevent new incoming write + operations to the collection that is being resharded. - * - ``mirroring`` + * - ``error`` + - An error occurred during the resharding operation. + + * - ``blocking-writes`` - The donor shard is preventing new incoming write operations and the donor shard has notified all recipient shards that new incoming writes are prevented. - * - ``dropping`` - - The donor shard is dropping the old sharded collection. - * - ``done`` - - The resharding operation is complete. - - * - ``error`` - - An error occurred during the resharding operation. + - The donor shard has dropped the old sharded collection and the + resharding operation is complete. .. versionadded:: 5.0 @@ -1789,7 +1788,8 @@ relevant for the operation: - Description * - ``unused`` - - The resharding operation is about to start. + - The resharding operation is about to start or recovering from + a primary failover. * - ``awaiting-fetch-timestamp`` - The recipient shard is waiting for the donor shards to be @@ -1804,25 +1804,18 @@ relevant for the operation: * - ``applying`` - The recipient shard is applying :term:`oplog` entries to modify its copy of the data based on the new incoming writes - from donor shards. The recipient shard data is not yet - consistent with the donor shard data. + from donor shards. - * - ``steady-state`` - - The recipient shard data is consistent with the donor shard - data. + * - ``error`` + - An error occurred during the resharding operation. * - ``strict-consistency`` - - The recipient shard has all data changes. - - * - ``renaming`` - - The recipient shard renames the new sharded collection. + - The recipient shard has all data changes stored in a temporary + collection. * - ``done`` - The resharding operation is complete. - * - ``error`` - - An error occurred during the resharding operation. - .. versionadded:: 5.0 .. data:: $currentOp.coordinatorState @@ -1843,7 +1836,8 @@ relevant for the operation: - Description * - ``unused`` - - The resharding operation is about to start. + - The resharding operation is about to start or recovering from + a primary failover. * - ``initializing`` - The resharding coordinator has inserted the coordinator @@ -1861,7 +1855,7 @@ relevant for the operation: - has inserted entries into ``config.tags`` for any zones associated with the new shard key. - The coordinator informs participants shards to begin the + The coordinator informs participant shards to begin the resharding operation. The coordinator then waits until all donor shards have picked a ``minFetchTimestamp`` and are ready to donate. @@ -1877,24 +1871,23 @@ relevant for the operation: shards. The coordinator waits for all recipients to finish applying :term:`oplog` entries. - * - ``mirroring`` + * - ``blocking-writes`` - The resharding coordinator informs donor shards to prevent new incoming write operations to the collection being resharded. The coordinator then waits for all recipients to have all data changes. - * - ``decision-persisted`` + * - ``aborting`` + - An unrecoverable error occurred during the resharding + operation or the :dbcommand:`abortReshardCollection` command + (or the :method:`sh.abortReshardCollection()` method) was run. + + * - ``committing`` - The resharding coordinator removes the ``config.collections`` entry for the temporary resharding collection. The coordinator then adds the ``recipientFields`` to the source collection's entry. - * - ``done`` - - The resharding operation is complete. - - * - ``error`` - - An error occurred during the resharding operation. - .. versionadded:: 5.0 .. data:: $currentOp.opStatus