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
Make pending activations interrupt long poll #89
Make pending activations interrupt long poll #89
Conversation
_ = shutdownfut => { | ||
Err(ShutdownErr.into()) | ||
} | ||
_ = pa_fut => { |
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.
What happens to the poll request in this case?
Is it cancelled? Is it ignored?
We probably don't want to create a new request if we got interrputed.
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.
Yeah it's a good question, was thinking about it after I wrote this. I'll see if I can figure out a way to test that while I finish this. Ideally, it doesn't really matter, because we spit out the PA so fast that when we go back to requesting it'll kinda be like nothing ever happened... but perhaps we need to keep the polling future around in order to ensure that behavior. I'll play with it.
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.
I think this opens up too big of a can of worms to deal with in this PR. Ideally the request should actually be cancelled I think. Keeping it around raises too many questions like "what if the next poll is for a different task queue" or "how long should we buffer the response" and so on. I opened #91 so we can come back to this
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.
I agree, we should discard initial poll as from the lang's perspective it polled and got an activation, it shouldn't care if core made a request to the server or not in order to get it.
What was changed:
Pending activations need to take priority over any currently in-progress but not yet completed poll. This fixes that.
Why?
Cancels of activities were getting lost because of the long poll
Checklist
Closes issue:
How was this tested: