Description
Wrote a simple unit test to just load 1M items while simultaneously issuing collection level Get() operations and hit a data race between the background collection merger go routine and the front end Get()
WARNING: DATA RACE
Write at 0x00c420dc6c10 by goroutine 7: github.com/couchbase/moss.(*collection).mergerNotifyPersister() github.com/couchbase/moss/collection_merger.go:280 +0x676 github.com/couchbase/moss.(*collection).runMerger() github.com/couchbase/moss/collection_merger.go:132 +0x454
Previous read at 0x00c420dc6c10 by goroutine 6: github.com/couchbase/moss.(*segmentStack).get() github.com/couchbase/moss/segment_stack.go:106 +0x81 github.com/couchbase/moss.(*segmentStack).Get() github.com/couchbase/moss/segment_stack.go:71 +0xae github.com/couchbase/moss.(*collection).get() github.com/couchbase/moss/collection.go:640 +0x40b github.com/couchbase/moss.(*collection).Get() github.com/couchbase/moss/collection.go:259 +0xe5 github.com/couchbase/moss.Test_JustLoad1Mitems() github.com/couchbase/moss/persister_test.go:1201 +0x51b testing.tRunner() }}{{