You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another corner case can lead to a race when resetting a batch, in this case it happens when batch just contains a delete (or more likely as it was found in the wild, when a batch contains ONLY deletes)
Here is the race with scorch:
=== RUN TestBatchRaceBugXXX
==================
WARNING: DATA RACE
Write at 0x00c0003484a0 by goroutine 10:
github.com/blevesearch/bleve.TestBatchRaceBugXXX()
/home/mschoch/dev/go/src/github.com/blevesearch/bleve/index/index.go:310 +0x320
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
Previous read at 0x00c0003484a0 by goroutine 15:
github.com/blevesearch/bleve/index/scorch.(*Scorch).Batch.func2()
/home/mschoch/dev/go/src/github.com/blevesearch/bleve/index/scorch/scorch.go:317 +0x52
Similar observation with upsidedown:
=== RUN TestBatchRaceBugXXX
==================
WARNING: DATA RACE
Write at 0x00c000352440 by goroutine 10:
github.com/blevesearch/bleve.TestBatchRaceBugXXX()
/home/mschoch/dev/go/src/github.com/blevesearch/bleve/index/index.go:310 +0x2dc
testing.tRunner()
/usr/local/go/src/testing/testing.go:827 +0x162
Previous read at 0x00c000352440 by goroutine 11:
github.com/blevesearch/bleve/index/upsidedown.(*UpsideDownCouch).Batch.func1()
/home/mschoch/dev/go/src/github.com/blevesearch/bleve/index/upsidedown/upsidedown.go:815 +0x52
Another corner case can lead to a race when resetting a batch, in this case it happens when batch just contains a delete (or more likely as it was found in the wild, when a batch contains ONLY deletes)
Here is the race with scorch:
Similar observation with upsidedown:
The code to reproduce is:
The text was updated successfully, but these errors were encountered: