Skip to content
This repository was archived by the owner on Feb 1, 2022. It is now read-only.

Conversation

@derickr
Copy link
Contributor

@derickr derickr commented Apr 3, 2014

No description provided.

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.

@bjori
Copy link
Contributor

bjori commented Apr 4, 2014

Wait. I'm confused. Without explicitly setting the batchSize to 2 before the getmore, why does it say the cursor is dead right away?
It clearly isn't dead as you are continuing to read results from it.

@bjori
Copy link
Contributor

bjori commented Apr 4, 2014

Nevermind. This is just the way it is, and seems to have been for a while.

The cursor reports itself as dead after the "last getmore" (e.g. op_reply reports the cursor is no longer available after reading this batch).
I guess this makes sense :]

LGTM

@derickr
Copy link
Contributor Author

derickr commented Apr 4, 2014

Yeah, I don't like the original definition either, but it is what it is :-)

derickr added a commit that referenced this pull request Apr 4, 2014
@derickr derickr merged commit 49b5346 into mongodb:master Apr 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants