Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4000

command to change shard key of a collection

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Sharding

      Description

      Changing shard keys is fundamentally very expensive, but a helper to do this would be useful. The main thing needed would be to do the operation with good parallelism.

      first cut might require the source collection be read only during the operation.

      might do something like

      • measure what the new distribution would be like by looking at a sampled set of records from the originating collection
      • presplit based on statistics above
      • cluster wide copy of data from src to dest collection
      • build the index(es) for dest after the copy to make things as fast as possible

      i suppose this is just a better version of cloneCollection which we'll want anyway.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                24 Vote for this issue
                Watchers:
                35 Start watching this issue

                Dates

                • Created:
                  Updated: