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

Queries, updates, and deletes with non-"simple" collations may miss documents when using hashed sharding

    XMLWordPrintable

Details

    • Fully Compatible
    • ALL
    • v5.0, v4.4, v4.2, v4.0
    • Sharding 2021-07-12

    Description

      This is a beginning of time bug (since MongoDB 3.4) from when collation was first introduced.

      This affects queries, updates, and deletes with an explicit non-"simple" collation on hashed-based sharded collections using the "simple" collation as their default collation. For example, db.mycoll.find({_id: "yes"}).collation({locale: "en", strength: 2}) may fail to find an {_id: "YES"} document depending on how the chunks containing hash({_id: "yes"}) and hash({_id: "YES"}) are distributed across shards with an {_id: "hashed"} shard key pattern.

      It also affects queries, updates, and deletes inheriting a non-"simple" collation from a hashed-based sharded collection using a non-"simple" default collation.

      Ranged-based sharding is unaffected because queries using a non-"simple" collation are broadcasted to all shards which own chunks for the collection (aka scatter/gather).

      Attachments

        Issue Links

          Activity

            People

              jason.zhang@mongodb.com Jason Zhang
              max.hirschhorn@mongodb.com Max Hirschhorn
              Votes:
              0 Vote for this issue
              Watchers:
              22 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: