couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filipe Manana (JIRA)" <>
Subject [jira] Commented: (COUCHDB-1004) list_to_existing_atom is too restrictive as used by couch_rep
Date Sun, 02 Jan 2011 13:22:45 GMT


Filipe Manana commented on COUCHDB-1004:

I agree. In some cases it's not really an issue.
I would vote to replace our to_existing_atom/1 function in couch_util with something like:

%% @spec to_atom(term(), allow_new())
%% @type allow_new() = boolean()
to_atom(V, false) ->
to_atom(V, true) ->
    V1 = to_list(V),
    catch _:_ ->

> list_to_existing_atom is too restrictive as used by couch_rep
> -------------------------------------------------------------
>                 Key: COUCHDB-1004
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>         Environment: erlang
>            Reporter: Bob Dionne
>            Priority: Minor
> We'd like to additional information to db_info in BigCouch, such as the Q and N constants
for a given database. This causes replication to fail when replicating from BigCouch to CouchDB
due to the use of list_to_existing_atom in couch_rep:dbinfo(...
> The claim is that list_to_atom pollutes the atoms table, however superficial testing
indicates this is not the case, list_to_atom when called repeatedly seems to work fine. If
this is true then consider reverting list_to_existing_atom back to list_to_atom.

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

View raw message