-
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
SERVER-129939 ([PR 57304|https://github.com/10gen/mongo/pull/57304]]) registered $_internalSearchIdLookup ("$idLookup") as internal-only and deleted jstests/with_mongot/search_mocked/internal_search_id_lookup_shard_filter.js, which tested that $idLookup applies a shard filter to skip orphaned documents.
That coverage is currently provided by jstests/with_mongot/search_mocked/search_shard_filtering.js, which exercises the same shard-filtering behavior as part of a full $search pipeline via ShardingTestWithMongotMock.
Problem
search_shard_filtering.js lives in with_mongot/ and depends on mongotmock. Once mongot testing is removed from 10gen/mongo (see SERVER-131020 and SERVER-131067), this coverage disappears along with it — there won't be a standalone test asserting $idLookup's shard-filtering behavior independent of $search.
Goal
Add back a standalone, mongot-free test of $idLookup's shard-filtering/orphan-skipping behavior (similar in spirit to the deleted internal_search_id_lookup_shard_filter.js), so the coverage survives outside with_mongot/.
Approach
Follow the pattern established in jstests/noPassthrough/query/internal_search_id_lookup.js (added by SERVER-131020): a plain ShardingTest (no mongotmock) with an internal-client connection running $_internalSearchIdLookup directly, seeding orphaned documents on a shard and asserting they are filtered out of the results.
Relevant files
* jstests/with_mongot/search_mocked/search_shard_filtering.js — current mongot-dependent coverage
* jstests/noPassthrough/query/internal_search_id_lookup.js — mongot-free internal-client pattern to follow
* src/mongo/db/pipeline/search/document_source_internal_search_id_lookup.cpp — stage implementation
Related tickets
* SERVER-129939 — deleted the original standalone shard-filter test
* SERVER-131020 — moved the basic $idLookup behavioral test out of with_mongot
* SERVER-131067 — mongot-free rewrite of the chunk-migration $idLookup test
- is related to
-
SERVER-131020 Move $idLookup tests outside of with_mongot/
-
- Closed
-
-
SERVER-131067 Rewrite internal_search_id_lookup_chunk_migration.js without mongotmock
-
- Needs Scheduling
-