couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randall Leeds (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COUCHDB-863) be quiet about dropping invalid references
Date Fri, 20 Aug 2010 21:01:16 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Randall Leeds updated COUCHDB-863:
----------------------------------

    Attachment: 0001-die-cleanly-when-local-replication-db-goes-away.patch

Spot on, Damien. We probably shouldn't mask strange interdependencies we create and we should
instead treat them with respect and care. Here's a patch that shuts the replicator down cleanly
when a local db goes away and also makes sure that if it get a spurious monitor message it
complains loudly as it's murdered.

> be quiet about dropping invalid references
> ------------------------------------------
>
>                 Key: COUCHDB-863
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-863
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core
>    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. 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) ->

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message