[SERVER-80541] [CQF] Add assertions that shard key is non-multikey Created: 30/Aug/23  Updated: 29/Oct/23  Resolved: 07/Sep/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Ben Shteinfeld Assignee: Ben Shteinfeld
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-09-18
Participants:

 Description   

The sharding subsystem ensures that the index backing a shard key (or the prefix of such an index) is non-multikey. This is make it clear which shard owns a particular document. There are some assumptions in the cascades rewrites that rely on this fact.

To avoid accidentally writing a unit test or translating a shard key in correctly, we should assert that the shard key provided to the optimizer metadata is non-multikey.



 Comments   
Comment by Githook User [ 07/Sep/23 ]

Author:

{'name': 'Ben Shteinfeld', 'email': 'ben.shteinfeld@mongodb.com', 'username': 'bshteinfeld'}

Message: SERVER-80541 [CQF] Assert that all components of the shard key are non-multikey during construction of the optimizer metadata
Branch: master
https://github.com/mongodb/mongo/commit/2def9849ad1659dbcbacc06af972fad2999f7b3c

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