[SERVER-42390] Allow documents in a sharded collection to not contain all shard key fields Created: 24/Jul/19  Updated: 29/Oct/23  Resolved: 24/Sep/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: Blake Oler
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Documented
Problem/Incident
Related
related to SERVER-44382 Allow upserting a document that is mi... Closed
related to SERVER-46505 Add back requirement that full shard ... Closed
Backwards Compatibility: Major Change
Sprint: Sharding 2019-08-26, Sharding 2019-09-09, Sharding 2019-09-23, Sharding 2019-10-07
Participants:
Linked BF Score: 56

 Description   

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.



 Comments   
Comment by Githook User [ 24/Sep/19 ]

Author:

{'name': 'Blake Oler', 'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com'}

Message: SERVER-42390 Change search beta test to reflect relaxed constraints on missing shard key fields
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/c28fec04ba65ecf45a8755c03c5a9b63e3e41c04

Comment by Githook User [ 24/Sep/19 ]

Author:

{'name': 'Blake Oler', 'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com'}

Message: SERVER-42390 Allow documents in a sharded collection to not contain all shard key fields
Branch: master
https://github.com/mongodb/mongo/commit/2f5feed026e1c22bce29cf2efe746d55879d4a14

Generated at Thu Feb 08 05:00:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.