Skip to content

DOCS-14195 currentOp for ReshardingRecipientSvc #5064

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
Mar 5, 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
159 changes: 158 additions & 1 deletion source/reference/command/currentOp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,110 @@ Output Fields

.. versionadded:: 5.0

.. data:: currentOp.approxDocumentsToCopy

The approximate number of documents to be copied from the donor
shards to the recipient shards during the resharding operation. This
number is an estimate that is set at the beginning of the resharding
operation and does not change after it has been set. The number is
set to 0 when a new resharding operation starts. It is
possible for ``$currentOp.documentsCopied`` and
``$currentOp.bytesCopied`` to end up exceeding
``$currentOp.approxDocumentsToCopy`` and
``$currentOp.approxBytesToCopy``, respectively, if
the post-resharding data distribution is not perfectly uniform.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: currentOp.documentsCopied

The number of documents copied form donor shards to recipient shards
during the resharding operation. The number is set to 0 when a new
resharding operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: currentOp.approxBytesToCopy

The approximate number of bytes to be copied from the donor shards to
the recipient shards during the resharding operation. This number is
an estimate that is set at the beginning of the resharding operation
and does not change after it has been set. The number is set to 0
when a new resharding operation starts. It is possible for
``$currentOp.documentsCopied`` and ``$currentOp.bytesCopied`` to end
up exceeding ``$currentOp.approxDocumentsToCopy`` and
``$currentOp.approxBytesToCopy``, respectively, if the
post-resharding data distribution is not perfectly uniform.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: currentOp.bytesCopied

The number of bytes copied from donor shards to recipient shards
during the resharding operation. The number is set to 0 when a new
resharding operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: currentOp.totalCopyTimeElapsed

The total elapsed time, in seconds, for ongoing data copy tasks from
donor shards to recipient shards for the current resharding
operation. The time is set to 0 when a new resharding operation
starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: currentOp.oplogEntriesFetched

The number of entries fetched from the :term:`oplog` for the current
resharding operation. The number is set to 0 when a new resharding
operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: currentOp.oplogEntriesApplied

The number of entries applied to the :term:`oplog` for the current
resharding operation. The number is set to 0 when a new resharding
operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: currentOp.totalApplyTimeElapsed

The total elapsed time, in seconds, for the apply step of the
current resharding operation. In the apply step, recipient shards
apply :term:`oplog` entries to modify their data based on new
incoming writes from donor shards. The time is set to 0 when a new
resharding operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: currentOp.countWritesDuringCriticalSection

The number of writes perfomed in the critical section for the current
Expand Down Expand Up @@ -1207,6 +1311,59 @@ Output Fields

.. versionadded:: 5.0

.. data:: currentOp.recipientState

The current state of a recipient shard for a resharding operation.
The state is set to ``unused`` when a new resharding operation
starts.

Only present on a donor shard when a resharding operation is taking
place.

.. list-table::
:widths: 20 80
:header-rows: 1

* - State
- Description

* - ``unused``
- The resharding operation is about to start.

* - ``awaiting-fetch-timestamp``
- The recipient shard is waiting for the donor shards to be
prepared to donate their data.

* - ``creating-collection``
- The recipient shard is creating the new sharded collection.

* - ``cloning``
- The recipient shard is receiving data from the donor shards.

* - ``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.

* - ``steady-state``
- The recipient shard data is consistent with the donor shard
data.

* - ``strict-consistency``
- The recipient shard has all data changes.

* - ``renaming``
- The recipient shard renames the new sharded collection.

* - ``done``
- The resharding operation is complete.

* - ``error``
- An error occurred during the resharding operation.

.. versionadded:: 5.0

.. data:: currentOp.coordinatorState

The state of the resharding coordinator for the current resharding
Expand Down Expand Up @@ -1306,4 +1463,4 @@ Output Fields
* - ``canceled``
- The resharding operation was canceled.

.. versionadded:: 5.0
.. versionadded:: 5.0
157 changes: 157 additions & 0 deletions source/reference/operator/aggregation/currentOp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,110 @@ relevant for the operation:

.. versionadded:: 5.0

.. data:: $currentOp.approxDocumentsToCopy

The approximate number of documents to be copied from the donor
shards to the recipient shards during the resharding operation. This
number is an estimate that is set at the beginning of the resharding
operation and does not change after it has been set. The number is
set to 0 when a new resharding operation starts. It is
possible for ``$currentOp.documentsCopied`` and
``$currentOp.bytesCopied`` to end up exceeding
``$currentOp.approxDocumentsToCopy`` and
``$currentOp.approxBytesToCopy``, respectively, if
the post-resharding data distribution is not perfectly uniform.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: $currentOp.documentsCopied

The number of documents copied form donor shards to recipient shards
during the resharding operation. The number is set to 0 when a new
resharding operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: $currentOp.approxBytesToCopy

The approximate number of bytes to be copied from the donor shards to
the recipient shards during the resharding operation. This number is
an estimate that is set at the beginning of the resharding operation
and does not change after it has been set. The number is set to 0
when a new resharding operation starts. It is possible for
``$currentOp.documentsCopied`` and ``$currentOp.bytesCopied`` to end
up exceeding ``$currentOp.approxDocumentsToCopy`` and
``$currentOp.approxBytesToCopy``, respectively, if the
post-resharding data distribution is not perfectly uniform.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: $currentOp.bytesCopied

The number of bytes copied from donor shards to recipient shards
during the resharding operation. The number is set to 0 when a new
resharding operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: $currentOp.totalCopyTimeElapsed

The total elapsed time, in seconds, for ongoing data copy tasks from
donor shards to recipient shards for the current resharding
operation. The time is set to 0 when a new resharding operation
starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: $currentOp.oplogEntriesFetched

The number of entries fetched from the :term:`oplog` for the current
resharding operation. The number is set to 0 when a new resharding
operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: $currentOp.oplogEntriesApplied

The number of entries applied to the :term:`oplog` for the current
resharding operation. The number is set to 0 when a new resharding
operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: $currentOp.totalApplyTimeElapsed

The total elapsed time, in seconds, for the apply step of the
current resharding operation. In the apply step, recipient shards
apply :term:`oplog` entries to modify their data based on new
incoming writes from donor shards. The time is set to 0 when a new
resharding operation starts.

Only present on a recipient shard when a resharding operation is
taking place.

.. versionadded:: 5.0

.. data:: $currentOp.countWritesDuringCriticalSection

The number of writes perfomed in the critical section for the current
Expand Down Expand Up @@ -1664,6 +1768,59 @@ relevant for the operation:

.. versionadded:: 5.0

.. data:: $currentOp.recipientState

The current state of a recipient shard for a resharding operation.
The state is set to ``unused`` when a new resharding operation
starts.

Only present on a donor shard when a resharding operation is taking
place.

.. list-table::
:widths: 20 80
:header-rows: 1

* - State
- Description

* - ``unused``
- The resharding operation is about to start.

* - ``awaiting-fetch-timestamp``
- The recipient shard is waiting for the donor shards to be
prepared to donate their data.

* - ``creating-collection``
- The recipient shard is creating the new sharded collection.

* - ``cloning``
- The recipient shard is receiving data from the donor shards.

* - ``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.

* - ``steady-state``
- The recipient shard data is consistent with the donor shard
data.

* - ``strict-consistency``
- The recipient shard has all data changes.

* - ``renaming``
- The recipient shard renames the new sharded collection.

* - ``done``
- The resharding operation is complete.

* - ``error``
- An error occurred during the resharding operation.

.. versionadded:: 5.0

.. data:: $currentOp.coordinatorState

The state of the resharding coordinator for the current resharding
Expand Down