-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Use correct limit when retrying a limit query stream with a cursor #2203
Conversation
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.
There was a problem hiding this 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?
yes, I am planning to add tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
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