-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
DB Integration & Observability
-
Fully Compatible
-
QI 2025-02-17
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
Add six new resmoke matrix suites that run the sharding-oblivious jstests/change_streams/* test bank against a single-shard cluster while a client connects *directly to the shard's mongod for some or all operations, bypassing mongos. This exercises the "client connected directly to a shard" code path, which is currently untested in a sharded-cluster context.
Background
Some clients (e.g. Atlas Search's mongot) connect directly to individual shards for change stream ingestion, including watching shard-local databases that are never registered in config.databases. No existing passthrough suite exercises this connection shape. SERVER-134952 was a concrete regression in this area: updateLookup change streams returned fullDocument: null for updates on a shard-local/uncataloged database, because LocalLookupEligibilityFactoryImpl::makeLocalLookupEligibility branches on whether the connecting client is routed (via mongos) vs. connected directly to the shard.
Scope of Work
Family A – fully direct (shard-local/uncataloged)
DDL, writes, and the change stream itself all go straight to the shard's mongod; the namespace never gets a config.databases entry.
- change_streams_direct_to_shard_passthrough
- change_streams_whole_db_direct_to_shard_passthrough
- change_streams_whole_cluster_direct_to_shard_passthrough
Family B – changestream-only direct (tracked/cataloged namespace)
DDL and writes go through mongos normally (namespace is properly tracked, same as the existing sharded_collections_passthrough suites); only the $changeStream aggregate/getMore/killCursors commands are redirected to a direct shard connection.
- change_streams_changestream_direct_to_shard_passthrough
- change_streams_whole_db_changestream_direct_to_shard_passthrough
- change_streams_whole_cluster_changestream_direct_to_shard_passthrough
Implementation
- New generic override: jstests/libs/override_methods/implicit_direct_to_shard_connection.js
- New change-stream-command redirect override: jstests/libs/override_methods/implicit_direct_to_shard_changestream_commands.js
- New fragments in buildscripts/resmokeconfig/matrix_suites/overrides/change_streams.yml
- Six new mapping files under buildscripts/resmokeconfig/matrix_suites/mappings/
- Six new Evergreen tasks in etc/evergreen_yml_components/tasks/resmoke/server_divisions/query/tasks.yml, tagged to run on the required enterprise-amazon-linux2023-arm64 variant
Acceptance Criteria
- All six suites pass locally and in an Evergreen patch
- Confirmed the suites are selected onto the required patch-testing variant
- Confirmed (via a temporary local revert of the
SERVER-134952fix) that the new suites would have caught that regression
Related Tickets
- Relates to
SERVER-134952
- is related to
-
SERVER-134952 updateLookup change stream returns null fullDocument for updates on a shard-local/uncataloged database
-
- Closed
-
- related to
-
SERVER-135713 change_stream_response_deadline.js fails on repeat runs when connected directly to a shard (burn_in)
-
- Needs Scheduling
-