From 2e119bc5ddb41f9f95af567ba4c6fd02933766a6 Mon Sep 17 00:00:00 2001 From: Filipe David Borba Manana Date: Thu, 23 Jun 2011 09:46:46 +0000 Subject: Merged revision 1104168 from trunk Add infinity timeout to couch_ref_counter calls After compacting a very large database, the updater calls the couch_db gen_server with a db record that contains a new ref counter. The couch_db gen_server calls drop on the old ref counter and calls add on the new ref counter. However since the system is busy deleting the old db file or garbage collecting, one of the ref counter calls times out, causing couch_db's terminate to invoked and terminate calls shutdown on the updater. However the updater is waiting for the call it made to couch_db to complete, which can't complete since it's waiting for the updater. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1138799 13f79535-47bb-0310-9956-ffa450edef68 --- apps/couch/src/couch_ref_counter.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/couch/src/couch_ref_counter.erl b/apps/couch/src/couch_ref_counter.erl index 5a111ab6..a774f469 100644 --- a/apps/couch/src/couch_ref_counter.erl +++ b/apps/couch/src/couch_ref_counter.erl @@ -24,14 +24,14 @@ drop(RefCounterPid) -> drop(RefCounterPid, self()). drop(RefCounterPid, Pid) -> - gen_server:call(RefCounterPid, {drop, Pid}). + gen_server:call(RefCounterPid, {drop, Pid}, infinity). add(RefCounterPid) -> add(RefCounterPid, self()). add(RefCounterPid, Pid) -> - gen_server:call(RefCounterPid, {add, Pid}). + gen_server:call(RefCounterPid, {add, Pid}, infinity). count(RefCounterPid) -> gen_server:call(RefCounterPid, count). -- cgit v1.2.3