| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
The underlying clustered _all_docs call can cause significant extra load
during compaction.
|
|
|
|
|
| |
This adds an API call for looking up a single design doc regardless of
whether the database is clustered or not.
|
|
|
|
| |
* Move CouchTestCase to separate file
* Move setup context functions to separate module
|
|
|
| |
This PR adds Credo as the static code analysis tool of choice for the Elixir test suite.
|
|
|
|
|
| |
The Makefile target builds a python3 venv at .venv and installs
black if possible. Since black is Python 3.6 and up only, we
skip the check on systems with an older Python 3.x.
|
|
|
|
|
| |
This avoids needlessly making cross-cluster fabric:update_docs(Db, [], Opts)
calls.
|
|\
| |
| | |
Ignore clang compile commands database file
|
|/
|
|
|
| |
New rebar leaves behind a clang compile commands database file
after compiling the ports.
|
|\
| |
| | |
Move tests to suite
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
dev/run: do not create needless dev/data/ dir
|
| |\
| |/
|/| |
|
| |
| |
| | |
Use devclean on elixir target for consistency of Makefile
|
|/ |
|
|\
| |
| | |
Bump fauxton, docs, version to 2.3.0
|
|/ |
|
| |
|
|
|
|
|
|
|
|
| |
The configuration of query servers is done via environment variables.
Calling os:getenv every time we need a new query process is expensive.
Instead we extact all configured query servers from the environemt on
`couch_proc_manager` startup and cache them in ets table.
fixes #1772
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the compaction daemon looked for design docs in each shard file.
This worked well for versions < 2.x, however, for clustered databases design
documents will only be found in their respective shards based on the document
id hashing algorithm. This meant that in a default setup of Q=8 only the views
of one shard range, where the _design document lives, would be compacted.
The fix for this issue is to use fabric to retrive all the design documents for
clustered database.
Issue #1579
|
| |
|
| |
|
|\
| |
| | |
Check code format before running elixir test suite
|
| |\
| |/
|/| |
|
|\ \
| | |
| | |
| | | |
* Switch scripts to python3
* Update mango test harness to use venv
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before we were ignoring venv setup in the Makefile, so update the test runner
to use that instead of pestering developers to install those dependencies by
hand.
Issue #1632
|
|/ /
| |
| |
| |
| |
| | |
Ran 2to3 and fixed a few deprecated warnings
Issue #1632
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Force couch_replicator_auth_session plugin to refresh the session periodically.
Normally it is not needed as the session would be refreshed when requests start
failing with a 401 (authentication) or 403 (authorization) errors. In some
cases when anonymous writes are allowed to the database and a VDU function is
used to forbid writes based on the authenticated in username, requests with an
expired session cookie will not fail with a 401 and the session will not be
refreshed.
To fix the issue using these two approaches:
1. Use cookie's max-age expiry time to schedule a refresh. To ensure that time
is provided in the cookie, switch the the option to enable it by default. This
handles the issue for endpoints which are updated with this commit.
2. For endpoints which do not put a max-age time in the cookie, use a value
that's less than CouchDB's default auth timeout. If users changed their
auth timeout value, and use VDUs in the pattern described above, and don't
update their endpoints to version which sends max-age by default, they could
adjust `[replicator] session_refresh_interval_sec` to their auth timeout minus
some small delay.
Of course refresh based on auth/authz failures should still works as before.
Fixes #1607
|
| |
|
|\
| |
| | |
Fix couch_epi typespec for data provider
|
|/
|
|
|
|
|
|
|
|
| |
There were few problems:
- `module` was renamed into `static_module`
- https://github.com/apache/couchdb/commit/0fefc859eb9c18120064317da61a30adaeac5f92#diff-d9e3e3c91d4866fe966666619bda7991
- `callback_module` was added
- https://github.com/apache/couchdb/commit/cf65280466499d652cff1171a2039af49c5677e8#diff-d9e3e3c91d4866fe966666619bda7991
- data provider specification can include options
- https://github.com/apache/couchdb/blob/master/src/couch_epi/src/couch_epi_plugin.erl#L143
|
|\
| |
| | |
Do not use [] in feature_flags configuration
|
| | |
|
|/
|
|
|
|
|
|
| |
[] characters are fobidden in configuration keys for security reason.
Use list without [] to configure flags. Example configuration:
[feature_flags]
foo,bar,baz||test* = true
|
|
|
| |
Closes #1746
|
|\
| |
| |
| |
| | |
cloudant/84736-handle-db-deletion-in-load_validation_funs
handle db deletion in load validation funs
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously there were quite a few problems with load_validation_funs
in the case when clustered database is deleted.
- the calls to load_validation_funs were failing with `internal_server` error [1]
- the deleted database stayed opened because:
- the caller of the load_validation_funs (update_doc) stayed alive
- the main_pid of the deleted database wasn't killed either
- there was an infinite loop in ddoc_cache_entry trying to recover ddoc from deleted database
The solution is:
- do not call `recover` for deleted database
- close `main_pid`
- use `erlang:error` to crash the caller
[1] - The stack trace was:
```
{database_does_not_exist,[
{mem3_shards,load_shards_from_db,"bailey/meta",[
{file,"src/mem3_shards.erl"},{line,394}]},
{mem3_shards,load_shards_from_disk,1,[
{file,"src/mem3_shards.erl"},{line,369}]},
{mem3_shards,for_db,2,[
{file,"src/mem3_shards.erl"},{line,54}]},
{fabric_view_all_docs,go,5,[
{file,"src/fabric_view_all_docs.erl"},{line,24}]},
{ddoc_cache_entry_validation_funs,recover,1,[
{file,"src/ddoc_cache_entry_validation_funs.erl"},{line,33}]},
{ddoc_cache_entry,do_open,1,[
{file,"src/ddoc_cache_entry.erl"},{line,294}]}]}
```
|
|\
| |
| | |
Fix total_rows value for queries on `_design_docs` handler
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This adds a new fabric provider for getting a counter for design docs
in a database. It allows for a valid query for total_rows when _design_docs
handler queried with an array of keys.
|
|/ |
|