Operational Defect Database

BugZero found this defect 26 days ago.

MongoDB | 2651710

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

Last update date:

4/23/2024

Affected products:

MongoDB Server

Affected releases:

7.2.0

7.3.0

8.0.0-rc2

Fixed releases:

8.0 Required

Description:

Info

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.

Top User Comments


Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Needs Scheduling

Learn More

Search:

...