Skip to content

DOCSP-15810: update changestream page to use new feature + cleanup #407

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

Merged
merged 2 commits into from
May 26, 2023

Conversation

rustagir
Copy link
Contributor

Pull Request Info

PR Reviewing Guidelines

JIRA - DOCSP-30151
Staging

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?

Copy link
Contributor

@mongoKart mongoKart left a comment

Choose a reason for hiding this comment

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

few small things! looks good otherwise.

Comment on lines 127 to 128
An update operation on the collection should produce output similar to the
following text:
Copy link
Contributor

Choose a reason for hiding this comment

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

I: Style Guide on "should"

S: The text you deleted looks fine to me. Otherwise:

Suggested change
An update operation on the collection should produce output similar to the
following text:
An update operation on the collection produces the following output:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed everywhere

Comment on lines 147 to 149
- The **pre-image**, which is a document that represents the version of the
document before the operation, if it exists
- The **post-image**, which is a document that represents the version of the
Copy link
Contributor

Choose a reason for hiding this comment

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

S: Sounds lighter and cleaner to omit "which is"

Suggested change
- The **pre-image**, which is a document that represents the version of the
document before the operation, if it exists
- The **post-image**, which is a document that represents the version of the
- The **pre-image**, a document that represents the version of the
document before the operation, if it exists
- The **post-image**, a document that represents the version of the

Comment on lines 153 to 154
must connect to a deployment running MongoDB v6.0 or later and perform the
following actions:
Copy link
Contributor

Choose a reason for hiding this comment

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

S: This sentence is a little hard to parse. Could we move the version info to an admonition or something?

Suggested change
must connect to a deployment running MongoDB v6.0 or later and perform the
following actions:
must perform perform the following actions on your MongoDB deployment:


.. _java-change-stream-pre-post-collection:

Create a Collection with Pre-Image and Post-Images Enabled
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To create a collection with the pre-image and post-image option using the
driver, specify an instance of ``ChangeStreamPreAndPostImagesOptions``
To use the driver to create a collection that has the pre-image and post-image options
Copy link
Contributor

Choose a reason for hiding this comment

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

S:

Suggested change
To use the driver to create a collection that has the pre-image and post-image options
To use the driver to create a collection with the pre-image and post-image options

Comment on lines 202 to 204
When you modify this option on a collection, any change streams open on
that collection in your application may fail if configured to require
receiving the pre-image or post-image.
that collection in your application may fail if you configure them to require
the pre-image or post-image.
Copy link
Contributor

Choose a reason for hiding this comment

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

S: Might be able to trim this down a bit. Style Guide also recommends using "may" only for permission

Maybe something like:
"If you enable this option while change streams are open in your application,
those change streams might fail."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reworded

``2.1.0``. The corresponding change event output by the preceding code example
should resemble the following text:
Suppose you update the ``amount`` field of a document from ``150`` to
``2000``. The change event produced by this change should appear in the
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
``2000``. The change event produced by this change should appear in the
``2000``. The change event produced by this change appears in the

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed along with changes from an earlier comment

Comment on lines 263 to 265
``FullDocument.WHEN_AVAILABLE`` option. This option configures the change
stream to the change stream to return the post-image of the modified
document for replace and update change events, if it is available.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
``FullDocument.WHEN_AVAILABLE`` option. This option configures the change
stream to the change stream to return the post-image of the modified
document for replace and update change events, if it is available.
``FullDocument.WHEN_AVAILABLE`` option. This option configures the change
stream to return the post-image of the modified
document for replace and update change events, if it's available.

the value of ``800`` to ``950`` in a collection of city census data. The
corresponding change event output by the preceding code example should
resemble the following text:
Suppose you update the ``color`` field of a document from ``"purple"`` to
Copy link
Contributor

Choose a reason for hiding this comment

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

S: Could say "value of the color field," but this reads fine to me.

@rustagir rustagir requested a review from mongoKart May 25, 2023 14:30
Copy link
Contributor

@mongoKart mongoKart left a comment

Choose a reason for hiding this comment

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

lgtm

@rustagir rustagir merged commit a175e82 into mongodb:master May 26, 2023
rustagir added a commit that referenced this pull request May 26, 2023
)

* DOCSP-15810: update changestream page to use new feature + cleanup

* MW PR fixes 1

(cherry picked from commit a175e82)
rustagir added a commit that referenced this pull request May 26, 2023
)

* DOCSP-15810: update changestream page to use new feature + cleanup

* MW PR fixes 1

(cherry picked from commit a175e82)
rustagir added a commit that referenced this pull request May 26, 2023
)

* DOCSP-15810: update changestream page to use new feature + cleanup

* MW PR fixes 1

(cherry picked from commit a175e82)
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