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

Protect against data loss by OS crash #591

Closed
beorn7 opened this Issue Mar 11, 2015 · 2 comments

Comments

Projects
None yet
1 participant
@beorn7
Copy link
Member

beorn7 commented Mar 11, 2015

Inspired by @matthiasr and in the spirit of #590 , I was thinking about sync'ing series files, too.

In general, that would just kill performance, but with the newly designed persistence strategy #589 , the number of series file operations is reduced. We could at least offer a flag to sync after each write to a series file. (And the order should be sync (optional) - close - rename, not rename - close, as it is now.) One idea of mine (as a third option for the flag): An adaptive strategy, sync as long as the persist queue is mostly empty. once a certain watermark is reached, switch to non-sync'd writes. (Similar to what we do already with checkpointing.)

Independent from the above, we could/should just sync everything upon shutdown (man 2 sync). Not sure if there is a platform indpendent way to do that with Go.

@beorn7 beorn7 added the enhancement label Mar 11, 2015

@beorn7 beorn7 self-assigned this Mar 11, 2015

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Mar 19, 2015

This is implemented now. I couldn't find a good way for an equivalent of running the sync command from within Go. So I leave it out for now. In normal situations, everything will by synced anyway.

@beorn7 beorn7 closed this Mar 19, 2015

simonpasquier pushed a commit to simonpasquier/prometheus that referenced this issue Oct 12, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.