[SERVER-53335] Queries, updates, and deletes with non-"simple" collations may miss documents when using hashed sharding Created: 11/Dec/20  Updated: 29/Oct/23  Resolved: 01/Jul/21

Status: Closed
Project: Core Server
Component/s: Querying, Sharding
Affects Version/s: None
Fix Version/s: 4.4.11, 4.0.28, 5.0.4, 5.1.0-rc0, 4.2.19

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Jason Zhang
Resolution: Fixed Votes: 0
Labels: sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-58921 Mark collation_shard_targeting_hashed... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0, v4.4, v4.2, v4.0
Sprint: Sharding 2021-07-12
Participants:
Case:

 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).



 Comments   
Comment by Githook User [ 14/Dec/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-53335 Queries, updates, and deletes with non-"simple" collations may miss documents when using hashed sharding
Branch: v4.0
https://github.com/mongodb/mongo/commit/491a47d35f6ded74274324f3fca2c147c1c124ac

Comment by Githook User [ 10/Dec/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-53335 Queries, updates, and deletes with non-"simple" collations may miss documents when using hashed sharding
Branch: v4.2
https://github.com/mongodb/mongo/commit/d3a93ec67a3cf149434bc5c112ecd7d71bdd89b5

Comment by Githook User [ 29/Nov/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-53335 Queries, updates, and deletes with non-"simple" collations may miss documents when using hashed sharding
(cherry picked from commit c7dfb6bd1e3cbb6862c8189d2300943b02e5c494)
Branch: v4.4
https://github.com/mongodb/mongo/commit/8e983ae3261ea43ea3493fa082683f1aa718e998

Comment by Githook User [ 02/Nov/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-53335 Queries, updates, and deletes with non-"simple" collations may miss documents when using hashed sharding
Branch: v5.0
https://github.com/mongodb/mongo/commit/b47031ed346055373ff2c852c51afad2e6e5ee4e

Comment by Githook User [ 30/Jun/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-53335 Queries, updates, and deletes with non-"simple" collations may miss documents when using hashed sharding
Branch: master
https://github.com/mongodb/mongo/commit/c7dfb6bd1e3cbb6862c8189d2300943b02e5c494

Generated at Thu Feb 08 05:30:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.