Implement AllDatabasesChangeStreamShardTargeterImpl module

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Change streams
    • Query Execution
    • Fully Compatible
    • QE 2026-03-16, QE 2026-03-02, QE 2026-02-16
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Implementation

      1. Implement AllDatabasesChangeStreamShardTargeterImpl module according to the design at https://docs.google.com/document/d/1aZxeZ2FIh9Sn1KYotp-ac4G2AjzrT4hDKkChe4hiFpM/edit?tab=t.0#bookmark=id.qijt873rif8d.
        1. The skeleton is available at mongo/src/mongo/s/change_streams/all_databases_change_stream_shard_targeter_impl.{h,cpp}
        2. Enable v2 change streams implementation for all-databases (also called “whole-cluster” elsewhere) change streams at https://github.com/10gen/mongo/blob/b5a8c3a7e61274321b2f1715933847c33b0699f3/src/mongo/db/pipeline/document_source_change_stream.cpp#L358-L360.

      Testing

      1. Develop a unit test for AllDatabasesChangeStreamShardTargeterImpl.
      2. Modify `implicit_change_stream_v2.js` override to support all-databases change streams.
      3. Create the following new test suites for all-databases change streams with v2 change stream reader reader:
        1. change_streams_whole_cluster_mongos_passthrough_v2 (from change_streams_whole_cluster_mongos_passthrough)
        2. change_streams_whole_cluster_secondary_reads_sharded_collections_v2 (from change_streams_whole_cluster_secondary_reads_sharded_collections)
      4. Develop a smoke test (performs basic functionality testing) for Ignore-Removed-Shards mode for all-databases change streams.
        1. Name it jstests/sharding/query/change_streams/change_stream_all_databases_v2_ignore_removed_shards_smoke.js
        2. Can get some inspiration from https://github.com/10gen/mongo/blob/master/jstests/sharding/query/change_streams/change_stream_database_v2_ignore_removed_shards_smoke.js.

            Assignee:
            Lyublena Antova
            Reporter:
            Mindaugas Malinauskas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: