-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:
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(
)
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.
- documents
-
SERVER-61802 Implement pre-image expiration configuration parameter propagation and persistence using Mechanism for Specifying Cluster-Wide Configuration Options
- Closed