0
0
bleve/index/upside_down
Marty Schoch b8a2fbb887 fix data race in bleve batch reuse
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
2016-04-08 15:32:13 -04:00
..
analysis_test.go copy locations on merge for more safe/predictable behavior 2016-01-19 14:21:48 -05:00
analysis.go fix typos 2016-04-02 21:59:30 -04:00
benchmark_all.sh refactor of kvstore api to support native merge in rocksdb 2015-04-24 17:13:50 -04:00
benchmark_boltdb_test.go major kvstore interface and impl overhaul 2015-09-23 11:25:47 -07:00
benchmark_common_test.go major kvstore interface and impl overhaul 2015-09-23 11:25:47 -07:00
benchmark_cznicb_test.go major refactor of bleve configuration 2015-09-16 17:10:59 -04:00
benchmark_forestdb_test.go fix benchmarks for the x kvstores 2015-10-09 11:09:42 -04:00
benchmark_goleveldb_test.go major kvstore interface and impl overhaul 2015-09-23 11:25:47 -07:00
benchmark_gorocksdb_test.go fix benchmarks for the x kvstores 2015-10-09 11:09:42 -04:00
benchmark_gtreap_test.go major kvstore interface and impl overhaul 2015-09-23 11:25:47 -07:00
benchmark_leveldb_test.go fix benchmarks for the x kvstores 2015-10-09 11:09:42 -04:00
benchmark_null_test.go major kvstore interface and impl overhaul 2015-09-23 11:25:47 -07:00
dump_test.go gofmt simplifications 2016-04-02 21:54:33 -04:00
dump.go upside_down analysis converts to docIDBytes once 2016-01-06 23:38:02 -08:00
field_dict_test.go fix errcheck issues 2015-10-19 14:27:03 -04:00
field_dict.go major kvstore interface and impl overhaul 2015-09-23 11:25:47 -07:00
index_reader.go upside_down analysis converts to docIDBytes once 2016-01-06 23:38:02 -08:00
reader_test.go gofmt simplifications 2016-04-02 21:54:33 -04:00
reader.go add term search stats 2016-03-05 07:50:25 -05:00
row_merge_test.go fix row merging bug 2015-05-06 11:00:04 -04:00
row_merge.go fix row merging bug 2015-05-06 11:00:04 -04:00
row_test.go gofmt simplifications 2016-04-02 21:54:33 -04:00
row.go upside_down dict row value size accounts for large uvarint's 2016-02-22 11:52:51 -08:00
stats.go moved fields requiring 64-bit alignment to start of struct 2016-03-20 10:38:28 -04:00
upside_down_test.go fix panic on insufficiently sized buffer 2015-10-30 18:25:38 -04:00
upside_down.go fix data race in bleve batch reuse 2016-04-08 15:32:13 -04:00
upside_down.pb.go faster protobufs with gogo 2015-08-12 13:18:23 -04:00
upside_down.proto major change to fields 2014-08-19 08:58:26 -04:00