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

Allow documents in a sharded collection to not contain all shard key fields

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Major Change
    • Sharding 2019-08-26, Sharding 2019-09-09, Sharding 2019-09-23, Sharding 2019-10-07
    • 56

      As described in this section of the design document, change shard key value extraction for orphan filtering to treat missing shard key fields as null values (like an index) to allow documents in a sharded collection to not contain every field in the shard key. (Previously such documents were considered orphaned and always filtered out of sharded query results.)

      In addition to updating shard key extraction for filtering, the rules for targeting queries should be updated as described in the design document section linked above. All checks used to enforce documents contain the full shard key can be removed (like the checkShardingIndex command).

      When this ticket is completed, the generated docs ticket should include the need to document that after a downgrade any documents missing a shard key field will become orphaned.

            Assignee:
            blake.oler@mongodb.com Blake Oler
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: