-
Notifications
You must be signed in to change notification settings - Fork 34
DOCSP-47835 Clarify batchsize behavior #215
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
Changes from 16 commits
4d29070
bf79b9e
b02a39a
248115f
6f46523
a7bd71c
269819f
76d9bd5
69d3ed4
c18ef44
e9aab32
6183d86
89b304c
635e787
debcfe1
380a16e
892f7ea
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 |
---|---|---|
|
@@ -180,7 +180,12 @@ you can set in the array: | |
- Description | ||
|
||
* - ``batchSize`` | ||
- | The number of documents to return per batch. The default value is ``101``. | ||
- | The maximum number of documents within each batch returned in a query result. By default, | ||
the ``find()`` method has an initial batch size of ``101`` 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. Since this section is talking about both Therefore, this snippet will just duplicate the first paragraph from the |
||
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. | ||
| **Type**: ``integer`` | ||
|
||
* - ``collation`` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,9 +52,14 @@ Parameters | |
|
||
* - batchSize | ||
- integer | ||
- 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. | ||
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. The special behavior of |
||
- 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 | ||
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 |
---|---|---|
|
@@ -54,16 +54,16 @@ Parameters | |
|
||
* - batchSize | ||
- integer | ||
- Specifies the batch size for the cursor, which will apply to both the | ||
initial ``aggregate`` command and any subsequent ``getMore`` commands. | ||
This determines the maximum number of documents to return in each | ||
response from the server. | ||
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. I think we can discuss There is also a special directive in the CRUD spec for drivers to intentionally omit |
||
|
||
A batchSize of ``0`` is special in that and will only apply to the | ||
initial ``aggregate`` command; subsequent ``getMore`` commands will use | ||
the server's default batch size. This may be useful for quickly | ||
returning a cursor or failure from ``aggregate`` without doing | ||
significant server-side work. | ||
- The maximum number of documents within each batch returned in a query result. | ||
By default, the ``aggregate`` 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 | ||
will be returned in the first batch. This may be useful for quickly returning a cursor | ||
or failure from ``aggregate`` without doing significant server-side work. | ||
|
||
* - bypassDocumentValidation | ||
- boolean | ||
|
Uh oh!
There was an error while loading. Please reload this page.