-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fixed data race and some flappers #2984
Conversation
Data race that has been seen: ``` Read at 0x00c00134bec0 by goroutine 159: github.com/nats-io/nats-server/v2/server.(*client).msgHeaderForRouteOrLeaf() /home/travis/gopath/src/github.com/nats-io/nats-server/server/client.go:2935 +0x254 github.com/nats-io/nats-server/v2/server.(*client).processMsgResults() /home/travis/gopath/src/github.com/nats-io/nats-server/server/client.go:4364 +0x2147 (...) Previous write at 0x00c00134bec0 by goroutine 201: github.com/nats-io/nats-server/v2/server.(*Server).addRoute() /home/travis/gopath/src/github.com/nats-io/nats-server/server/route.go:1475 +0xdb4 github.com/nats-io/nats-server/v2/server.(*client).processRouteInfo() /home/travis/gopath/src/github.com/nats-io/nats-server/server/route.go:641 +0x1704 ``` Also fixed some flappers and removed use of `s.js.` since we have already captured `js` in Jsz monitoring. Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@ripienaar The changes in monitor.go (Jsz) is just to not use |
@@ -29,8 +29,8 @@ before_script: | |||
script: | |||
- set -e | |||
- if [[ $TRAVIS_TAG ]]; then go test -v -run=TestVersionMatchesTag ./server; fi | |||
- if [[ ! $TRAVIS_TAG ]]; then go test -v -run=TestNoRace --failfast -p=1 -timeout 20m ./...; fi | |||
- if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.16 ]]; then ./scripts/cov.sh TRAVIS; else go test -v -race -p=1 --failfast -timeout 20m ./...; fi; fi | |||
- if [[ ! $TRAVIS_TAG ]]; then go test -v -run=TestNoRace --failfast -p=1 -timeout 30m ./...; fi |
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.
These 2 changes were not really needed thinking about it. The timeout is per package. The longest right now is the server and takes about 14 or so minutes, but I guess it doesn't hurt (this is the upper limit).
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.
Monitor changes LGTM
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.
LGTM
Data race that has been seen:
Also fixed some flappers and removed use of
s.js.
since we havealready captured
js
in Jsz monitoring.Signed-off-by: Ivan Kozlovic ivan@synadia.com