[DOCS-11597] Docs for SERVER-34086: Add ability to watch all changes for an entire replica set Created: 13/Apr/18  Updated: 18/Jun/18  Resolved: 13/Jun/18

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-34086 Add ability to watch all changes for ... Closed
Related
related to DOCS-11596 Docs for SERVER-34087: Add db.getMong... Closed
Participants:
Days since reply: 5 years, 43 weeks, 5 days ago
Epic Link: DOCS: 4.0 Server

 Description   

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, ...}},
    ...
  ],
  ...
});


Generated at Thu Feb 08 08:03:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.