{"push_id":636700742,"size":1,"distinct_size":1,"ref":"refs/heads/tschottdorf/tick_interval","head":"b29bc056ef58a327bdcaad328c62e22e0a067093","before":"6c895749254836aa6b3e0a0e69eb93053d34c19f","commits":[{"sha":"b29bc056ef58a327bdcaad328c62e22e0a067093","author":{"email":"25fad7a39062a81fcaf88abd782f9f69679c0bdf@gmail.com","name":"Tobias Schottdorf"},"message":"lock instead of atomic update in util.Stopper\n\nFrom [1466](https://circleci.com/gh/cockroachdb/cockroach/1466).\nThe issue is that checking atomically for a value and then acting\non it gives no guarantee that the condition still holds.\n\n```\n==================\nWARNING: DATA RACE\nWrite by goroutine 27:\n  sync.raceWrite()\n      /usr/src/go/src/sync/race.go:41 +0x36\n  sync.(*WaitGroup).Wait()\n      /usr/src/go/src/sync/waitgroup.go:125 +0x177\n  github.com/cockroachdb/cockroach/util.(*Stopper).Stop()\n      /go/src/github.com/cockroachdb/cockroach/util/stopper.go:117 +0x6b\n  github.com/cockroachdb/cockroach/storage.(*testContext).Stop()\n      /go/src/github.com/cockroachdb/cockroach/storage/range_test.go:185 +0x4c\n  github.com/cockroachdb/cockroach/storage.TestGCQueueShouldQueue()\n      /go/src/github.com/cockroachdb/cockroach/storage/gc_queue_test.go:115 +0x1a07\n  testing.tRunner()\n      /usr/src/go/src/testing/testing.go:447 +0x133\n\nPrevious read by goroutine 37:\n  sync.raceRead()\n      /usr/src/go/src/sync/race.go:37 +0x36\n  sync.(*WaitGroup).Add()\n      /usr/src/go/src/sync/waitgroup.go:63 +0xc1\n  github.com/cockroachdb/cockroach/util.(*Stopper).StartTask()\n      /go/src/github.com/cockroachdb/cockroach/util/stopper.go:101 +0x6d\n  github.com/cockroachdb/cockroach/storage.(*Range).requestLeaderLease()\n      /go/src/github.com/cockroachdb/cockroach/storage/range.go:1470 +0x97\n  github.com/cockroachdb/cockroach/storage.funcÂ·031()\n      /go/src/github.com/cockroachdb/cockroach/storage/store.go:1195 +0x4fc\n--\n```","distinct":true,"url":"https://api.github.com/repos/cockroachdb/cockroach/commits/b29bc056ef58a327bdcaad328c62e22e0a067093"}]}