-
Notifications
You must be signed in to change notification settings - Fork 527
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
coordinate successful and failing fetches #6699
coordinate successful and failing fetches #6699
Conversation
make sure that the servers all receive their requests before confirming that a successful response from one server cancels the shared context in the fetch code.
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
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.
looks good, thanks for doing this
resc <- response{consumer, err} | ||
}() | ||
// Make sure every server has received a request | ||
wg.Wait() |
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.
Can't we remove this wait group? It seems to me that the channels are already making the test wait until we've received all the signals. What is this wait group adding on top of that?
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.
The waitgroup is making sure that each handler has received a request before we attempt to read from any of the channels. Without that, we could potentially read from errc
and successc
without the third handler ever being invoked.
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.
got it, feel free to merge, thanks for the explanation
make sure that the servers all receive their requests before confirming that a successful response from one server cancels the shared context in the fetch code. (cherry picked from commit 039bffa)
make sure that the servers all receive their requests before confirming that a successful response from one server cancels the shared context in the fetch code. (cherry picked from commit 039bffa) Co-authored-by: stuart nelson <[email protected]>
Motivation/summary
make sure that the servers all receive their
requests before confirming that a successful
response from one server cancels the shared
context in the fetch code.
How to test these changes
non-functional change
Related issues
closes #5836