Open rkistner opened 21 hours ago
Latest commit: 0206aaab0264362a4cff4c514b510836ade107b9
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
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: