[SERVER-79851] [CQF] Store collation-op along with the shard key in optimizer metadata Created: 08/Aug/23  Updated: 29/Oct/23  Resolved: 16/Aug/23

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

Type: Task 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

Issue Links:
Duplicate
is duplicated by SERVER-80102 Complete TODO listed in SERVER-78503 Closed
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-08-21
Participants:

 Description   

Currently we represent the shard key using the DistributionAndPaths struct. This struct is really about modeling the distribution/management of data between threads; it only stores the shard key as a vector of ABT paths, which is insufficient to model hashed shard keys.

The goal of this ticket is to add the ability to represent hashed shard keys in the metadata and refactor the existing rewrites to reference this new representation.



 Comments   
Comment by Githook User [ 15/Aug/23 ]

Author:

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

Message: SERVER-79851 Change shard key representation in optimizer metadata to be collation-op aware

This patch changes the optimizer's representation of the shard key from
an ABTVector to an IndexCollationSpec which stores a CollationOp
along-side each path. This will allow us to represent hashed shard keys.

This patch also moves the shard key from DistributionAndPaths to
ShardingMetadata to decouple the two.
Branch: master
https://github.com/mongodb/mongo/commit/3733fe4f24d8a0ad553a2a8ed6238db3dd7d1aa3

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