mirror of
https://github.com/gotoeasy/glogcenter.git
synced 2025-12-24 12:15:31 +08:00
确保索引顺序,取消多协程创建索引
This commit is contained in:
@@ -136,10 +136,11 @@ func (s *LogDataStorage) readyGo() {
|
||||
}
|
||||
s.saveLogData(data) // 保存日志数据
|
||||
default:
|
||||
// 空时再生成索引,多协程跑起来加快速度,再来一次单条同步用于判断,有空则生成直到全部完成
|
||||
for i := 0; i < conf.GetGoMaxProcessIdx()-1; i++ {
|
||||
go s.createInvertedIndex() // 多协程跑起来加快速度
|
||||
}
|
||||
// 【确保索引顺序,取消多协程创建索引】
|
||||
// // 空时再生成索引,多协程跑起来加快速度,再来一次单条同步用于判断,有空则生成直到全部完成
|
||||
// for i := 0; i < conf.GetGoMaxProcessIdx()-1; i++ {
|
||||
// go s.createInvertedIndex() // 多协程跑起来加快速度
|
||||
// }
|
||||
n := s.createInvertedIndex() // 生成反向索引
|
||||
|
||||
// 索引生成完成后,等待接收保存日志
|
||||
|
||||
Reference in New Issue
Block a user