diff options
author | Adam Kocoloski <adam@cloudant.com> | 2010-07-02 10:23:56 -0400 |
---|---|---|
committer | Adam Kocoloski <adam@cloudant.com> | 2010-08-12 01:23:45 -0400 |
commit | 7de28cb172b47cd33acf17527689126784e1c42e (patch) | |
tree | f33f43e7ab1f0c008497a599b078ca10b04c664e /src/mem3_cache.erl | |
parent | 56bdbc73f05e5450ff9c36f8e369f2399d113641 (diff) |
restart mem3_cache if ets table errors out
Diffstat (limited to 'src/mem3_cache.erl')
-rw-r--r-- | src/mem3_cache.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mem3_cache.erl b/src/mem3_cache.erl index 1d1bbe9b..38cc57ef 100644 --- a/src/mem3_cache.erl +++ b/src/mem3_cache.erl @@ -23,6 +23,10 @@ handle_call(_Call, _From, State) -> handle_cast(_Msg, State) -> {noreply, State}. +handle_info({'DOWN', _, _, Pid, {badarg, [{ets,delete,[partitions,_]}|_]}}, + #state{changes_pid=Pid} = State) -> + % fatal error, somebody deleted our ets table + {stop, ets_table_error, State}; handle_info({'DOWN', _, _, Pid, Reason}, #state{changes_pid=Pid} = State) -> ?LOG_INFO("~p changes listener died ~p", [?MODULE, Reason]), Seq = case Reason of {seq, EndSeq} -> EndSeq; _ -> 0 end, |