Integrate system elements and smoke test change stream on a collection in Strict mode

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2025-09-29, QE 2025-10-13
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In scope:

      • Refactoring of mongo::sharded_agg_helpers::getTargetedShards(..) to mongo::sharded_agg_helpers::getTargetedShardsForQuery(..), mongo::sharded_agg_helpers::getTargetedShardsForChangeStreamLegacy(..) and
        mongo::sharded_agg_helpers::getTargetedShardsForAllShardsRequest(..)
      • Implement change stream reader version control as described at https://docs.google.com/document/d/1hCwds3n4WeVkFXhu5CQtRyFkx_Uopsp4fjq_8eU8r9s/edit?tab=t.0#heading=h.2qxqsuxr5f8k.
      • Connect all relevant parts of the system needed to open a change stream on a collection in Strict mode.
      • Develop and pass a "smoke" test for checking for critical defects in the basic change streams capability. The test should run only when the capability feature flag is on and should explicitly set the version of the CS reader to use - v2. The test should include steps that trigger: (a) opening/closing a cursor on a data shard; (b) opening/closing a cursor on a the config server; (c) reacting to "namespacePlacementChanged" event; (d) Opening a cursor in the future. (c) Delivery of "user" events. The suggested test scenario is provided below. 

      Suggested smoke test scenario:

      1. Create and shard a collection Coll; allocate collection to shard set {A, B}.
      2. Open a change stream.
      3. Insert documents into the collection Coll.
      4. Reshard collection Coll and allocate to shards {B, C}.
      5. Insert document into collection Coll.
      6. drop the collection Coll.
      7. Read events until invalidation.
      8. Reopen the change stream just after the invalidation cluster time.
      9. Create an unsplittable collection Coll.
      10. Insert some documents.
      11. Read events.
      12. Open a change stream on Coll in the future (several seconds after the current time).
      13. Poll for events in the change stream.
      14. Wait until the future time comes.
      15. Insert documents in collection Coll.
      16. Fetch the events through the change stream.

            Assignee:
            Denis Grebennicov
            Reporter:
            Mindaugas Malinauskas (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: