0
0
bleve/index/firestorm
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 gofmt simplifications 2016-04-02 21:54:33 -04:00
analysis.go fix typos 2016-04-02 21:59:30 -04:00
benchmark_boltdb_test.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
benchmark_common_test.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
benchmark_cznicb_test.go add missing build tag guarding cznicb benchmark 2016-02-09 15:57:35 -05:00
benchmark_forestdb_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
benchmark_goleveldb_test.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
benchmark_gorocksdb_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
benchmark_gtreap_test.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
benchmark_leveldb_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
benchmark_null_test.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
comp.go firestorm gtreap lookup once per snapshot docID 2016-01-06 16:46:15 -08:00
dict_updater_test.go gofmt simplifications 2016-04-02 21:54:33 -04:00
dict_updater.go fix ineffectual assignments 2016-04-02 22:42:56 -04:00
dictionary_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
dictionary.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
dump_test.go gofmt simplifications 2016-04-02 21:54:33 -04:00
dump.go fix issues identified by errcheck 2015-11-24 14:32:33 -05:00
field_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
field.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
firestorm_rows.pb.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
firestorm_rows.proto made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
firestorm_test.go fix issues identified by errcheck 2015-11-24 14:32:33 -05:00
firestorm.go fix data race in bleve batch reuse 2016-04-08 15:32:13 -04:00
firestorm.md firestorm.md markdown fixes 2016-01-01 09:57:59 -08:00
garbage_test.go firestore: reproducer for division by zero on GC 2015-12-25 11:33:46 +07:00
garbage.go firestorm use the ParseKey() funcs to avoid unneeded value parsing 2016-01-06 15:53:12 -08:00
internal_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
internal.go correctly prefix internal rows with 'i' and print them in debug 2015-11-30 10:17:15 -05:00
lookup_test.go firestorm lookuper notified via batch 2016-01-02 12:21:24 -08:00
lookup.go additional firestorm fixes for 64-bit alignment 2016-03-20 11:02:13 -04:00
merge_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
merge.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
reader_dict_test.go fix issues identified by errcheck 2015-11-24 14:32:33 -05:00
reader_dict.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
reader_docs_test.go fix issues identified by errcheck 2015-11-24 14:32:33 -05:00
reader_docs.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
reader_terms_test.go fix issues identified by errcheck 2015-11-24 14:32:33 -05:00
reader_terms.go add term search stats 2016-03-05 07:50:25 -05:00
reader.go Implemented boolean field support 2016-01-11 17:18:03 -08:00
stats.go moved fields requiring 64-bit alignment to start of struct 2016-03-20 10:38:28 -04:00
stored_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
stored.go firestorm StoredRow.ParseKey() func 2016-01-06 15:46:26 -08:00
termfreq_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
termfreq.go firestorm TermFreqRow.ParseKey() func 2016-01-06 15:32:09 -08:00
util.go fix ineffectual assignments 2016-04-02 22:42:56 -04:00
version_test.go made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00
version.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
warmup_test.go Merge branch 'master' into firestorm 2015-10-28 11:26:01 -04:00
warmup.go additional firestorm fixes for 64-bit alignment 2016-03-20 11:02:13 -04:00