Data Race in tokenAwareHostPolicy Init
steve-gray opened this issue · 1 comments
steve-gray commented
Probably needs proper mutexing - this one periodically causes flaking in CI for me.
8 ==================
105s
9 WARNING: DATA RACE
105s
10 Write at 0x00c00014ee68 by goroutine 13:
105s
11 github.com/gocql/gocql.(*tokenAwareHostPolicy).Init()
105s
12 /drone/src/vendor/github.com/gocql/gocql/policies.go:401 +0x1af
105s
13 github.com/gocql/gocql.NewSession()
105s
14 /drone/src/vendor/github.com/gocql/gocql/session.go:161 +0x12af
105s
15 github.com/gocql/gocql.(*ClusterConfig).CreateSession()
105s
16 /drone/src/vendor/github.com/gocql/gocql/cluster.go:217 +0x484
105s
17 github.com/zeroflucs/framework/storage/scylla-instinct.NewTableManager()
105s
18 /drone/src/vendor/github.com/zeroflucs/framework/storage/scylla-instinct/manager.go:30 +0x42f
105s
19 github.com/zeroflucs/content/internal/repository.(*contentRepository).initialize()
105s
20 /drone/src/internal/repository/operations.go:71 +0x23d
105s
21 github.com/zeroflucs/content/internal/repository.NewContentRepository()
105s
22 /drone/src/internal/repository/operations.go:45 +0x753
105s
23 github.com/zeroflucs/content/internal/repository_test.TestStartRepository()
105s
24 /drone/src/internal/repository/operations_test.go:57 +0x37a
105s
25 testing.tRunner()
105s
26 /usr/local/go/src/testing/testing.go:1259 +0x22f
105s
27 testing.(*T).Run·dwrap·21()
105s
28 /usr/local/go/src/testing/testing.go:1306 +0x47
105s
29
105s
30 Previous read at 0x00c00014ee68 by goroutine 61:
105s
31 github.com/gocql/gocql.(*tokenAwareHostPolicy).updateReplicas()
105s
32 /drone/src/vendor/github.com/gocql/gocql/policies.go:424 +0x10d
105s
33 github.com/gocql/gocql.(*tokenAwareHostPolicy).KeyspaceChanged()
105s
34 /drone/src/vendor/github.com/gocql/gocql/policies.go:412 +0xec
105s
35 github.com/gocql/gocql.(*Session).handleKeyspaceChange()
105s
36 /drone/src/vendor/github.com/gocql/gocql/events.go:129 +0xa1
105s
37 github.com/gocql/gocql.(*Session).handleSchemaEvent()
105s
38 /drone/src/vendor/github.com/gocql/gocql/events.go:114 +0x253
105s
39 github.com/gocql/gocql.(*Session).handleSchemaEvent-fm()
105s
40 /drone/src/vendor/github.com/gocql/gocql/events.go:108 +0x57
105s
41 github.com/gocql/gocql.(*eventDebouncer).flush·dwrap·35()
105s
42 /drone/src/vendor/github.com/gocql/gocql/events.go:67 +0x66`
steve-gray commented
Wrong repo. Meant to be /gocql