Description
Couple of FTS customers observed the following crash while using queries like facets or custom field based sort.
And the crashes were observed pretty consistently for them.
fatal error: concurrent map iteration and map writefatal error: concurrent map iteration and map write
goroutine 37690209 [running]:runtime.throw(0xdf8901, 0x26) /home/couchbase/.cbdepscache/exploded/x86_64/go-1.9.6/go/src/runtime/panic.go:605 +0x95 fp=0xc471397d30 sp=0xc471397d10 pc=0x42d885runtime.mapiternext(0xc471397e60) /home/couchbase/.cbdepscache/exploded/x86_64/go-1.9.6/go/src/runtime/hashmap.go:778 +0x6f1 fp=0xc471397dc8 sp=0xc471397d30 pc=0x40ba91github.com/blevesearch/bleve/index/scorch.(*cachedDocs).updateSizeLOCKED(0xc4a7e2ce60) godeps/src/github.com/blevesearch/bleve/index/scorch/snapshot_segment.go:234 +0x132 fp=0xc471397ed0 sp=0xc471397dc8 pc=0x60e872github.com/blevesearch/bleve/index/scorch.(*cachedDocs).prepareFields(0xc4a7e2ce60, 0xc4c2743c60, 0x2, 0x2, 0xc4ae472e80, 0xc45d2a5540, 0x2) godeps/src/github.com/blevesearch/bleve/index/scorch/snapshot_segment.go:206 +0x395 fp=0xc471397f60 sp=0xc471397ed0 pc=0x60e585github.com/blevesearch/bleve/index/scorch.(*IndexSnapshot).documentVisitFieldTermsOnSegment.func1(0xc4ae472e80, 0xc4c2743c60, 0x2, 0x2, 0xc486117920) godeps/src/github.com/blevesearch/bleve/index/scorch/snapshot_index.go:564 +0x56 fp=0xc471397fb8 sp=0xc471397f60 pc=0x611726runtime.goexit()
This issue is already fixed in MH/ bleve master and needs to be propagated to Alice releases.
And this would be very useful for customers, else they had to wait until the MH release which has a wait period.