-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix race condition in pool close (#3217) #3299
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
Conversation
@madadam if you rebase it should fix the CI failure. |
eaaa536
to
cdb5707
Compare
Given that the |
cdb5707
to
5a6d8b5
Compare
Finally found some time to look into this. The test was failing due to a deadlock: There was still one checked out connection inside the |
That's weird, now some of the migrations tests are timing out. |
Yeah I noticed. I'll try to look into it when I can. Btw, how do you guys run these tests locally? I noticed that
Also, trying to run a single target using the
|
Ok, I think the problem is that when parent pool is used (which is the case in those failing tests), the child pool's semaphore is created with zero initial permits. So trying to acquire any permits on it in |
@madadam I think we could just get rid of the parent/child pool thing. I've been conceptualizing a whole new architecture for Instead, we could just divide a default We could use an environment variable, |
Re. Being able to run the same tests CI performs locally would be awesome, but there's also the issue of having a single source of truth for the tests. If commands get added to https://github.com/nektos/act seems promising but it needs some tweaking since it doesn't support The top result I get from Reddit about locally runnable CI is "just use Makefiles"... gross. |
I'm thinking it'd be really neat if |
@madadam @abonander I'm suggesting a fix here: #3952. Would you like to continue the discussion there? I'd love to help expedite the fix for this bug with any additional help I can offer, since these leftover connections are negatively affecting a project of mine, plus I want to contribute back to this project! |
@jpmelos Looks good to me and can be a good quick fix until the more substantial changes @abonander is talking about are implemented. |
Closed by #3952 |
Attempt to fix #3217.