couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [02/50] folsom commit: updated refs/heads/import-master to 4824aec
Date Thu, 31 Jul 2014 21:24:50 GMT
Change the order of delete cascade for `spiral'

A crash of `folsom_metrics_histogram_ets` leaves spirals broken.
The spiral ets table goes away, so it can not be updated, nor
can it be deleted and re-created due to the delete order of
metric table, spiral table, folsom table. Have changed the order
to be more like that of `histogram` so deletes will succeed in
the event of a missing `spiral` ets table.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-folsom/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-folsom/commit/dbcabd9d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-folsom/tree/dbcabd9d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-folsom/diff/dbcabd9d

Branch: refs/heads/import-master
Commit: dbcabd9d37a896526c0133b3e4df32e4879380a1
Parents: 3322e75
Author: Russell Brown <russell.brown@mac.com>
Authored: Mon Mar 18 08:46:45 2013 +0000
Committer: Russell Brown <russell.brown@mac.com>
Committed: Mon Mar 18 08:53:52 2013 +0000

----------------------------------------------------------------------
 src/folsom_ets.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-folsom/blob/dbcabd9d/src/folsom_ets.erl
----------------------------------------------------------------------
diff --git a/src/folsom_ets.erl b/src/folsom_ets.erl
index edd2f36..8a223c5 100644
--- a/src/folsom_ets.erl
+++ b/src/folsom_ets.erl
@@ -300,9 +300,9 @@ delete_metric(Name, meter_reader) ->
 delete_metric(Name, spiral) ->
     #spiral{tid=Tid, server=Pid} = folsom_metrics_spiral:get_value(Name),
     folsom_sample_slide_server:stop(Pid),
-    true = ets:delete(Tid),
     ets:delete(?SPIRAL_TABLE, Name),
     ets:delete(?FOLSOM_TABLE, Name),
+    ets:delete(Tid),
     ok.
 
 delete_histogram(Name, #histogram{type = uniform, sample = #uniform{reservoir = Reservoir}})
->


Mime
View raw message