couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [couchdb] branch master updated: Fix cluster upgrades when deploying ddoc_cache
Date Wed, 11 Oct 2017 19:40:15 GMT
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch master
in repository

The following commit(s) were added to refs/heads/master by this push:
     new 703e6c5  Fix cluster upgrades when deploying ddoc_cache
703e6c5 is described below

commit 703e6c5c860276c40b960ed1c5d6be6b6086530b
Author: Paul J. Davis <>
AuthorDate: Tue Oct 10 12:28:55 2017 -0500

    Fix cluster upgrades when deploying ddoc_cache
    As it turns out I made a bit of a mistake when I forgot that the old
    ddoc_cache implementation had an ets_lru process registered as
    ddoc_cache_lru. These cast messages were causing that process to crash.
    If a cluster had enough design document activity and enough nodes this
    would cause nodes with the old ddoc_cache implementation to reboot the
    entire VM. This was a cascading failure due to the ets_lru process
    restarting frequently enough that it brought down the entire ddoc_cache
 src/ddoc_cache/src/ddoc_cache_lru.erl | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/ddoc_cache/src/ddoc_cache_lru.erl b/src/ddoc_cache/src/ddoc_cache_lru.erl
index 810cbef..e94934d 100644
--- a/src/ddoc_cache/src/ddoc_cache_lru.erl
+++ b/src/ddoc_cache/src/ddoc_cache_lru.erl
@@ -39,6 +39,9 @@
+-define(OPENER, ddoc_cache_opener).
 -record(st, {
     pids, % pid -> key
     dbs, % dbname -> docid -> key -> pid
@@ -143,11 +146,11 @@ handle_call(Msg, _From, St) ->
 handle_cast({evict, DbName}, St) ->
-    gen_server:abcast(mem3:nodes(), ?MODULE, {do_evict, DbName}),
+    gen_server:abcast(mem3:nodes(), ?OPENER, {do_evict, DbName}),
     {noreply, St};
 handle_cast({refresh, DbName, DDocIds}, St) ->
-    gen_server:abcast(mem3:nodes(), ?MODULE, {do_refresh, DbName, DDocIds}),
+    gen_server:abcast(mem3:nodes(), ?OPENER, {do_evict, DbName, DDocIds}),
     {noreply, St};
 handle_cast({do_evict, DbName}, St) ->

To stop receiving notification emails like this one, please contact
['"" <>'].

View raw message