Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11597

Docs for SERVER-34086: Add ability to watch all changes for an entire replica set

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.4
    • Affects Version/s: None
    • Component/s: Server
    • Labels:
      None

      Documentation Request Summary:

      Changestreams can now report all operations from all collections in all databases in a replica set, with the exception of internal databases (admin, config and local) and internal collections within user databases, i.e. those collections whose names are of the form system.*

      A cluster-wide change stream is opened by issuing an aggregation command on the 'admin' database in the following form:

      adminDB.runCommand({aggregate: 1, pipeline: [{$changeStream: {allChangesForCluster: true}}], cursor: {}})

      The command must be run on the admin db, the value of the "aggregate" field must be 1, and the 'allChangesForCluster' parameter must be true. Attempting to run an aggregation on the 'admin' db with a collection name or with 'allChangesForCluster: false' will return an error to the client, as will using 'allChangesForCluster' on a database other than admin.

      Engineering Ticket Description:

      Changes to the "admin", "config", and "local" databases will be excluded, along with any changes to system collections.

      Proposed Syntax

      db.adminCommand({
        aggregate: 1,
        pipeline: [
          {$changeStream: {allChangesForCluster: true, ...}},
          ...
        ],
        ...
      });
      

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 2 weeks, 4 days ago