-
-
Notifications
You must be signed in to change notification settings - Fork 110
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 315 #317
Fix 315 #317
Conversation
This makes sure we reject any outstanding promises when a connection shuts down. The basic idea is pretty straightforward: loop over the questions table and reject everything. There is one thing to be careful of though: we must make sure we never fulfill or reject a promise before removing it from the questions table, or we could double-resolve it. This patch also fixes one remaining place where we were violating this rule.
LGTM. We have a short-term mitigation in place, so we'll wait for the tests. Thanks! 👍 |
Alright, I added a test, which passes. Marking this ready for review. |
Hm, not sure what the failure is about; tests pass repeatedly on my machine. |
tl;dr Maybe just check that @zenhack The failing test looks to be a race condition between the connection being closed and the expired context being detected by the bootstrap call. As we're explicitly testing for the It seems to me we only care that some error was returned when passing an expired context, not the specific error. (P.S.: passes on my machine, too.) |
@lthibault, hm, should it actually be possible to get a connection drop in that case? Why would that be happening in that test? |
I'd have to look again, but I think the connection is closed if bootstrap fails. |
Per discussion on Matrix, I'm going to merge and open a separate issue about the flaky tests |
Notes:
The last commit message discusses the solution in more detail.