Commit 33b7d636 by zhaoyanchao

内存问题是机器上的suggest监控任务导致,与此无关

parent f3d1cd5f
......@@ -100,6 +100,9 @@ func main() {
Workers(50).
BulkActions(2000).
FlushInterval(500*time.Millisecond).
Backoff( elastic.NewExponentialBackoff(
time.Duration(10000)*time.Millisecond,
time.Duration(100000)*time.Millisecond) ).
After(after).
Do(context.Background())
if err != nil { log.Print(err.Error()) }
......@@ -120,18 +123,12 @@ func main() {
return
}
for i:= 0; i < count; i = i + LEVEL_SIZE {
for j := 0; j < LEVEL_SIZE; j++ {
log.Printf("add to wait %d", i+j)
for j := 0; j < count; j++ {
wg.Add(1)
go queryIndex( (i + j ) *TABLE_SPLIT_STEP_SIZE, datawareDB, bulkProcessor, &wg)
go queryIndex( j *TABLE_SPLIT_STEP_SIZE, datawareDB, bulkProcessor, &wg)
}
wg.Wait()
log.Println("wait finish ")
}
wg.Wait()
fmt.Println("all thread has read maps")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment