-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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-47795 change batchsize descriptions #6292
base: master
Are you sure you want to change the base?
Changes from 3 commits
8deeac6
be213a1
33ca30a
d5b3d92
cf8c2a4
bc536e2
035d691
faf17d1
63c684f
e660f33
caa5e22
0617073
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,9 +132,14 @@ The command accepts the following fields: | |
|
||
* - ``batchSize`` | ||
- non-negative integer | ||
- Optional. The number of documents to return in the first batch. | ||
Defaults to 101. A batchSize of 0 means that the cursor will be | ||
established, but no documents will be returned in the first batch. | ||
- Optional. The maximum number of documents within each batch returned in a query result. | ||
By default, the ``find`` command has 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. | ||
` | ||
A batchSize of 0 means that the cursor will be established, but no documents | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [tense suggestion] Consider updating this to use the present tense. Spitballing:
Thanks! |
||
will be returned in the first batch. | ||
|
||
Unlike the previous wire protocol version, a batchSize of 1 for | ||
the :dbcommand:`find` command does not close the cursor. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,11 +72,12 @@ The command accepts the following fields: | |
|
||
* - ``batchSize`` | ||
- positive integer | ||
- Optional. The number of documents to return in the batch. | ||
- Optional. Specifies the maximum number of documents within each batch returned in a query result. | ||
|
||
If ``batchSize`` is not set, ``getMore`` returns up to 16 | ||
mebibytes of data. If ``batchSize`` is set, ``getMore`` returns | ||
the smaller of 16 mebibytes of data or ``batchSize`` documents. | ||
If batchSize is not set, getMore returns up to ``101`` documents in the first batch | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [style suggestion] Consider wrapping "batchSize" and "getMore" in backticks here on line 77. |
||
and up to 16 mebibytes (MiB) of data in all subsequent batches. If ``batchSize`` is set, ``getMore`` returns | ||
the smaller of 16 mebibytes of data or ``batchSize`` documents. If you set ``batchSize`` to a limit that results | ||
in batches larger than 16 MiB, this option has no effect. | ||
|
||
* - ``maxTimeMS`` | ||
- non-negative integer | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,14 @@ Definition | |
|
||
.. include:: /includes/fact-mongosh-shell-method.rst | ||
|
||
Specifies the | ||
number of documents to return in each batch of the response from the | ||
MongoDB instance. In most cases, modifying the batch size will | ||
not affect the user or the application, as :binary:`~bin.mongosh` and | ||
most :driver:`drivers </>` return results as if MongoDB returned a | ||
single batch. | ||
Specifies the maximum number of documents within each batch returned in a query result. | ||
By default, the initial batch size is ``101`` documents and subsequent batches have a maximum | ||
size of 16 mebibytes (MiB). 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. | ||
|
||
A batchSize of 0 means that the cursor will be established, but no documents | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [tense suggestion] Consider updating this to use the present tense. Spitballing:
|
||
will be returned in the first batch. | ||
|
||
.. note:: | ||
|
||
|
@@ -51,9 +53,10 @@ Definition | |
|
||
* - ``size`` | ||
- integer | ||
- The initial number of documents to return for a batch. The | ||
default initial batch size is 101 documents. Subsequent | ||
batches are 16 mebibytes. The default applies to drivers and | ||
- The maximum number of documents to return for a batch. The | ||
default initial batch size is ``101`` documents and subsequent | ||
batches have a maximum size of 16 mebibytes (MiB). This option can enforce a smaller limit than | ||
16 MiB, but not a larger one. The default applies to drivers and | ||
Mongo Shell. For details, see :ref:`cursor-batches`. | ||
|
||
Compatibility | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,13 +115,15 @@ Definition | |
* - ``batchSize`` | ||
|
||
- int | ||
- Optional. Specifies the maximum number of change events to return in each | ||
batch of the response from the MongoDB cluster. | ||
- Optional. The maximum number of documents within each batch returned in a change stream. | ||
By default, :method:`~db.collection.watch()` has 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [behavior question] Can we clarify what we mean by "no effect" here? I take it that means it uses the default. |
||
|
||
Has the same functionality as :method:`cursor.batchSize()`. | ||
|
||
|
||
|
||
* - ``maxAwaitTimeMS`` | ||
|
||
- int | ||
|
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.
[behavior question]
Can we clarify what we mean by "no effect" here? I take it that means it uses the default. Thanks!
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.
Yes, it means it will use the default, will clarify!