summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Doane <jaydoane@apache.org>2020-03-11 12:32:32 -0700
committerJay Doane <jay.s.doane@gmail.com>2020-03-11 12:39:14 -0700
commitbf989eb281ae97052c7b555d68f93f46cf42aa19 (patch)
treeb5834f01a4cb9953f09b60a6a727fbd520731a7b
parent258ec665f5f1bcadcd8b2e87deaef72960a9684d (diff)
downloadcouchdb-bf989eb281ae97052c7b555d68f93f46cf42aa19.tar.gz
Handle spurious erlfdb future
Seeing log errors like the following: CRASH REPORT Process epep_fdb_decision_cache (<0.633.0>) with 0 neighbors exited with reason: {bad_info,{#Ref<0.2506675824.3127640065.49278>,ready}} at gen_server:handle_common_reply/8(line:726) <= proc_lib:init_p_do_apply/3(line:247); initial_call: {couch_expiring_cache_server,init,['Argument__1']}, ancestors: [epep_sup,<0.596.0>], message_queue_len: 0, messages: [], links: [<0.614.0>], dictionary: [{rand_seed,{#{bits => 58,jump => #Fun<rand.8.15449617>,next => #Fun<..>,...},...}},...], trap_exit: false, status: running, heap_size: 2586, stack_size: 27, reductions: 7493102 This should handle those errors, and prevent the crashes.
-rw-r--r--src/couch_expiring_cache/src/couch_expiring_cache_server.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/couch_expiring_cache/src/couch_expiring_cache_server.erl b/src/couch_expiring_cache/src/couch_expiring_cache_server.erl
index 65e742bba..99d386485 100644
--- a/src/couch_expiring_cache/src/couch_expiring_cache_server.erl
+++ b/src/couch_expiring_cache/src/couch_expiring_cache_server.erl
@@ -92,6 +92,14 @@ handle_info(remove_expired, St) ->
largest_elapsed := max(Elapsed, LargestElapsed),
lag := NowTS - OldestTS}};
+
+handle_info({Ref, ready}, St) when is_reference(Ref) ->
+ % Prevent crashing server and application
+ LogMsg = "~p : spurious erlfdb future ready message ~p",
+ couch_log:error(LogMsg, [?MODULE, Ref]),
+ {noreply, St};
+
+
handle_info(Msg, St) ->
{stop, {bad_info, Msg}, St}.