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()}}])

    XMLWordPrintable

    Details

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bernard.gorman Bernard Gorman
              Reporter:
              charlie.swanson Charlie Swanson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: