Skip to content

DOCS-14542: Update resharding related states #5589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 28 additions & 34 deletions source/reference/command/currentOp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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
Expand Down
143 changes: 73 additions & 70 deletions source/reference/command/serverStatus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand All @@ -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.*
Expand All @@ -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.*

Expand Down
Loading