forked from fl00r/go-tarantool-1.6
-
Notifications
You must be signed in to change notification settings - Fork 60
ci: add tests with data race detector #258
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
better0fdead
approved these changes
Jan 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thx for patch. Seems like LGTM to me.
Initial requests should not use a schema because it has not been loaded yet. Part of #218
a591c9a
to
05c26aa
Compare
vr009
approved these changes
Jan 16, 2023
We need to block shards to avoid schema usage by concurrent requests. Now it can be a ping request or a watch request so it does not look critical. We don't expect many of this requests and such requests do not use schema at all. Part of #218
We need to use an atomic method to read the atomic value. Part of #218
A use-case from our code: a response per AppendPush(). It looks like it's enough to change the test. Part of #218
We need to update an addresses slice under a lock because we use the slice in ConnectionMulti.getCurrentConnection(). Part of #218
We need to use an atomic method to update the atomic value. Part of #218
You need to protect the poolWatcher.unregistered variable to avoid the data race. It does not look too critical because we don't expect that performance of poolWatcher.Unregister() is matter in cuncurrent calls case. It could also lead to crashes. Part of #218
It is better to use atomic counters. Part of #218
It is better to use atomic counters. Part of #218
3a92abe
to
5102ac2
Compare
Tests execution result may differ due to different timings, so it is better to test together, rather than instead. Closes #218
5102ac2
to
a6dd70e
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The patchset adds tests with race detector. It also fixes founded problems.
You could review commits one by one with the command:
$ go test -race -v ./...
I didn't forget about (remove if it is not applicable):
Related issues:
Closes #218