[SERVER-58048] Resharding's initial split points for hashed shard keys don't match the sampled values Created: 24/Jun/21  Updated: 29/Oct/23  Resolved: 13/Jul/21

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 5.0.2, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Luis Osta (Inactive)
Resolution: Fixed Votes: 0
Labels: PM-234-M3, PM-234-T-new-split
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
is caused by SERVER-49526 configsvrReshardCollection should cal... Closed
Related
is related to SERVER-58047 $toHashedIndexKey expression doesn't ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0
Sprint: Sharding 2021-07-12, Sharding 2021-07-26
Participants:
Linked BF Score: 35
Story Points: 1

 Description   

ReshardingSplitPolicy::_appendSplitPointsFromSample() hashes the already-hashed shard key value for a second time by calling shardKey.extractShardKeyFromDoc(*nextKey). A solution is probably to use dotted_path_support::extractElementsBasedOnTemplate(*nextKey, shardKey.toBSON()) instead, which is how the shard key is extracted for oplog entries.

(This bug was found via code inspection while tracking down SERVER-58047.)



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 27/Jul/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-58048 Resharding's initial split points for hashed shard keys don't match the sampled values (cherry picked from commit a0fe43ef0713bf923884e6afa1b11bab992f1ca9)
Branch: v5.0
https://github.com/mongodb/mongo/commit/ca7a3ba8e51377f3cf9e8fdf3e1883c1ea8bfdb5

Comment by Githook User [ 17/Jul/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-58048 fix mac os x compile - explicit LL suffix to fix XCode build

Similar fix was previously applied in commit 2675ca0d17d2d2e24d25fcea2f6c9f46ce1be2d4.
Branch: master
https://github.com/mongodb/mongo/commit/a0fe43ef0713bf923884e6afa1b11bab992f1ca9

Comment by Githook User [ 13/Jul/21 ]

Author:

{'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}

Message: SERVER-58048 Resharding's initial split points for hashed shard keys don't match the sampled values
Branch: master
https://github.com/mongodb/mongo/commit/95d0727d955e543a2f9440c49bb101f793b6a7f9

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