-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: running logic tests with stressrace produces race in time.Now() #40336
Comments
I think this is caused by this line: cockroach/pkg/sql/logictest/logic.go Line 3185 in 65c30a3
Deleting this line fixes the race but breaks some unit tests, in particular this one:
I get:
So it appears hacking the time.Local field hides the fact that the SET TIME ZONE statement isn't working. cc @otan I'll probably spend some more time on this next flex friday if someone else doesn't snipe it. |
this is most likely because we're using lib/pq to format time directly in logictest, and they have some default format strings that do not make sense we'll likely want to change our timestamp printing to follow our CLI printing style to avoid this, e.g. #63541 |
fyi #63541 is merged |
…40336) Release note: none
…40336) Release note: none
When I run logic tests with
stressrace
, I sometimes get a failure due to a data race intime.Now()
. This seems to be the exact same problem as #30027, which was thought to have been fixed as of Go 1.11 (I think), but I'm getting it with Go 1.12.The most reliable way I've found to reproduce this is by supplying a
TESTS
regex that doesn't match any tests (e.g.,TestLogic/not_a_real_test
), in which case I get this failure every time:This also happens sometimes if I run other actual tests, though - simply running all the logic tests usually causes this to happen.
The text was updated successfully, but these errors were encountered: