-
-
Notifications
You must be signed in to change notification settings - Fork 49
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 beginTxOnce() context cancel #64
fix beginTxOnce() context cancel #64
Conversation
ffb24e3
to
d688654
Compare
d688654
to
08031bc
Compare
I'm investigating this closer today, and trying to reproduce it locally, to verify that this is the optimal solution, bit I'm not able to trigger the error, using either your test, or using my own techniques. Can you provide any additional insight into the circumstances under which this problem surfaces? Also, which database driver are you using? |
I can reproduce this by running TestShouldRunWithHeavyWork locally without modifying beginTxOnce() in db_go18.go. Also, I am using mysql in my actual development environment. |
@flimzy @daisuke0925m |
We have a test suite that was plagued by this error in GHA and this change seems to fix it. I also never was able to reproduce it on my laptop, you need a machine a sluggish as a CI runner to get there apparently. |
I'm on holiday now, but when I return, I intend to get back into this and merge it, or an alternative fix, based on my investigation. |
Just wanted to bump. Been using this for 3 weeks now and haven't seen the issue resurface or any other problems. |
My apologies to everyone for my delay in getting back to this. I was able to re-produce the problem locally with the hints above. And while I don't think the underlying structure of how go-txdb handles contexts is ideal (I think I've spotted at least one other possible race condition), this does appear to be an improvement in behavior at least, so worth merging. I may try to do additional refactoring later. |
we received this error.
fix: #43 (comment)