This is an automated email from the ASF dual-hosted git repository.

jaydoane pushed a commit to branch handle-spurious-erlfdb-future
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 7d3cd94e877770214422cfc261b7978b35b948b0
Author: Jay Doane <[email protected]>
AuthorDate: Wed Mar 11 12:32:32 2020 -0700

    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<..>,...},...}},.. [...]
    
    This should handle those errors, and prevent the crashes.
---
 src/couch_expiring_cache/src/couch_expiring_cache_server.erl | 8 ++++++++
 1 file changed, 8 insertions(+)

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 65e742b..99d3864 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}.
 

Reply via email to