Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-34302

Add passthrough suite(s) replacing coll.watch() with db.watch([{$match: {"ns.coll": coll.getName()}}])

    • Fully Compatible
    • Query 2018-04-23

      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.

            Assignee:
            bernard.gorman@mongodb.com Bernard Gorman
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: