From 8b980bd2efa5f8239c66b89e4e7c5a97c5cd8ad3 Mon Sep 17 00:00:00 2001 From: Steve Yen Date: Thu, 7 Jan 2016 00:43:27 -0800 Subject: [PATCH] firestorm avoid extra goroutine, similar to upside_down --- index/firestorm/firestorm.go | 2 +- index/upside_down/upside_down.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index/firestorm/firestorm.go b/index/firestorm/firestorm.go index c76b445f..ea721334 100644 --- a/index/firestorm/firestorm.go +++ b/index/firestorm/firestorm.go @@ -146,7 +146,7 @@ func (f *Firestorm) Update(doc *document.Document) (err error) { aw := index.NewAnalysisWork(f, doc, resultChan) // put the work on the queue - go f.analysisQueue.Queue(aw) + f.analysisQueue.Queue(aw) // wait for the result result := <-resultChan diff --git a/index/upside_down/upside_down.go b/index/upside_down/upside_down.go index 03b660e1..069871c0 100644 --- a/index/upside_down/upside_down.go +++ b/index/upside_down/upside_down.go @@ -29,7 +29,7 @@ import ( const Name = "upside_down" // 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 // allocated, but performance will be more optimal if *most* // rows fit this size. @@ -344,6 +344,7 @@ func (udc *UpsideDownCouch) Update(doc *document.Document) (err error) { analysisStart := time.Now() resultChan := make(chan *index.AnalysisResult) aw := index.NewAnalysisWork(udc, doc, resultChan) + // put the work on the queue udc.analysisQueue.Queue(aw)