-
Notifications
You must be signed in to change notification settings - Fork 11
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-47836 clarify batchsize description #96
DOCSP-47836 clarify batchsize description #96
Conversation
✅ Deploy Preview for docs-c ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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 + small suggestion!
source/read/change-streams.txt
Outdated
- | The maximum number of documents within each batch returned | ||
in a change stream, which applies to the watch function. By default, watch functions have an initial batch size of ``101`` documents and a maximum size of 16 mebibytes (MiB) for each subsequent batch. This option can enforce a smaller limit than 16 MiB, but not a larger one. If you set ``batchSize`` to a limit that results in batches larger than 16 MiB, this option has no effect and the watch function uses the default batch size. |
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.
S: line 151 looks pretty long, so I'd break it up over a few lines. Also I think this wording for the first sentence is a little more clear / uses active voice:
- | The maximum number of documents within each batch returned | |
in a change stream, which applies to the watch function. By default, watch functions have an initial batch size of ``101`` documents and a maximum size of 16 mebibytes (MiB) for each subsequent batch. This option can enforce a smaller limit than 16 MiB, but not a larger one. If you set ``batchSize`` to a limit that results in batches larger than 16 MiB, this option has no effect and the watch function uses the default batch size. | |
- | The maximum number of documents that a change stream can | |
return in each batch, which applies to the watch function. By default, watch functions have an initial batch size of ``101`` documents and a maximum size of 16 mebibytes (MiB) for each subsequent batch. This option can enforce a smaller limit than 16 MiB, but not a larger one. If you set ``batchSize`` to a limit that results in batches larger than 16 MiB, this option has no effect and the watch function uses the default batch size. |
source/read/change-streams.txt
Outdated
- | The maximum number of documents that a change stream can | ||
return in each batch, which applies to the watch function. | ||
By default, watch functions have an initial batch size of ``101`` | ||
documents and a maximum size of 16 mebibytes (MiB) for each subsequent | ||
batch. This option can enforce a smaller limit than 16 MiB, but not a | ||
larger one. If you set ``batchSize`` to a limit that results in batches | ||
larger than 16 MiB, this option has no effect and the watch function uses | ||
the default batch size. |
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.
Could most of this paragraph be replaced with a link to Cursor Batches instead? e.g. as done for cursor.batchSize() (paraphrased):
The initial number of documents to return for a batch. The default initial batch size is 101 documents. Subsequent batches are 16 mebibytes. For details, see Cursor Batches.
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.
Good idea; I've replaced some of the paragraph, but it is still quite long because I think it's important to call out that you cannot pass in a value for batchSize that will cause the size of the batch to be > 16 MiB, as that's the main confusion that was called out in the ticket as well as the Slack thread that caused the ticket. The cursor.batchSize() page was also mentioned in the parent ticket as a page that needs to be changed as its definition does not state that batchSize can only be limited from 16 MiB and not raised, so I wanted to keep most of the wording to make sure that this functionality is clear.
* change batchsize description * nr feedback * fix wrapping * wrapping * Empty-Commit * tech feedback (cherry picked from commit 0861f21)
* change batchsize description * nr feedback * fix wrapping * wrapping * Empty-Commit * tech feedback (cherry picked from commit 0861f21)
* change batchsize description * nr feedback * fix wrapping * wrapping * Empty-Commit * tech feedback (cherry picked from commit 0861f21) Co-authored-by: shuangela <[email protected]>
* change batchsize description * nr feedback * fix wrapping * wrapping * Empty-Commit * tech feedback (cherry picked from commit 0861f21) Co-authored-by: shuangela <[email protected]>
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-47836
Staging - https://deploy-preview-96--docs-c.netlify.app/read/change-streams/#modify-watch-behavior
Self-Review Checklist