[SERVER-76948] Allow shard key fields to contain DBRefs Created: 09/May/23  Updated: 29/Oct/23  Resolved: 10/May/23

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 6.3.0, 7.0.0-rc0, 6.0.5, 4.4.20, 5.0.16
Fix Version/s: 7.1.0-rc0, 7.0.0-rc1, 6.0.7, 5.0.19, 4.4.23

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Problem/Incident
is caused by SERVER-74124 Disallow sharding with wildcard shard... Closed
Related
related to SERVER-77255 Shard key field validation for DBRefs... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0, v5.0, v4.4
Sprint: Sharding NYC 2023-05-15
Participants:

 Description   

SERVER-74124 introduced the code to disallow shard keys that contain parts that start with '$'. It turns out that check is too strict since it is valid to shard with a shard key with DBRefs (i.e. $id, $db and $ref).



 Comments   
Comment by Githook User [ 10/May/23 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-76948 Allow shard key fields to contain DBRefs

(cherry picked from commit ab5ca44eae30dba87f77d9533629322345ffb357)
Branch: v4.4
https://github.com/mongodb/mongo/commit/a6523c71fdbd98dcba7f313cf58ca5d0b78da310

Comment by Githook User [ 10/May/23 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-76948 Allow shard key fields to contain DBRefs

(cherry picked from commit ab5ca44eae30dba87f77d9533629322345ffb357)
Branch: v5.0
https://github.com/mongodb/mongo/commit/bfe268afb59ca881f38ae344d461ed6469eda529

Comment by Githook User [ 10/May/23 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-76948 Allow shard key fields to contain DBRefs

(cherry picked from commit ab5ca44eae30dba87f77d9533629322345ffb357)
Branch: v6.0
https://github.com/mongodb/mongo/commit/eb4753305e65ee592a9cca0d2b3e0c80812d8cf6

Comment by Githook User [ 10/May/23 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-76948 Allow shard key fields to contain DBRefs

(cherry picked from commit ab5ca44eae30dba87f77d9533629322345ffb357)
Branch: v7.0
https://github.com/mongodb/mongo/commit/ca1869245c59696f921b77f7c04dabf6700651af

Comment by Githook User [ 10/May/23 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-76948 Allow shard key fields to contain DBRefs
Branch: master
https://github.com/mongodb/mongo/commit/ab5ca44eae30dba87f77d9533629322345ffb357

Generated at Thu Feb 08 06:34:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.