[DOCS-2211] Documentation on Secondary Throttle does not describe what it actually does Created: 08/Nov/13  Updated: 11/Jan/17  Resolved: 16/Jan/14

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: William Zola Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

http://docs.mongodb.org/manual/tutorial/configure-sharded-cluster-balancer/#require-replication-before-chunk-migration-secondary-throttle


Issue Links:
Depends
Participants:
Days since reply: 10 years, 4 weeks, 6 days ago

 Description   

The documentation on Secondary Throttle does not accurately describe how it changes the behavior of migration.

When Secondary Throttle is not set, then the migration code will copy the documents from the FROM shard to the TO shard as quickly as it can, without waiting for replication. When all of the documents have been copied, but before the migration enters the critical section, the FROM shard will wait for replication to complete to a MAJORITY of the nodes in the destination shard.

Ref: https://github.com/mongodb/mongo/blob/r2.4.7/src/mongo/s/d_migrate.cpp#L1965-L1980

This has the effect of creating a bottleneck right at the end of the document movement, as the migration needs to wait for all of the writes to replicate.

When Secondary Throttle is set, then the FROM shard will wait for replication to complete to a majority of the nodes in the TO shard after each document is inserted in the TO shard.

Ref: https://github.com/mongodb/mongo/blob/r2.4.7/src/mongo/s/d_migrate.cpp#L905-L911

In addition to this, the FROM shard will always wait for the replication to complete to the TO shard before entering the critical section.

The net effect of this is to smooth out the load and reduce the overall load on the replica set.

The current documentation is incorrect in two ways:

  • It implies that there is no wait for replication if Secondary Throttle is not set
  • It gives the write concern for Secondary Throttle as {w:2}, when it should really be {w:"majority"}


 Comments   
Comment by Githook User [ 16/Jan/14 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-2079 DOCS-2211 chunk migration and replication
Branch: master
https://github.com/mongodb/docs/commit/40cdb204d66ba9e3c6e7f8930c731f1d504f39a2

Comment by Githook User [ 16/Jan/14 ]

Author:

{u'username': u'Zackrobat', u'name': u'Zack Brown', u'email': u'zack.brown@10gen.com'}

Message: DOCS-2079 and DOCS-2211: correct secondary throttle explanation

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/efcfe079f9de78f937cd755dc79be1b362bdbf9a

Generated at Thu Feb 08 07:42:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.