[SERVER-58047] $toHashedIndexKey expression doesn't add any dependencies Created: 24/Jun/21 Updated: 29/Oct/23 Resolved: 25/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc5, 4.4.10, 5.1.0-rc0, 4.2.24 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Kshitij Gupta |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-234-M3, PM-234-T-new-split, post-rc0 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v5.0, v4.4, v4.2
|
||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||
| Sprint: | Sharding 2021-06-28 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Story Points: | 1 | ||||||||||||||||
| Description |
|
ExpressionToHashedIndexKey::_doAddDependencies() doesn't add the dependencies of its _children[0] expression. This causes the $project stage to incorrectly treat the field path expression as a missing value and hash it to the value of an explicit null value.
|
| 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 [ 21/Sep/21 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}Message: (cherry picked from commit 3f3f5cc03a6587f9d0cfc3bdcb3f8aa13fe2356c) | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Jun/21 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}Message: (cherry picked from commit 3f3f5cc03a6587f9d0cfc3bdcb3f8aa13fe2356c) | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Jun/21 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Max Hirschhorn [ 24/Jun/21 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
This issue was found by sebastian.witalec while working on the keynote demo for resharding. All of the sampled documents being treated as having the hash of an explicit null value causes the reshardCollection command to fail due to not finding enough distinct values to split at.
|