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

DOCSP-33427: split large cs events #145

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

rustagir
Copy link
Collaborator

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-33427
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?
  • Are the facets and meta keywords accurate?

Copy link
Contributor

@ccho-mongodb ccho-mongodb left a comment

Choose a reason for hiding this comment

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

LGTM, added a couple suggestions and a question.

@@ -136,6 +137,37 @@ internal class ChangeStreamsTest {

}

// This test is getting ignored because the feature is only enabled for deployments on MongoDB 7.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion:

No change necessary, but I think this could be stated more concisely:

Suggested change
// This test is getting ignored because the feature is only enabled for deployments on MongoDB 7.0
// Ignore annotation added because this function requires a MongoDB 7.0 deployment

Comment on lines 29 to 31
connecting to a MongoDB deployment running version 6.0 or later, you can
configure the events to include the document data before and after the
change.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍
Alternatively, "When connecting to MongoDB v6.0 or later, ..." but I guess this version makes it consistent to the intro paragraph of Split Large Change Stream Events.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed for concision!

you can use the ``$changeStreamSplitLargeEvent`` aggregation operator to
split event documents that exceed 16 MB into smaller fragments.

Use the ``$changeStreamSplitLargeEvent`` operator only when necessary. For
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion:

I think it could be helpful to identify the specific condition in this sentence, even though I think I wrote the same thing in the Java docs.

Suggested change
Use the ``$changeStreamSplitLargeEvent`` operator only when necessary. For
Use the ``$changeStreamSplitLargeEvent`` operator only when you expect
the change stream events to exceed the 16 MB document size limit. For

fun splitLargeChangeStreamTest() = runBlocking {
val changeEvents = mutableListOf<ChangeStreamDocument<Document>>()
// :snippet-start: split-large-change-stream
val pipeline = listOf(BsonDocument.parse("{ \$changeStreamSplitLargeEvent: {} }"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Question:
For personal edification, is this way way is more idiomatic than the following:

val pipeline = listOf(BsonDocument().append("$changeStreamSplitLargeEvent", BsonDocument()))

@rustagir rustagir merged commit 9667a4f into mongodb:master Jan 16, 2024
5 checks passed
@docs-builder-bot
Copy link
Collaborator

rustagir added a commit that referenced this pull request Jan 16, 2024
* DOCSP-33427: split large cs events

* CC PR suggestions

(cherry picked from commit 9667a4f)
ccho-mongodb pushed a commit to ccho-mongodb/docs-kotlin that referenced this pull request Feb 14, 2024
* DOCSP-33427: split large cs events

* CC PR suggestions
ccho-mongodb pushed a commit to ccho-mongodb/docs-kotlin that referenced this pull request Feb 14, 2024
* DOCSP-33427: split large cs events

* CC PR suggestions
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.

3 participants