Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 89692 invoked from network); 20 Aug 2010 21:03:56 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Aug 2010 21:03:56 -0000 Received: (qmail 81769 invoked by uid 500); 20 Aug 2010 21:03:56 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 81704 invoked by uid 500); 20 Aug 2010 21:03:55 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 81696 invoked by uid 99); 20 Aug 2010 21:03:55 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Aug 2010 21:03:55 +0000 X-ASF-Spam-Status: No, hits=-1996.4 required=10.0 tests=ALL_TRUSTED,FS_REPLICA X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Aug 2010 21:03:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o7KL3GcX002262 for ; Fri, 20 Aug 2010 21:03:16 GMT Message-ID: <10590525.477511282338196351.JavaMail.jira@thor> Date: Fri, 20 Aug 2010 17:03:16 -0400 (EDT) From: "Randall Leeds (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Updated: (COUCHDB-863) error log noise when a DELETE kills a replication In-Reply-To: <30729543.463441282289116085.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Randall Leeds updated COUCHDB-863: ---------------------------------- Summary: error log noise when a DELETE kills a replication (was: be quiet about dropping invalid references) Description: couch_ref_counter:drop will complain, dying with noproc, if the reference counter does not exist. couch_rep listens for the 'DOWN' message but then tries to terminate, closing both source and target dbs. If either one was the source of the 'DOWN' message because it was deleted, this causes loud complaints in the log and gen_server exits. We can do this more cleanly. was: couch_ref_counter:drop will complain, dying with noproc, if the reference counter does not exist. Since dropping a reference to a non-existent process isn't exactly an error I think we should squelch this one. I hate log noise and I've noticed this pop up in the logs a bunch, especially running the test suite. Extra noise doesn't make debugging easier and it could confuse people trying to solve real problems. Trivial, trivial patch unless I'm missing something really silly. I'll save everyone the extra emails from JIRA and just paste it here. diff --git a/src/couchdb/couch_ref_counter.erl b/src/couchdb/couch_ref_counter.erl index 5a111ab..1edc474 100644 --- a/src/couchdb/couch_ref_counter.erl +++ b/src/couchdb/couch_ref_counter.erl @@ -24,7 +24,9 @@ drop(RefCounterPid) -> drop(RefCounterPid, self()). drop(RefCounterPid, Pid) -> - gen_server:call(RefCounterPid, {drop, Pid}). + try gen_server:call(RefCounterPid, {drop, Pid}) + catch exit:{noproc, _} -> ok + end. add(RefCounterPid) -> Component/s: Replication (was: Database Core) > error log noise when a DELETE kills a replication > ------------------------------------------------- > > Key: COUCHDB-863 > URL: https://issues.apache.org/jira/browse/COUCHDB-863 > Project: CouchDB > Issue Type: Improvement > Components: Replication > Affects Versions: 1.0.1 > Reporter: Randall Leeds > Priority: Trivial > Attachments: 0001-die-cleanly-when-local-replication-db-goes-away.patch > > > couch_ref_counter:drop will complain, dying with noproc, if the reference counter does not exist. > couch_rep listens for the 'DOWN' message but then tries to terminate, closing both source and target dbs. If either one was the source of the 'DOWN' message because it was deleted, this causes loud complaints in the log and gen_server exits. We can do this more cleanly. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.