Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Intermittent failures in localtests #753
Comments
|
Two things worked for me to fix this (50 uninterrupted test runs).
Of the two, I think the 2nd probably makes more sense. Though it's still a guess how long it should wait (unless we make it a command line parameter). I don't know if allowing retries in the localtests is the right approach. There may be a more appropriate way to deal with this by not using the hints for the query. I'm not sure how you feel about that. |
|
@zmoazeni thank you for investigating!
The query is indeed being retried as per: Lines 654 to 667 in ffc6c40
I'm surprised to see I'm all for using |


Per #750 I was going to try digging into some possible causes for the intermittent failures in localtests.
I now have a way to reliable reproduce it. zmoazeni@b3955d1
If you read the commit, it'll explain how to reproduce (just run
./force-failure). It may take ~4-15 iterations before you run into the issue. It doesn't take that long. About a minute or two.The problem seems to be in
gh-ost/go/logic/applier.go
Lines 711 to 723 in ffc6c40
The timing issue is that at the time we query, the sessionId does exist, however neither the
statenor theinfocolumns are populated. So we end up getting no rows/found=falsebased on our hints in the where clause and we return an error.Update: A followup query does include both. Which made it hard to debug at first, but I decided to push the logic into Go instead which highlighted the problem.
Here's the output of a full run for me that failed on the 3rd attempt (it says 2nd attempt, but...off by one errors :/)
https://gist.github.com/zmoazeni/e40ba08113bc5f8e3843443d51e03b66
I wonder what you think @shlomi-noach (or anyone else). Do you think we should retry this query? Should we do some special handling on the hint criteria? Something else entirely?