-
Notifications
You must be signed in to change notification settings - Fork 271
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
Fixing hasNext behaviour #1745
Merged
Merged
Fixing hasNext behaviour #1745
Commits on Sep 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 88f24e5 - Browse repository at this point
Copy the full SHA 88f24e5View commit details -
WIP: attempt at fixing hasNext
we previously returned an empty graphql response at the end of the response stream to set the `hasNext` field to false, to indicate that no more responses will come. That empty response is causing issues in some clients, so 24a00e6 was a fix to set the `hasNext` on a deferred response from inside query planner execution, but it does not account for parallel deferred response executions, so one response might come with `hasNext` to false then get another one. This commit attempts another solution, where we go through an intermediate task that checks if the response stream is closed (it is a channel, so it implements `FusedStream`). Unfortuantely, right now it fals to recognize when the stream is closed
Configuration menu - View commit details
-
Copy full SHA for 8d8ae23 - Browse repository at this point
Copy the full SHA 8d8ae23View commit details -
properly detect the end of stream
since the stream is marked as terminated from inside poll_next, we need to call it a second time after getting a message, to check if it is closed, but we cannot do that with an async method, since we need to send the current message ASAP. So we call `try_next`, and depending on its result, we either send the current message, or set hasNext on the current message and send it if the channel is closed, or send the current message, get the next one and try again to see if there's another one
Configuration menu - View commit details
-
Copy full SHA for 69ab5bd - Browse repository at this point
Copy the full SHA 69ab5bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d83d78 - Browse repository at this point
Copy the full SHA 1d83d78View commit details
Commits on Sep 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for be8a0ab - Browse repository at this point
Copy the full SHA be8a0abView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0093897 - Browse repository at this point
Copy the full SHA 0093897View commit details -
Configuration menu - View commit details
-
Copy full SHA for 227e0cb - Browse repository at this point
Copy the full SHA 227e0cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 31b2735 - Browse repository at this point
Copy the full SHA 31b2735View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1efd9a4 - Browse repository at this point
Copy the full SHA 1efd9a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 17e383a - Browse repository at this point
Copy the full SHA 17e383aView commit details -
Configuration menu - View commit details
-
Copy full SHA for fda59d3 - Browse repository at this point
Copy the full SHA fda59d3View commit details
Commits on Sep 14, 2022
-
detect if the stream disconnected before marking the last message
there could be a race condition where we consume and send all messages, then await for the next one, then the stream is closed and we don't have any message on which we would set `has_next`. So we detect that case and add a last message
Configuration menu - View commit details
-
Copy full SHA for 5210765 - Browse repository at this point
Copy the full SHA 5210765View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ddb5e9 - Browse repository at this point
Copy the full SHA 2ddb5e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for d91fa00 - Browse repository at this point
Copy the full SHA d91fa00View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.