-
Notifications
You must be signed in to change notification settings - Fork 25
[MongoDB] postImages #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MongoDB] postImages #121
Conversation
|
…cture' into mongodb-postimages
…cture' into mongodb-postimages
80573ac
into
feat/modular-replication-architecture
This adds an option to use MongoDB postImages when replicating changes, to get proper consistency of updates.
For what this means, see: https://www.mongodb.com/docs/v6.0/reference/command/collMod/#change-streams-with-document-pre--and-post-images
Since this can be a breaking change for existing instances, it is not automatically enabled.
There are three valid options:
post_images: off
: The current behavior and the default to prevent breaking existing instances. This may produce updates out of order.post_images: read_only
: This requireschangeStreamPreAndPostImages: { enabled: true }
to be set on every collection that is referenced in sync rules, otherwise replication will error. Ideal when permissions are restricted.post_images: auto_configure
: This automatically configures thechangeStreamPreAndPostImages
option on collections if needed. Requires thecollMod
permission.TODO: