Skip to content
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 data races by removing unguarded goroutines; run mod tidy #16

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -16,7 +16,7 @@ install:
- go get -t -v ./...

script:
- go test -cover -coverprofile=coverage.txt -covermode=atomic -v ./...
- go test -cover -coverprofile=coverage.txt -covermode=atomic -v -race ./...

after_success:
- bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion cache/chain.go
Expand Up @@ -34,7 +34,7 @@ func (c *ChainCache) Get(key interface{}) (interface{}, error) {
object, err = cache.Get(key)
if err == nil {
// Set the value back until this cache layer
go c.setUntil(key, object, &storeType)
c.setUntil(key, object, &storeType)
return object, nil
}

Expand Down
2 changes: 1 addition & 1 deletion cache/metric.go
Expand Up @@ -62,7 +62,7 @@ func (c *MetricCache) updateMetrics(cache CacheInterface) {
}

case SetterCacheInterface:
go c.metrics.RecordFromCodec(current.GetCodec())
c.metrics.RecordFromCodec(current.GetCodec())
}
}

Expand Down
3 changes: 0 additions & 3 deletions go.mod
Expand Up @@ -5,13 +5,10 @@ go 1.13
require (
github.com/allegro/bigcache v1.2.1
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
github.com/coreos/etcd v3.3.18+incompatible
github.com/dgraph-io/ristretto v0.0.0-20191010170704-2ba187ef9534
github.com/go-redis/redis/v7 v7.0.0-beta.4
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/prometheus/client_golang v1.2.1
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
github.com/stretchr/testify v1.4.0
github.com/vmihailenco/msgpack v4.0.4+incompatible
golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 // indirect
Expand Down