Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-78863

Audit places in the codebase that rely on the hashed index to ensure correct behavior.

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Sharding NYC
    • Sharding NYC 2023-07-24, Sharding NYC 2023-08-07
    • 2

      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,
      

            Assignee:
            sanika.phanse@mongodb.com Sanika Phanse (Inactive)
            Reporter:
            sanika.phanse@mongodb.com Sanika Phanse (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: