-
Notifications
You must be signed in to change notification settings - Fork 326
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
[Q] Is it safe to whisper-fill.py while carbon is active and the source file contains datapoints which are preceding those in destination? #330
Comments
IIRC, whisper-fill will copy only absent data, so, it will replace only None's, and not data. And yes, if both go-carbon and whisper-fill use locks it should be honored. I.e. it should be safe to use whisper-fill with go-carbon, and it should not cause data corruption. |
Do you think it even necessary to use the flock as a safeguard in this case? On paper, absent data can only be history which exists in the older file and absent in the new. |
Yes, it is.
No race conditions, it can just corrupt data if both processes will write it. Whisper is not thread safe.
That part I completely didn't understand, sorry. Could you please elaborate what you mean? |
Ah, I got what you mean. Well, I don't know that part of kernel very well, but usually everyone recommends protecting write to the same file from two processes by lock. If you're feeling adventurous and doesn't really care about your data, you can try to not use lock. |
Thanks @deniszh !! |
We're running a Python carbon for years.
Recently we've added go-carbon server.
Both are ingesting same metrics.
Ultimately we want to shut-down the old Python carbon.
Thus we need to migrate history from the old Whisper to new:
While
go-carbon
is still running (we can disable the Python carbon if that's beneficial).Is it safe? I'm afraid maybe not because they have overlapping time periods of ingestion.
If not safe, can we use advisory locking? whisper-fill.py seems to support it, and
go-carbon
provides the following in it's configuration:The text was updated successfully, but these errors were encountered: