Rewrite internal_search_id_lookup_chunk_migration.js without mongotmock

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      Follow-up to SERVER-131020, which moved the mongot-free $_internalSearchIdLookup ("$idLookup") behavioral test out of jstests/with_mongot/ into jstests/noPassthrough/query/.

      One remaining $idLookup test still lives under jstests/with_mongot/search_mocked/: internal_search_id_lookup_chunk_migration.js. It depends on ShardingTestWithMongotMock to exercise $idLookup's orphan-filtering behavior during a chunk migration, as part of a full $search desugared pipeline.

      Goal

      Rewrite this test so it no longer depends on mongotmock, so it can also move out of with_mongot/.

      Approach

      $_internalSearchIdLookup is internal-client-only (SERVER-129939), not mongot-only. The coverage that matters here is orphan filtering during migration, not $search plumbing. Suggested approach:
      * Use a plain ShardingTest (no mongotmock).
      * Open an internal-client connection directly to a shard (see the internalClient handshake pattern in jstests/noPassthrough/query/internal_search_id_lookup.js, added by SERVER-131020).
      * Run $_internalSearchIdLookup pipelines against that shard while a chunk migration is paused (e.g. via configureFailPoint), asserting orphaned documents are correctly filtered.
      * Once mongot-free, move the test alongside its sibling into jstests/noPassthrough/ (likely a sharding-aware subdirectory).

      Relevant files

      * jstests/with_mongot/search_mocked/internal_search_id_lookup_chunk_migration.js — test to rewrite
      * jstests/noPassthrough/query/internal_search_id_lookup.js — sibling test with the internal-client connection pattern to reuse
      * src/mongo/db/pipeline/search/document_source_internal_search_id_lookup.cpp — stage implementation

            Assignee:
            Unassigned
            Reporter:
            Will Buerger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: