-
Notifications
You must be signed in to change notification settings - Fork 166
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
Table ownership differences can leave folsom inconsistent #30
Comments
Steve's post seems like a good setup and makes sense to me. Yet another item for the folsom to do list. I'll have some time soon if you would like to collaborate on this and the race condition issues. |
Yes. That would be good. When we get 1.2 out I've got some time to work on folsom. |
At zotonic we recently ran into this issue too. Indeed all tables of folsom should be owned by one process. Automatic bookkeeping of metrics can be implemented by monitoring the process which creates the new metric. When that process dies folsom can do the bookkeeping without any problem. The crash we get from time to time.
|
Anyone have an interest in tackling this one? |
Just ran into this one myself! think I'll hold off using histories for now. I'm going to just stick the few things I wanted it for in a queue in a gen_server, but not ideal... Looking at the table viewer, it seems the Tids are changing, but the histories index isn't getting updated at the same time. |
Test message, ignore me. |
Folsom has moved, please resubmit your issue at https://github.com/folsom-project Thanks! |
A history will survive a process crash without incident since it is owned by folsom_sup. This will leave the rest of the folsom ets tables in a consistent state (all are owned by folsom_sup).
Quick and dirty fix for boundary/folsom#30
The
history
metric creates a new ets table when a new metric is created. The owner of that table is the process that calledfolsom_metrics:new_history(Name)
. However, the folsom table is owned by the folsom supervisor. In the case that the process that owns the history exits the history metric table itself crashes, but the entry in the folsom metrics table remains.Folsom is then in an inconsistent state. Using
folsom_metrics_histogram_ets
to create (and therefore own) the table would probably help. Ideally folsom should have a single process that owns all ets tables so that there is consistency (a crash takes them all away, they're insulated from calling process crashes.) Better still would be to implement something like the strategy in this article http://steve.vinoski.net/blog/2011/03/23/dont-lose-your-ets-tables/I'm raising this as a request for comments before I factor such a strategy into folsom. Opinions?
The text was updated successfully, but these errors were encountered: