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).
- related to
-
SERVER-58921 Mark collation_shard_targeting_hashed_shard_key.js as pending backport
- Closed