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

command to change shard key of a collection

    XMLWordPrintableJSON

Details

    • Sharding NYC

    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

        Activity

          People

            backlog-server-sharding-nyc [DO NOT USE] Backlog - Sharding NYC
            dwight@mongodb.com Dwight Merriman
            Votes:
            31 Vote for this issue
            Watchers:
            43 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: