#known 2016-05-18

2016-05-18 UTC
tantek, j12t_, benwerd, loic_m, j12t, mapkyca, mattl__, cleverdevil, KevinMarks and ben_thatmustbeme joined the channel
#
mapkyca
@kylewm Just trying to debug export. It seems because getRecords() now returns a MappingIterator, it's not possible to simply test $results to see if it's finished (at least on mongo). Is there any reliable way to tell whether getRecords has finished?
#
mapkyca
I'm not entirely sure whether getRecords _should_ be returning a MappingIterator
j12t, Madgod and cleverdevil joined the channel
#
kylewm
mapkyca: where is it having trouble telling whether getRecords is finished? the mappingiterator is supposed to terminate when the cursor from Mongo terminates
#
kylewm
I don't think it was strictly necessary to add MappingIterator. iirc, the result cursor is always realized into an array right away by the caller. but I added it because I didn't want to enforce that behavior in case someone in the future wants to grab only the first few results
KevinMarks joined the channel
#
mapkyca
yeah, I found the problem - patch sent. Basically mongo always returns a MongoCursor, so it wasn't possible to safely do a while ($results = ...->getRecords())
#
mapkyca
one of the many examples of where mongo behaves differently to SQL based data stores
#
mapkyca
I've fudged it for now, but wasn't going to spend too much time on it since we're going to kill mongo eventually
tantek and j12t joined the channel
#
kylewm
Excellent
KevinMarks, loic_m and tantek joined the channel