Commits on Jan 31, 2018
  1. Fix for issue #1134 clean up dev/lib before run mango tests (#1135)

    jjrodrig authored and eiri committed Jan 31, 2018
    * make javascript, test-cluster-with[out]-quorum and mango tests dependent of devclean target
  2. Fix for issue #603 - Error 500 when creating a db below quorum

    Juanjo authored and janl committed Jan 24, 2018
    Add degrade-cluster option for cluster testing
    Add tests for different cluster conditions with/without quorum
    Add test-cluster-with-quorum and test-cluster-without-quorum tasks
Commits on Jan 29, 2018
  1. Merge pull request #1082 from cloudant/issue-822-all-dbs-info

    iilyak committed Jan 29, 2018
    Introduce new _dbs_info endpoint to get info of a list of databases
Commits on Jan 26, 2018
  1. Make _design_docs to respect query parameters

    jiangphcn authored and davisp committed Jan 15, 2018
    Fixes #1100
  2. Decode destination header for doc copy

    jiangphcn authored and davisp committed Dec 18, 2017
    Fixes #977
  3. Hide Auth information in replication document for reader

    jiangphcn authored and nickva committed Jan 25, 2018
      - don't display credential information for user who
      just wants to check replication status. In basic authentication,
      the credential information is available in header field of doc
Commits on Jan 24, 2018
  1. Remove outdated docker targets and docs (#1109)

    kocolosk committed Jan 24, 2018
    We removed the Dockerfile in 6e57c43 and moved all Docker-related
    materials to apache/couchdb-docker, but we never cleaned up the
    Makefile targets or developer documentation.
Commits on Jan 23, 2018
  1. Make peruser database prefix configurable

    jiangphcn authored and janl committed Dec 15, 2017
    Fixes #876
  2. Merge pull request #1123 from apache/fix-create_delete_database_conti…

    eiri committed Jan 23, 2018
    Set eunit timeout on a whole test object
Commits on Jan 22, 2018
Commits on Jan 18, 2018
  1. Add support for queries in /{db}/_all_docs POST

    jiangphcn authored and wohali committed Nov 30, 2017
    Fixes #820
Commits on Jan 17, 2018
Commits on Jan 16, 2018
  1. Merge pull request #1085 from cloudant/issue-969-update_seq-true

    eiri committed Jan 16, 2018
    Return update_seq and offset when update_seq is true and keys is set
Commits on Jan 15, 2018
  1. Fix couch_peruser_test

    eiri committed Jan 15, 2018
    Fix a random mashup of test object generators
    with normal assertions.
Commits on Jan 14, 2018
  1. Allow override of `-args_file` and `-config` parameters (#1095)

    efine authored and kocolosk committed Jan 14, 2018
    The existing `couchdb` start script hard-codes the arguments to
    `-args_file` and `-config`. Although it is possible to copy this
    script and modify it, or modify it in place, that is less than ideal
    and can lead to all kinds of difficulties.
    This PR adds the following environment variables:
    - `ARGS_FILE`: By default, set to the existing hard-coded value.
    - `SYSCONFIG_FILE`: By default, set to the existing hard-coded value.
    - `COUCHDB_ARGS_FILE`: If non-empty, overrides `ARGS_FILE`.
    - `COUCHDB_SYSCONFIG_FILE`: If non-empty, overrides `SYSCONFIG_FILE`.
    By changing the script to use these environment variables, it makes it easily
    possible to use different settings without tinkering with the pristine
    installed CouchDB environment.
Commits on Jan 12, 2018
  1. Remove warning on `couch_epi_codegen` compile

    eiri committed Jan 12, 2018
    Change runtime choice between `erl_scan:token_info`
    and `erl_scan:line` to compilation conditional one.
    This is getting rid of compilation deprecation warning
    and also should speed up things a bit.
  2. Simplify couch_key_tree test setup

    nickva committed Jan 12, 2018
    Avoid starting 4 applications (config, couch_log, ioq and couch_epi) just to
    handle a call to config:get. Instead just mock the config directly.
    This also speeds up the test suite a bit.
Commits on Jan 9, 2018
  1. fallback to "selector" on empty "partial_filter_selector" (#1098)

    willholley committed Jan 9, 2018
    Mango text indexes historically supported partial indexes
    defined via a "selector" field. This was renamed to
    "partial_filter_selector" in b98de40 but the fallback
    code did not correctly handle the case where
    a "selector" existed alongside a "partial_filter_selector".
    This situation can occur when a the _index endpoint is
    used to create a text index with a "selector". The resulting
    design document contains an empty "partial_filter_selector"
    field *and* the "selector" field that was passed in. The
    previous implementation of the fallback would detect the
    presence of "partial_filter_selector" and use the empty
    value (match all docs) instead of faling back to the
    "selector" field.
    This commit changes the behaviour so that a "selector"
    will be used even if an empty "partial_filter_selector"
    is present. A secondary fix would be to change the index
    creation so that we never use "selector" in the underlying
    index design document, even if it is passed to the _index
Commits on Jan 6, 2018
  1. Return friendly error message when creating user with invalid password (

    jiangphcn authored and rnewson committed Jan 6, 2018
    * Return friendly error message when creating user with invalid password
      - Return friendly error message instead of returning unknown_error
        and function_clause when creating a use with non-string password.
    issue 1051
    * Add check for salt
    issue 1051
Commits on Jan 4, 2018
  1. Merge pull request #1091 from apache/better-mango-test-recreate-function

    eiri committed Jan 4, 2018
    Make sure mango tests's recreate fun creates db
  2. Make sure mango tests's recreate fun creates db

    eiri committed Jan 4, 2018
    Rapid same database deletion/creation is a known
    antipattern prone to a race condition, especially
    on slow VMs.
    This fix modifies mango test's helper function
    used for db recreation to ensure that we are actually
    starting tests when a database created and empty.
  3. Merge pull request #1092 from apache/use-uuid-in-eunit-dbnames

    eiri committed Jan 4, 2018
    Use uuid in tmp db names in unit tests
  4. Use uuid in tmp db names in unit tests

    eiri committed Jan 4, 2018
    This changes naming of temporary eunit databases
    and files from using unique_monotonic_integer to
    couch_uuids:random to remove performance penalty
    and normalize naming across erlang releases.
    Also getting rid of unnecessary inter-types
  5. Merge pull request #1090 from apache/cleanup-on-setup_eunit

    eiri committed Jan 4, 2018
    Cleanup data dirs in eunit_plugin before test run
  6. Cleanup data dirs in eunit_plugin before test run

    eiri committed Jan 4, 2018
    We use `unique_monotonic_integer` to name
    the test databases in unit testing.
    That means that on erlang R > 18 we are always
    creating databases with same names.
    When unit tests crashing or don't properly
    cleaning up on teardown, they are leaving behind
    old database files, son on a next run tests'
    setup fails with `database exists` exception.
    This fix cleans up old database files
    making sure we are always running unit tests
    from same blank state.
Commits on Dec 21, 2017
  1. Merge pull request #1078 from cloudant/issue-832-couch_log-refactor

    iilyak committed Dec 21, 2017
    Refactor couch_log.erl
Commits on Dec 20, 2017
  1. Refactor couch_log

    jiangphcn committed Dec 20, 2017
    issue 832
  2. Fix mango native proc crash (#1067)

    eiri committed Dec 20, 2017
    Don't crash on receiving cast stop
    When soft limit is reached couch_proc_manager
    evicts idle processes by casting on them `stop`
    message. Since mango_native_proc doesn't handle
    this message it results to its crash with
    `invalid_cast` reason.
Commits on Dec 19, 2017
  1. Mango: change catch-all field range priority (#1069)

    willholley committed Dec 19, 2017
    01252f9 introduced a "catch-all" feature to Mango that allowed
    queries to fall back on a full database scan (_all_docs) when
    no valid index was available.
    This worked by creating a special index range representing
    the full database scan.
    For example, a selector:
    { "_id": "foo" }
    would be translated into a field range of:
    [{ "startkey": "foo", "endkey": "foo"}]
    then prepending the catch-all field range, we would have:
    { "startkey": null, "endkey": max_json_value},
    { "startkey": "foo", "endkey": "foo"}
    This set gets passed into
    mango_cursor_view:choose_best_index to determine most selective
    index and field range combination to use. Unfortunately, in
    the event that we have one possible index (all_docs) and multiple
    valid ranges, it just chooses the first range it finds -
    the full index scan in this case.
    This commit makes the catch-all field range the last
    available option, ensuring we use the more selective
    range where available.
Commits on Dec 15, 2017
  1. Fix haproxy stats (#1039)

    redgeoff authored and kocolosk committed Dec 15, 2017
    - `stats scope .` ends up blocking all backends
    - Renaming endpoint from `_stats` to `_haproxy_stats` so that it doesn't collide with CouchDB's `_stats` endpoint
    - Added a commented out stats auth line so that you can easily password protect
  2. Add couch_stats tracking back to couch_log (#1064)

    jiangphcn authored and eiri committed Dec 15, 2017
    issue #832