Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-84741

Ensure the shard key is rewritten for the buckets collection when calling validateShardKeyIndexExistsOrCreateIfPossible

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Cluster Scalability
    • Fully Compatible
    • Cluster Scalability 2024-4-1, Cluster Scalability 2024-4-15

      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.

            Assignee:
            kshitij.gupta@mongodb.com Kshitij Gupta
            Reporter:
            gil.alon@mongodb.com Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: