[SERVER-78863] Audit places in the codebase that rely on the hashed index to ensure correct behavior. Created: 11/Jul/23  Updated: 02/Aug/23  Resolved: 02/Aug/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Sanika Phanse (Inactive) Assignee: Sanika Phanse (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-79632 Stop range deletion when hashed shard... Closed
is related to SERVER-78252 Block chunk migrations for hashed sha... Closed
is related to SERVER-78253 Allow folks with hashed shard keys to... Closed
Assigned Teams:
Sharding NYC
Sprint: Sharding NYC 2023-07-24, Sharding NYC 2023-08-07
Participants:
Story Points: 2

 Description   

Other than chunk migrations, handled in SERVER-78252, audit places the codebase relies on an existing shard key index. This is a comprehensive list:

$ git grep findShardKeyPrefixedIndex -- ':!*test*'
src/mongo/db/commands/dbcommands.cpp:361:                const auto shardKeyIdx = findShardKeyPrefixedIndex(opCtx,
src/mongo/db/s/analyze_shard_key_cmd_util.cpp:600:    const auto index = findShardKeyPrefixedIndex(opCtx,
src/mongo/db/s/auto_split_vector.cpp:161:        const auto shardKeyIdx = findShardKeyPrefixedIndex(opCtx,
src/mongo/db/s/check_sharding_index_command.cpp:105:        const auto shardKeyIdx = findShardKeyPrefixedIndex(opCtx,
src/mongo/db/s/metadata_consistency_util.cpp:103:        if (!findShardKeyPrefixedIndex(opCtx, localColl, shardKey, false /*requireSingleKey*/)) {
src/mongo/db/s/migration_chunk_cloner_source.cpp:1065:    const auto shardKeyIdx = findShardKeyPrefixedIndex(opCtx,
src/mongo/db/s/range_deletion_util.cpp:89:    const auto shardKeyIdx = findShardKeyPrefixedIndex(
src/mongo/db/s/shard_key_index_util.cpp:45:boost::optional<ShardKeyIndex> _findShardKeyPrefixedIndex(
src/mongo/db/s/shard_key_index_util.cpp:197:    return !_findShardKeyPrefixedIndex(opCtx,
src/mongo/db/s/shard_key_index_util.cpp:206:boost::optional<ShardKeyIndex> findShardKeyPrefixedIndex(OperationContext* opCtx,
src/mongo/db/s/shard_key_index_util.cpp:211:    return _findShardKeyPrefixedIndex(opCtx,
src/mongo/db/s/shard_key_index_util.h:93:boost::optional<ShardKeyIndex> findShardKeyPrefixedIndex(OperationContext* opCtx,
src/mongo/db/s/shard_key_util.cpp:416:            findShardKeyPrefixedIndex(_opCtx,
src/mongo/db/s/split_chunk.cpp:214:        const auto shardKeyIdx = findShardKeyPrefixedIndex(
src/mongo/db/s/split_vector.cpp:87:        const auto shardKeyIdx = findShardKeyPrefixedIndex(opCtx,


Generated at Thu Feb 08 06:39:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.