On Tue, 25 Sep 2012, Alex Montgomery wrote:
> Hello all,
>
> I am seeing a similar issue. The only difference between my code and what
> Matt has written is the order in which I set the batchSize and sort on the
> cursor.
>
> I do something like:
> $cursor = $mongo->{$table_name}->find($mongo_args)->sort(array('ts' => 1));
> $cursor->batchSize(5000);
Order doesn't matter, as the query only gets send to the server when you
start iterating with foreach().
> Would this cause any discrepancies. Derick, I read your article on
> how Mongo cursors work in PHP ... really great stuff. It is this
> article that inspired me to use the batchSize because the logs I am
> pulling from mongo are enormous. Any idea on when this issue might be
> resolved?
The thread initiator didn't give us an issue - if you can create one
with a full dataset and example for us to try to reproduce it, we'd be
happy to look at it.
cheers,
Derick
--
{
website: [ "
http://mongodb.org", "
http://derickrethans.nl" ],
twitter: [ "@derickr", "@mongodb" ]
}