Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

fix: Use correct limit when retrying a limit query stream with a cursor#2203

Merged
ehsannas merged 5 commits intomainfrom
ehsann/fix-2200
Oct 2, 2024
Merged

fix: Use correct limit when retrying a limit query stream with a cursor#2203
ehsannas merged 5 commits intomainfrom
ehsann/fix-2200

Conversation

@ehsannas
Copy link
Copy Markdown
Contributor

When a query is streamed and the stream fails after receiving part of the result set, the client retries the stream with a cursor. If the original query has a limit, the retry logic should use a modified limit for the remainder of the stream to ensure the final result contains the correct number of documents.

fixes #2200

When a query is streamed and the stream fails after receiving part of the
result set, the client retries the stream with a cursor. If the original
query has a limit, the retry logic should use a modified limit for the
remainder of the stream to ensure the final result contains the correct
number of documents.
@ehsannas ehsannas requested review from a team September 27, 2024 22:51
@ehsannas ehsannas self-assigned this Sep 27, 2024
@product-auto-label product-auto-label Bot added size: s Pull request size is small. api: firestore Issues related to the googleapis/nodejs-firestore API. labels Sep 27, 2024
Copy link
Copy Markdown
Contributor

@dconeybe dconeybe left a comment

Choose a reason for hiding this comment

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

Drive-by comment: Are you able to add a test for this scenario? Maybe the test added in #1806 could be an example?

@ehsannas
Copy link
Copy Markdown
Contributor Author

yes, I am planning to add tests.

@product-auto-label product-auto-label Bot added size: l Pull request size is large. and removed size: s Pull request size is small. labels Oct 1, 2024
Comment thread dev/src/reference/query-util.ts Outdated
Comment thread dev/test/query.ts Outdated
Comment thread dev/test/query.ts Outdated
Comment thread dev/test/query.ts
Comment thread dev/test/query.ts Outdated
Comment thread dev/test/query.ts Outdated
Comment thread dev/test/query.ts Outdated
Comment thread dev/test/query.ts Outdated
Comment thread dev/test/recursive-delete.ts
Comment thread dev/test/query.ts
@ehsannas ehsannas requested a review from dconeybe October 1, 2024 22:17
@ehsannas ehsannas assigned dconeybe and unassigned ehsannas Oct 1, 2024
Comment thread dev/test/recursive-delete.ts
Comment thread dev/test/query.ts Outdated
Comment thread dev/test/query.ts Outdated
Comment thread dev/test/query.ts Outdated
@ehsannas ehsannas requested a review from dconeybe October 2, 2024 19:13
Copy link
Copy Markdown
Contributor

@dconeybe dconeybe left a comment

Choose a reason for hiding this comment

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

Awesome!

@ehsannas ehsannas added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 2, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 2, 2024
@ehsannas ehsannas merged commit ab94092 into main Oct 2, 2024
@ehsannas ehsannas deleted the ehsann/fix-2200 branch October 2, 2024 21:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: firestore Issues related to the googleapis/nodejs-firestore API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Too many documents returned from query.stream with limit after retry

3 participants