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

Remove uses of config.chunks' _id field

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • Sharding
    • Sharding 2017-03-27

      The value of _id is a string concatenation of namespace and minkey values. Reads/updates can instead by done directly on the ns and min, for which there is an index.

      We wish to eventually change the schema of the config.chunks collection, because it is not optimized. The first step is to stop using (reading) the _id field so that it can more easily (less backwards compatibility issues) be changed in future releases. It is currently used to identify documents in updates, which can be found by grepping for instances of ChunkType::name.

      For future reference, a first sketch of a more ideal schema is:

      {_id: {ns : " ", min: keystring}, shard: "string", ....}

      Schema changes should be revisited after the collection UUID project (PM-297) is designed because that project could require config.chunks schema changes.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: