[SERVER-84741] Ensure the shard key is rewritten for the buckets collection when calling validateShardKeyIndexExistsOrCreateIfPossible Created: 10/Jan/24  Updated: 16/Jan/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Gil Alon Assignee: Backlog - Cluster Scalability
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-84180 refineCollectionShardKey does not rew... Open
is related to SERVER-77112 shardCollection and createIndex creat... Closed
Assigned Teams:
Cluster Scalability
Participants:

 Description   

SERVER-77112 and SERVER-84180 are both bugs where the index backing the shard key is not correctly rewritten for time-series buckets collection. To fix this we rewrite the index backing the shard key to use buckets collection fields. However, to fit with existing behavior validateShardKeyIndexExistsOrCreateIfPossible expects the shard key to already go through a partial rewrite and we must pass time-series options into this function call. Before calling validateShardKeyIndexExistsOrCreateIfPossible the shard key must have these two changes:

  1. the timeField must be rewritten to "control.min.time".
  2. the metaField should be rewritten to use "meta".

This ticket is ensuring the rewrite takes place and thus the correct index backing the shard key is created during reshardCollection.


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