[SERVER-49214] Add $toHashedIndexKey expression Created: 30/Jun/20  Updated: 29/Jan/24  Resolved: 03/Aug/20

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.7.0, 4.4.10, 4.2.24

Type: Task Priority: Major - P3
Reporter: Janna Golden Assignee: Kshitij Gupta
Resolution: Fixed Votes: 0
Labels: PM-234-M2, PM-234-T-data-clone, PM-234-T-new-split
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-49525 Sample documents to pick new split po... Closed
Gantt Dependency
has to be done before SERVER-49785 Write and test aggregation pipeline f... Closed
Related
related to SERVER-58047 $toHashedIndexKey expression doesn't ... Closed
related to SERVER-84462 Consider offering a way for $toHashed... Backlog
related to DOCS-15574 [SERVER] Investigate changes in SERVE... Closed
related to SERVER-30359 Add a more generalized $hash expression Backlog
related to SERVER-69128 Server-side document hashing Closed
is related to COMPASS-7601 Add autocomplete support for $toHashe... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4, v4.2
Sprint: Sharding 2020-07-13, Sharding 2020-06-29, Sharding 2020-07-27, Sharding 2020-08-10
Participants:

 Description   

Syntax:

{ $toHashedIndexKey: <input>}

Add a new aggregation expression that computes the hash of the input expression using the hash function used to create a hashed index. The expression's evaluate method should pass each element of the input parameter to BSONElementHasher::hash64 with seed DEFAULT_HASH_SEED. If the input expression evaluates to null or missing, still hash this value to mimic MongoDB indexing behavior.

 This will be used as a part of determining new initial split points when resharding a collection.



 Comments   
Comment by Githook User [ 24/Jan/23 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-49214: Add $toHashedIndexKey expression.

(cherry picked from commit d57e17494ceade881013e2e99606cc92d4a38605)
(cherry picked from commit 3f3f5cc03a6587f9d0cfc3bdcb3f8aa13fe2356c)
Branch: v4.2
https://github.com/mongodb/mongo/commit/23973e8051d03576f83adf10b0f39c711e03d08d

Comment by Githook User [ 24/Jan/23 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-49214: Add $toHashedIndexKey expression.

(cherry picked from commit 846d3b8216afeed5006ae2de5f7b254631e3ab49)
Branch: v4.2
https://github.com/10gen/mongo-enterprise-modules/commit/a33ca6df70f1175a988c651799a2b5a932ec4973

Comment by Githook User [ 21/Sep/21 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-49214: Add $toHashedIndexKey expression.

(cherry picked from commit d57e17494ceade881013e2e99606cc92d4a38605)
Branch: v4.4
https://github.com/mongodb/mongo/commit/5e07c00eddafb7a785e084e60a7f0ced9f069628

Comment by Githook User [ 21/Sep/21 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-49214: Add $toHashedIndexKey expression.

(cherry picked from commit 846d3b8216afeed5006ae2de5f7b254631e3ab49)
Branch: v4.4
https://github.com/10gen/mongo-enterprise-modules/commit/f8bf416981d8cfb64772f7b71e415127d685d30e

Comment by Githook User [ 03/Aug/20 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-49214: Add $toHashedIndexKey expression.
Branch: master
https://github.com/mongodb/mongo/commit/d57e17494ceade881013e2e99606cc92d4a38605

Comment by Githook User [ 03/Aug/20 ]

Author:

{'name': 'Kshitij Gupta', 'email': 'kshitij.gupta@mongodb.com', 'username': 'kshitijng'}

Message: SERVER-49214: Add $toHashedIndexKey expression.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/846d3b8216afeed5006ae2de5f7b254631e3ab49

Comment by Janna Golden [ 30/Jun/20 ]

Awesome, thank you charlie.swanson!

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