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

Investigate changes in SERVER-61802: Document changeStreamOptions parameter

    XMLWordPrintableJSON

Details

    Description

      Original Downstream Change Summary

      This PR introduces a new cluster-wide server parameter, which will be the first one supported by the server. The parameter is called changeStreamOptions and will look as follows in 6.0:

      changeStreamOptions: {preAndPostImages: {expireAfterSeconds: <'off' | <integer>>}}

      By default, changeStreamOptions.preAndPostImages.expireAfterSeconds is 'off', meaning that the pre-image time-based retention policy is not active. It can be set to an integer, which turns on the time-based policy such that pre-images are kept on the server for 'expireAfterSeconds' seconds.

      Ex: to retain pre-images for change streams for 30 seconds each, invoke setClusterParameter as follows:
      db.runCommand({setClusterParameter: {changeStreamOptions: {preAndPostImages: {expireAfterSeconds: 30}}}})
      This only should be run on a mongos in a sharded cluster or on a replica set primary on a non-sharded replica set. The value will be set cluster-wide.

      To retrieve any cluster node's value for changeStreamOptions, run the following command:
      db.runCommand(

      {getClusterParameter: "changeStreamOptions"}

      )

      Description of Linked Ticket

      In PM-1944 a cluster-wide configuration parameter was added to provide control on how much time can pass after the change event occurrence when the system can purge any state required to provide pre- and post-images for the change event. Implement propagation throughout the cluster and persistence aspects of that parameter by leveraging mechanisms provided by PM-2502 (Mechanism for Specifying Cluster-Wide Configuration Options).

      Additional scope:

      • Enable the feature flag that guards the configuration parameter, so the time-based change stream pre-image retention policy becomes accessible to the users.
      • Create a task to remove the feature flag referred to above.

      The parameter was introduced by SERVER-58692.

      Attachments

        Activity

          People

            jocelyn.mendez@mongodb.com Jocelyn Mendez
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 30 weeks, 1 day ago