[SERVER-34302] Add passthrough suite(s) replacing coll.watch() with db.watch([{$match: {"ns.coll": coll.getName()}}]) Created: 04/Apr/18  Updated: 29/Oct/23  Resolved: 19/Apr/18

Status: Closed
Project: Core Server
Component/s: Aggregation Framework, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.7.6

Type: Task Priority: Major - P3
Reporter: Charlie Swanson Assignee: Bernard Gorman
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-34499 Add passthrough suite(s) replacing si... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2018-04-23
Participants:

 Description   

There are some details to figure out here but I believe this will mostly work and provide good coverage of the new "whole-db" change stream feature.

A couple known cases:

  1. Things that might not invalidate a coll.watch() will invalidate a db.watch([{$match: {"ns.coll": coll.getName()} }])
  2. Whole-database change streams are proving more susceptible to SERVER-32088 since many unsharded collections will not be present on all shards.
  3. The tests are very inconsistent - some use the .watch() helper, others use the .aggregate() helper, some use raw runCommand. Two ideas:
    1. Override runCommand and parse all aggregates looking for $changeStream stages
    2. Override .watch(), update all tests to use .watch(). This lets us "fall-back" to .aggregate() if the override would expose one of the issues outlined above, enabling a finer-tuned cursor-by-cursor blacklist. It is extremely subtle though, so probably not worth doing.


 Comments   
Comment by Githook User [ 19/Apr/18 ]

Author:

{'email': 'bernard.gorman@gmail.com', 'username': 'gormanb', 'name': 'Bernard Gorman'}

Message: SERVER-34302 Add passthrough suite(s) replacing single-collection $changeStream with whole-db streams filtered by namespace
Branch: master
https://github.com/mongodb/mongo/commit/4b91a39f6ea87742223585e9da27367d841f8979

Generated at Thu Feb 08 04:36:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.