Skip to content
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

DRIVERS-1915: Change stream support for point-in-time pre and post-images #1176

Merged
merged 6 commits into from
Apr 13, 2022

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Apr 8, 2022

https://jira.mongodb.org/browse/DRIVERS-1915

POC: mongodb/mongo-php-library#911

Note: testing may require starting mongod with --setParameter featureFlagChangeStreamPreAndPostImages=true if the "latest" server build does not include SERVER-52282.

@jmikola jmikola requested a review from a team as a code owner April 8, 2022 18:36
@jmikola jmikola requested review from benjirewis and removed request for a team April 8, 2022 18:36
jmikola added a commit to jmikola/mongo-php-library that referenced this pull request Apr 8, 2022
Introduces fullDocumentBeforeChange option. Tests for specifying "whenAvailable" and "required" for both fullDocument and fullDocumentBeforeChange (requires MongoDB 6.0+ with changeStreamPreAndPostImages enabled on the collection).

Tests synced with mongodb/specifications#1176
@jmikola jmikola changed the title DRIVERS-1915: Support PIT pre and post-images in change streams DRIVERS-1915: Support point-in-time pre and post-images in change streams Apr 8, 2022
@jmikola jmikola changed the title DRIVERS-1915: Support point-in-time pre and post-images in change streams DRIVERS-1915: Change stream support for point-in-time pre and post-images Apr 8, 2022
jmikola added a commit to jmikola/mongo-php-library that referenced this pull request Apr 8, 2022
Introduces fullDocumentBeforeChange option. Tests for specifying "whenAvailable" and "required" for both fullDocument and fullDocumentBeforeChange (requires MongoDB 6.0+ with changeStreamPreAndPostImages enabled on the collection).

Tests synced with mongodb/specifications#1176
jmikola added a commit to jmikola/mongo-php-library that referenced this pull request Apr 8, 2022
Introduces fullDocumentBeforeChange option. Tests for specifying "whenAvailable" and "required" for both fullDocument and fullDocumentBeforeChange (requires MongoDB 6.0+ with changeStreamPreAndPostImages enabled on the collection).

Tests synced with mongodb/specifications#1176
jmikola added a commit to jmikola/mongo-php-library that referenced this pull request Apr 11, 2022
Introduces fullDocumentBeforeChange option. Tests for specifying "whenAvailable" and "required" for both fullDocument and fullDocumentBeforeChange (requires MongoDB 6.0+ with changeStreamPreAndPostImages enabled on the collection).

Intentionally omits mention of FULL_DOCUMENT_DEFAULT (related to PHPLIB-808) and FULL_DOCUMENT_BEFORE_CHANGE_OFF constants, since those redundantly specified default behavior.

Tests synced with mongodb/specifications#1176
jmikola added a commit to jmikola/mongo-php-library that referenced this pull request Apr 12, 2022
Introduces fullDocumentBeforeChange option. Tests for specifying "whenAvailable" and "required" for both fullDocument and fullDocumentBeforeChange (requires MongoDB 6.0+ with changeStreamPreAndPostImages enabled on the collection).

Intentionally omits mention of FULL_DOCUMENT_DEFAULT (related to PHPLIB-808) and FULL_DOCUMENT_BEFORE_CHANGE_OFF constants, since those redundantly specified default behavior.

Tests synced with mongodb/specifications#1176
@jmikola jmikola requested a review from benjirewis April 12, 2022 20:25
Copy link
Contributor

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I only wonder if the file names should be change-streams-pre-and-post-images.* instead of change-streams-pre_and_post_images. The mix of hyphen and underscore seems nonstandard.


runOnRequirements:
- minServerVersion: "6.0.0"
topologies: [ replicaset, sharded-replicaset, load-balanced ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the CI is failing because of this line... Not sure why, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into this now. I just realized change-streams were never added to the Unified Test Format Makefile and just did so now. It validates locally, so I'll have to sort out how the CI task differs.

@jmikola
Copy link
Member Author

jmikola commented Apr 13, 2022

I only wonder if the file names should be change-streams-pre-and-post-images.* instead of change-streams-pre_and_post_images. The mix of hyphen and underscore seems nonstandard.

I based this on findOneAndReplace-dots_and_dollars.yml. IMO, hyphens are for separating the logical blocks (e.g. method and option/feature) and underscores are in place of spaces or other special characters.

I object to all of the existing tests having change-streams- as a prefix, but I wasn't about to change that.

@jmikola jmikola merged commit 8978899 into mongodb:master Apr 13, 2022
@jmikola jmikola deleted the drivers-1915 branch April 13, 2022 16:51
baileympearson added a commit to mongodb/node-mongodb-native that referenced this pull request May 17, 2022
baileympearson added a commit to mongodb/node-mongodb-native that referenced this pull request May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants