You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Russell Branca (JIRA)" <ji...@apache.org> on 2015/02/26 20:44:04 UTC

[jira] [Created] (COUCHDB-2629) Hide internal config details from other applications

Russell Branca created COUCHDB-2629:
---------------------------------------

             Summary: Hide internal config details from other applications
                 Key: COUCHDB-2629
                 URL: https://issues.apache.org/jira/browse/COUCHDB-2629
             Project: CouchDB
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: Database Core
            Reporter: Russell Branca


Throughout the code base we do things like `config:get("couch_httpd_auth", "authentication_db", "_users")` which exposes internal details to other applications that don't need to be aware of the particulars. This duplicates code unnecessarily and causes problematic typos to go unnoticed like in COUCHDB-2628.

One possible approach that I'm a fan of is to go into the application responsible for relevant config value, and add a function to hide the details. For instance, this is done in `cassim_metadata_cache:metadata_db`: https://github.com/apache/couchdb-cassim/blob/windsor-merge/src/cassim_metadata_cache.erl#L58-L59



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