Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/generic/mongocommandcursor-dead.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ $c = new MongoCommandCursor(
'cursor' => array( 'batchSize' => 2 )
)
);
$c->batchSize(2);
Copy link
Member

Choose a reason for hiding this comment

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

This is peculiar. Does it not inherit the batchSize from the original command, or is the command option only for the initial inline batch?

Copy link
Contributor

Choose a reason for hiding this comment

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

AFAICT from the spec, these batchsizes are completely independent.
Unless you set the batchsize after the initial command, it will default to the server default.

This does indeed seem a bit confusing but I think this fix is correct.

Copy link
Contributor

Choose a reason for hiding this comment

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

"The batch sizes for each getMore is an independant parameter from this and uses the normal getMore semantics of 0 meaning server default."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct.


$c->rewind();
while ($c->valid()) {
Expand Down