Skip to content

DOCS-1190 asynchronous chunk deletion #1264

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

Closed
wants to merge 1 commit into from
Closed
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
14 changes: 14 additions & 0 deletions source/reference/command/moveChunk-field.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,18 @@ description: |
for replication to :term:`secondaries <secondary>` when it copies
and deletes data during chunk migrations. For details, see
:ref:`sharded-cluster-config-secondary-throttle`.
---
object:
name: moveChunk
type: command
field:
optional: true
type: field
name: _waitForDelete
type: Boolean
position: 6
description: |
Internal option for test purposess. The default is ``false``. If set
to ``true``, the delete phase of a :dbcommand:`moveChunk` operation
blocks.
...
6 changes: 4 additions & 2 deletions source/reference/command/moveChunk.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Definition
db.runCommand( { moveChunk : <namespace> ,
find : <query> ,
to : <string>,
_secondaryThrottle : <boolean> } )
_secondaryThrottle : <Boolean>,
_waitForDelete : <Boolean> } )

Alternately:

Expand All @@ -28,7 +29,8 @@ Definition
db.runCommand( { moveChunk : <namespace> ,
bounds : <array> ,
to : <string>,
_secondaryThrottle : <boolean> } )
_secondaryThrottle : <Boolean>,
_waitForDelete : <Boolean> } )

The :dbcommand:`moveChunk` command has the following fields:

Expand Down
23 changes: 23 additions & 0 deletions source/release-notes/2.4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,29 @@ potential speed of a chunk migration, but increases reliability and
ensures that a large number of chunk migrations *cannot* affect the
availability of a sharded cluster.

Chunk Migration Queuing Improvements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The MongoDB :term:`balancer` increases performance for moving multiple
chunks off an overloaded shard, decreasing the time it takes to reduce
the shard's read and write load. A migration no longer waits for its
cleanup phase before completing, which means a second chunk migration
can begin while the first migration's cleanup is still in progress. The
cleanup phase is the deletion phase, where the balancer deletes the
documents in the original location once they are fully migrated to the
new location.

This change in queuing behavior helps when the cluster is heavily imbalanced,
allowing shards to unload chunks more quickly. This is the case, for
example, when doing initial data loads without pre-splitting and when
adding new shards. The improvement also means that migration scripts
that use the :dbcommand:`moveChunk` command will no longer wait
for chunk cleanup and may proceed more quickly.

The cleanup might persist longer in some cases. Also, data from multiple
migrations can be orphaned during a crash of a replica-set primary if
multiple cleanups are queued but not yet completed.

BSON Document Validation Enabled by Default for ``mongod`` and ``mongorestore``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down