couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2561) Make config API consistent
Date Wed, 04 Feb 2015 15:50:36 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-2561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14305311#comment-14305311
] 

ASF subversion and git services commented on COUCHDB-2561:
----------------------------------------------------------

Commit e151ae430454121db74a051b61bd23f582bcc39b in couchdb-config's branch refs/heads/master
from [~iilyak]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-config.git;h=e151ae4 ]

Callback driven API for config_listener behaviour

This implementaion replaces a mix of message driven and callback driven
API for config_listener. In particular it replaces gen_event_EXIT
message with a call to Module:handle_config_stop(Pid, Reason, State).
This fixes the problem of using config:listen_for_changes in supervisor
context where there is no way to handle arbitrary messages.

COUCHDB-2561


> Make config API consistent
> --------------------------
>
>                 Key: COUCHDB-2561
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2561
>             Project: CouchDB
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Database Core
>            Reporter: ILYA
>            Assignee: ILYA
>
> There are 2 problems with API which need to be fixed.
> 1) Mix of message driven and callback driven
> API for config_listener is hard to use. 
> In particular there is a gen_event_EXIT
> message which is sent to the process which called config:listen_for_changes.
> This makes API unsuitable for use in the context of a supervisor. Since supervisors do
not support handling of arbitrary messages. This message also causing problems for test suite.
> This message could be substituted with 
> a call to Module:handle_config_stop(Pid, Reason, State).
> 2) Since for section, key, value we only support lists but not arbitrary terms. More
strick guards are needed to make sure the caller of the API fails with badarg 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message