Skip to content

Update sharding-introduction.txt #1834

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
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
15 changes: 7 additions & 8 deletions source/core/sharding-introduction.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,17 +201,16 @@ has 100 chunks on *shard 1* and 50 chunks on *shard 2*, the balancer
will migrate chunks from *shard 1* to *shard 2* until the collection
achieves balance.

The shards manage *chunk migrations* as a background operation. During
migration, all requests for a chunk's data address the "origin" shard.

In a chunk migration, the *destination shard* receives all the
documents in the chunk from the *origin shard*. Then, the destination
The shards manage *chunk migrations* as a background operation between
an *origin shard* and a *destination shard*. During a chunk migration,
the *destination shard* is sent all the current documents in the chunk
from the *origin shard*. Next, the destination
shard captures and applies all changes made to the data during
migration process. Finally, the destination shard updates the metadata
regarding the location of the chunk on *config server*.
the migration process. Finally, the metadata
regarding the location of the chunk on *config server* is updated.

If there's an error during the migration, the balancer aborts the
process leaving the chunk on the origin shard. MongoDB removes the
process leaving the chunk unchanged on the origin shard. MongoDB removes the
chunk's data from the origin shard **after** the migration completes
successfully.

Expand Down