-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fetchNext() does not return the first result #23771
Comments
hi @paulsmithkc This is the expected behaviour, hasMoreResults is always true by default, it gets set to false after fetchNext if there is no more continuation! |
@sajeetharan You misunderstood the issue. Previously the first time fetchNext returned, it would include a result. Now you have to call fetchNext() multiple times to get the first result. |
Reopening to investigate further. |
By "Previously" you mean at an earlier time when the database had different number of entities? This is possible because the paritions might have been different. We have a gist that describes this issue here. Could you clarify what you meant by "Previously"? |
I think that gist accurately describes the problem.
|
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @bkolant-MSFT, @sajeetharan, @pjohari-ms. Issue Details
Describe the bug Sometimes the first call to On the other hand So we are switching all of the To Reproduce
Expected behavior Actual behavior Screenshots Additional context
|
Hi @paulsmithkc, we deeply appreciate your input into this project. Regrettably, this issue has remained unresolved for over 2 years and inactive for 30 days, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support. |
Describe the bug
After investigation we found that there is as any issue with the
fetchNext()
method that we are using, when we only expect one database result.Sometimes the first call to
fetchNext()
will return an empty array of resources withhasMoreResults = true
. In order to get the first record in this situation you have to callfetchNext()
multiple times until you get a result, orhasMoreResults
becomes comes false.On the other hand
fetchAll()
will callfetchNext()
multiple times until all the results are retrieved. (There are no more results.)So we are switching all of the
findOne()
and similar methods over to usefetchAll()
to avoid this problem.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The first call to
fetchNext()
always returns the first query result.Actual behavior
The first call to
fetchNext()
does not always return the first result.Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: