Skip to content

fix: handle empty batches from Firestore#396

Merged
chrisrossi merged 2 commits intogoogleapis:masterfrom
chrisrossi:fix-386
Apr 24, 2020
Merged

fix: handle empty batches from Firestore#396
chrisrossi merged 2 commits intogoogleapis:masterfrom
chrisrossi:fix-386

Conversation

@chrisrossi
Copy link
Contributor

For some queries, when paging through batches of results, Firestore will
return a batch that has no results, even though there are still results
left to return for the query. Previously, this would cause
QueryIterator to prematurely stop iterating over results. Empty
batches are now handled and skipped so that QueryIterator doesn't stop
retrieving results prematurely.

Fixes #386

For some queries, when paging through batches of results, Firestore will
return a batch that has no results, even though there are still results
left to return for the query. Previously, this would cause
`QueryIterator` to prematurely stop iterating over results. Empty
batches are now handled and skipped so that `QueryIterator` doesn't stop
retrieving results prematurely.

Fixes googleapis#386
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 23, 2020
Copy link
Contributor

@cguardia cguardia left a comment

Choose a reason for hiding this comment

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

Looks good.

@chrisrossi chrisrossi merged commit 1a054ca into googleapis:master Apr 24, 2020
@chrisrossi chrisrossi deleted the fix-386 branch April 24, 2020 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fetching results stops when a batch is empty but more_results=NOT_FINISHED

3 participants