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

Resharding incorrectly builds {locale: "simple"} secondary indexes with collection's non-"simple" default collation

    • Cluster Scalability
    • Fully Compatible
    • ALL
    • v8.0, v7.3
    • Cluster Scalability 2024-4-29, Cluster Scalability 2024-5-13

      Prior to PM-2322 (7.2), the recipient shards in the resharding operation would call MigrationDestinationManager::cloneCollectionIndexesAndOptions() to create the temporary resharding collection with the collection options, the _id index, and all secondary indexes with the collection still being empty. Post the work done under PM-2322, the recipient shards defer building all secondary indexes until after their initial data clone which speeds up the overall resharding operation. However, the IndexBuildsCoordinator::startIndexBuild() interface interprets the index specifications as-if they had been provided from the createIndexes command and fills the collection's default collation where the collation parameter had been omitted in the index specification. Instead, the absence of the collation parameter in the index specification must be interpreted as {locale: "simple"}.

      One solution would be to change the RecipientStateMachine to explicitly fill in {locale: "simple"} into the index specifications from the listIndexes output. We should also look to see if there is a function which does this already or another method for IndexBuildsCoordinator which accepts the index specifications verbatim.

            Assignee:
            kshitij.gupta@mongodb.com Kshitij Gupta
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: