Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graph 30分钟落盘的原因是什么?v0.1版本graph落盘时间是5分钟 #908

Open
g895653672 opened this issue Oct 30, 2020 · 0 comments

Comments

@g895653672
Copy link

g895653672 commented Oct 30, 2020

sync_disk.go

func syncDisk() {
	time.Sleep(time.Second * g.CACHE_DELAY)   //CACHE_DELAY     = 1800    //s
	ticker := time.NewTicker(time.Millisecond * g.FLUSH_DISK_STEP)
	defer ticker.Stop()
	var idx int = 0

	for {
		select {
		case <-ticker.C:
			idx = idx % store.GraphItems.Size
			FlushRRD(idx, false)
			idx += 1
		case <-Out_done_chan:
			log.Println("cron recv sigout and exit...")
			return
		}
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant