-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
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:
- Changes to targetPipeline() as designed in https://docs.google.com/document/d/1aZxeZ2FIh9Sn1KYotp-ac4G2AjzrT4hDKkChe4hiFpM/edit?pli=1&tab=t.0#heading=h.jzk7sodthuc6.
- Changes to getTargetedShards() as designed in https://docs.google.com/document/d/1aZxeZ2FIh9Sn1KYotp-ac4G2AjzrT4hDKkChe4hiFpM/edit?pli=1&tab=t.0#heading=h.jzk7sodthuc6.
- 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:
- Create and shard a collection Coll; allocate collection to shard set {A, B}.
- Open a change stream.
- Insert documents into the collection Coll.
- Reshard collection Coll and allocate to shards {B, C}.
- Insert document into collection Coll.
- drop the collection Coll.
- Read events until invalidation.
- Reopen the change stream just after the invalidation cluster time.
- Create an unsplittable collection Coll.
- Insert some documents.
- Read events.
- Open a change stream on Coll in the future (several seconds after the current time).
- Poll for events in the change stream.
- Wait until the future time comes.
- Insert documents in collection Coll.
- Fetch the events through the change stream.