未验证 提交 7e932637 编写于 作者: A Arthur Silva Sens 提交者: GitHub

Reload tsdb blocks every minute (#8340)

* Reload tsdb blocks every minute
Signed-off-by: NArthurSens <arthursens2005@gmail.com>

* Proteced tsdb with mutex locks
Signed-off-by: NArthurSens <arthursens2005@gmail.com>
上级 cd1dafc2
......@@ -732,6 +732,12 @@ func (db *DB) run() {
select {
case <-time.After(1 * time.Minute):
db.cmtx.Lock()
if err := db.reloadBlocks(); err != nil {
level.Error(db.logger).Log("msg", "reloadBlocks", "err", err)
}
db.cmtx.Unlock()
select {
case db.compactc <- struct{}{}:
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册