-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
Sharding 2020-08-10
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Once the new $hash expression is created in SERVER-49214, we can use a similar agg pipeline as defined in SERVER-49510 to pick new split points during resharding for a shard key with a hashed field. The pipeline should use $hash for a hashed field, it should look like:
[
{
$sample: { size: numInitialChunks * s (where s = oversampling ratio }
},
{
$project: {
_id: 0,
"sk0": {$ifNull: ["$shardKeyField0", null]},
"sk1": {$toHashedIndexKey: <input>},
... and so on for each shard key field
}
},
{
$sort: { sk0: 1, sk1: 1 }
},
]
- depends on
-
SERVER-49214 Add $toHashedIndexKey expression
-
- Closed
-
-
SERVER-49510 Add functionality to pick new split points during resharding when zones not defined
-
- Closed
-