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

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Cluster Scalability

    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.

      Attachments

        Activity

          People

            backlog-server-cluster-scalability Backlog - Cluster Scalability
            gil.alon@mongodb.com Gil Alon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: