|
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:
- Things that might not invalidate a coll.watch() will invalidate a db.watch([{$match: {"ns.coll": coll.getName()} }])
- Whole-database change streams are proving more susceptible to
SERVER-32088 since many unsharded collections will not be present on all shards.
- The tests are very inconsistent - some use the .watch() helper, others use the .aggregate() helper, some use raw runCommand. Two ideas:
- Override runCommand and parse all aggregates looking for $changeStream stages
- 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.
|