Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-622

Documentation on 'movePrimary' is incorrect

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            william.zola@10gen.com William Zola
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 17 weeks, 5 days ago