firestorm avoid extra goroutine, similar to upside_down
This commit is contained in:
parent
fbd0e7bfe9
commit
8b980bd2ef
@ -146,7 +146,7 @@ func (f *Firestorm) Update(doc *document.Document) (err error) {
|
|||||||
aw := index.NewAnalysisWork(f, doc, resultChan)
|
aw := index.NewAnalysisWork(f, doc, resultChan)
|
||||||
|
|
||||||
// put the work on the queue
|
// put the work on the queue
|
||||||
go f.analysisQueue.Queue(aw)
|
f.analysisQueue.Queue(aw)
|
||||||
|
|
||||||
// wait for the result
|
// wait for the result
|
||||||
result := <-resultChan
|
result := <-resultChan
|
||||||
|
@ -29,7 +29,7 @@ import (
|
|||||||
const Name = "upside_down"
|
const Name = "upside_down"
|
||||||
|
|
||||||
// RowBufferSize should ideally this is sized to be the smallest
|
// RowBufferSize should ideally this is sized to be the smallest
|
||||||
// size that can cotain an index row key and its corresponding
|
// size that can contain an index row key and its corresponding
|
||||||
// value. It is not a limit, if need be a larger buffer is
|
// value. It is not a limit, if need be a larger buffer is
|
||||||
// allocated, but performance will be more optimal if *most*
|
// allocated, but performance will be more optimal if *most*
|
||||||
// rows fit this size.
|
// rows fit this size.
|
||||||
@ -344,6 +344,7 @@ func (udc *UpsideDownCouch) Update(doc *document.Document) (err error) {
|
|||||||
analysisStart := time.Now()
|
analysisStart := time.Now()
|
||||||
resultChan := make(chan *index.AnalysisResult)
|
resultChan := make(chan *index.AnalysisResult)
|
||||||
aw := index.NewAnalysisWork(udc, doc, resultChan)
|
aw := index.NewAnalysisWork(udc, doc, resultChan)
|
||||||
|
|
||||||
// put the work on the queue
|
// put the work on the queue
|
||||||
udc.analysisQueue.Queue(aw)
|
udc.analysisQueue.Queue(aw)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user