-
Notifications
You must be signed in to change notification settings - Fork 18
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
DOCSP-33427: split large cs events #145
Conversation
There was a problem hiding this 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 |
There was a problem hiding this comment.
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:
// 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 |
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
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: {} }")) |
There was a problem hiding this comment.
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()))
✨ Staging URL: https://preview-mongodbmongodb.gatsbyjs.io/kotlin/master/ 🪵 Logs |
* DOCSP-33427: split large cs events * CC PR suggestions (cherry picked from commit 9667a4f)
* DOCSP-33427: split large cs events * CC PR suggestions
* DOCSP-33427: split large cs events * CC PR suggestions
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-33427
Staging
Self-Review Checklist