[DOCS-622] Documentation on 'movePrimary' is incorrect Created: 17/Oct/12  Updated: 19/Oct/12  Resolved: 19/Oct/12

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

Type: Bug Priority: Major - P3
Reporter: William Zola Assignee: Sam Kleinman (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/reference/command/movePrimary/


Issue Links:
Depends
Related
Participants:
Days since reply: 11 years, 17 weeks, 5 days ago

 Description   

The documentation on 'movePrimary' is incorrect on several counts:

  1. Usage

Current text:

Only use movePrimary when removing a shard from a sharded cluster.

Correct text:

Only use movePrimary when the database does not contain any collections with data

Justification: there are a number of use cases where you may want to do a 'movePrimary' on a database which does not contain any collections. The most notable use is to create a federated database: UN-sharded 'collectionA' lives in 'databaseA' which has a primary shard of 'shardA'; while UN-sharded 'collectionB' lives in 'databaseB' which has a primary shard of 'shardB';

  1. Warning:

Current text:

Before running movePrimary you must ensure that no sharded data exists on this shard.

Correct text:

Only use movePrimary when the database does not contain any collections with data.

Justification: Everything in the warning is true about sharded collections. However, in addition, if you use 'movePrimary' command on a database which contains an UN-sharded collection, any writes performed to that collection while the move is "in flight" may be lost.



 Comments   
Comment by Sam Kleinman (Inactive) [ 19/Oct/12 ]

Publishing soon.

Comment by auto [ 19/Oct/12 ]

Author:

{u'date': u'2012-10-19T11:06:22-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}

Message: DOCS-622: edits and corrections
Branch: master
https://github.com/mongodb/docs/commit/08330c9591276e0b365ea30b229476bec7f2fdc8

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