ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0, 9.1.0-rc1024, 9.0.4
    • Affects Version/s: 9.1.0-rc0, 9.0.0
    • Component/s: None
    • None
    • Catalog and Routing
    • Minor Change
    • v9.0
    • CAR Team 2026-10-12
    • 🟦 Shard Catalog
    • None
    • None
    • None
    • None
    • None
    • None

      Impact

      Since SERVER-89953, on FCV 9.0+, listIndexes includes collation: { locale: 'simple' } on all the indexes without an explicit collation.

      This causes mongoose’s Model.syncIndexes function to always drop and re-create the collection indexes, even if the expected indexes are already built. This happens since the collation field added by SERVER-89953 makes Mongoose's diff logic consider the built index doesn't match the one defined in the code model and needs to be aligned.

      A common pattern is to call Model.syncIndexes on application startup. This may drop and re-create all indexes potentially creating multi-hour/day unavailability.

      This may also be a breaking change for other ODMs or 3rd party tools that rely on index comparisons.

       

      Solution

      Disable the ListIndexesAlwaysIncludesSimpleCollation feature flag to return to the original behavior, effectively reverting SERVER-89953. 

       

      Safety of disabling the feature flag

      The ListIndexesAlwaysIncludesSimpleCollation flag is FCV-gated, and in general FCV-gated flags can't be disabled in a patch release (i.e., without a FCV bump).

      However in this case we reason it is safe as follows:

       

      (1) This feature flag only affected the listIndexes output and had no impact in how data is persisted on disk.

      In particular, collation: {locale: "simple"} is never persisted in the durable catalog, even if explicitly passed into createIndexes.

       

      (2) Mixing binaries that still have the feature flag enabled (e.g. v9.0.2) with binaries with the flag disabled (e.g. 9.0.4) works, since:

      • Any combination of feeding the output of listIndexes into createIndexes still works. (even if the binary generating listIndexes and the one receiving createIndexes are different).
        • This is because as noted above, both a simple and a missing collation is accepted 
      • SERVER-89953 added normalization logic to support mixed version scenarios (see normalizeIndexSpecsFromListIndexes) to support mixed v8.3-v9.0 FCV. This ticket disables the feature flag, but keeps this normalization logic, which is not feature flagged.

            Assignee:
            Joan Bruguera Micó
            Reporter:
            Joan Bruguera Micó
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: