Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-2561

Make config API consistent

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • Database Core
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              iilyak Ilya Khlopotov
              iilyak Ilya Khlopotov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: