b8a2fbb887
Currently bleve batch is build by user goroutine Then read by bleve gourinte This is still safe when used correctly However, Reset() will modify the map, which is now a data race This fix is to simply make batch.Reset() alloc new maps. This provides a data-access pattern that can be used safely. Also, this thread argues that creating a new map may be faster than trying to reuse an existing one: https://groups.google.com/d/msg/golang-nuts/UvUm3LA1u8g/jGv_FobNpN0J Separate but related, I have opted to remove the "unsafe batch" checking that we did. This was always limited anyway, and now users of Go 1.6 are just as likely to get a panic from the runtime for concurrent map access anyway. So, the price paid by us (additional mutex) is not worth it. fixes #360 and #260 |
||
---|---|---|
.. | ||
analysis_test.go | ||
analysis.go | ||
benchmark_all.sh | ||
benchmark_boltdb_test.go | ||
benchmark_common_test.go | ||
benchmark_cznicb_test.go | ||
benchmark_forestdb_test.go | ||
benchmark_goleveldb_test.go | ||
benchmark_gorocksdb_test.go | ||
benchmark_gtreap_test.go | ||
benchmark_leveldb_test.go | ||
benchmark_null_test.go | ||
dump_test.go | ||
dump.go | ||
field_dict_test.go | ||
field_dict.go | ||
index_reader.go | ||
reader_test.go | ||
reader.go | ||
row_merge_test.go | ||
row_merge.go | ||
row_test.go | ||
row.go | ||
stats.go | ||
upside_down_test.go | ||
upside_down.go | ||
upside_down.pb.go | ||
upside_down.proto |