summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into no-rc-tagsno-rc-tagsJoan Touzet2020-01-312-10/+10
|\
| * fix: re-allow spaces in startup paths (#2504)Jan Lehnardt2020-01-312-10/+10
| |
* | python-black style cleanupJoan Touzet2020-01-312-3/+3
|/
* Setup wizard: do not create _global_changes (#2497)Joan Touzet2020-01-291-1/+1
|
* Fix ini file setting for #2296 (#2463)Joan Touzet2020-01-291-2/+3
|
* bump ets_lru, khash revs (#2491)Joan Touzet2020-01-282-2/+3
|
* quote strings for all text values (#2486)Tony Sun2020-01-273-1/+21
| | | | | | | | | | | | When a user issues a range query $lt, $lte, $gt, $gte for text indexes, the query is translated into a MIN, MAX range query against clouseau. If not quoted, an error occurs: {"error":"text_search_error","reason":"Cannot parse '(a_3astring:[\"\" TO string\\ containing\\ space})'..} This is because the string is broken up into 3 tokens which the parser cannot parse. If we add quotes to the string, the the range query works correctly.
* Jenkins: bump Erlang versions (#2492)Joan Touzet2020-01-262-18/+18
|
* Revert prio flag in default.ini (#2488)Joan Touzet2020-01-251-3/+5
|
* Revert default priority change for couch_server (#2487)Joan Touzet2020-01-251-1/+1
|
* Remove reduntant get_ring_opts call in in dreyfus_fabric_searchNick Vatamaniuc2020-01-231-1/+0
| | | | | Previously we erroneously got ring opts before and after figuring out live shards if some shards were not live there was a badmatch failure.
* Update couchdb-config to 2.1.7Will Holley2020-01-231-1/+1
|
* Fix misspelling in dreyfusNick Vatamaniuc2020-01-221-1/+1
| | | | dreyful -> dreyfus
* Python black cleanups (#2477)Joan Touzet2020-01-213-2/+6
|
* Enable building on Power (ppc64le) architecture (#2455)Paul J. Davis2020-01-211-0/+43
| | | | Co-authored-by: Joan Touzet <wohali@users.noreply.github.com>
* Replace Triq with PropErNick Vatamaniuc2020-01-217-28/+90
| | | | | | | | It was already used in the IOQ2 work so all the plumbing to pull it in during dev testing was there and it seems awkward to have two different property testing framework for just a few tests. It is still an optional component and is not included in the release.
* Add POST /_node/<node>/_config/_reloadWill Holley2020-01-212-0/+17
| | | | | | Using the backend port 5986 it was possible to reload config from disk using the _config/_reload endpoint. This ports it to the _node API on the frontend cluster port.
* Log clustered URIs at startupWill Holley2020-01-211-1/+1
| | | | | | | Changes the URI logged at startup to report the address(es) that `chttpd` is bound to rather than `httpd`. Previously it was a bit confusing that it always reported that Couch had started on port 5986 which is deprecated and not intended to be user-facing.
* Merge pull request #2473 from apache/infinite-loop-authRobert Newson2020-01-202-8/+5
|\ | | | | Fix infinite loop in default_authentication_handler
| * Fix infinite loop in default_authentication_handlerinfinite-loop-authRobert Newson2020-01-202-8/+5
|/
* [Jenkins] Try to cleanup hung beam.smp (FreeBSD) (#2468)Joan Touzet2020-01-181-1/+2
|
* Port etags tests to elixirJuanjo Rodriguez2020-01-174-9/+170
| | | | Fixes #2464
* Merge pull request #2466 from apache/mango_index_consistency_errorPeng Hui Jiang2020-01-181-0/+4
|\ | | | | Handle not_found atom in mango text indexes
| * Handle not_found docs in mango text indexesarchive/mango_index_consistency_errormango_index_consistency_errorWill Holley2020-01-171-0/+4
|/ | | | | | mango_cursor_text:get_json_docs may return a not_found atom instead of a Doc. In this case, we should just ignore the hit instead of attempting to evaluate it against a mango selector.
* Add a few missing settings to the default.ini fileNick Vatamaniuc2020-01-171-0/+17
| | | | | | Some rexi and reshard parameters Issue: https://github.com/apache/couchdb/issues/2457
* Instrument Mango execution statsWill Holley2020-01-175-10/+40
| | | | | | | | | | | | | | | | Adds metrics for mango execution statistics: * total docs examined (counter). Note that for non-quorum doc reads this needs to be counted at the shard level and not be the mango query coordinator * total results returned (counter) * query time (histogram) * mango:selector evaluations (may be queries or _changes feeds) For mrview-based queries which don't use quorum reads (the default), total docs examined should equal mango:selector evaluations. However, there are cases where mango selectors are evaluated outside of query time e.g. partial indexing, selector-based _changes which make it useful to maintain a distinct counter.
* Warn on mango index scanWill Holley2020-01-175-30/+65
| | | | | | | Adds a warning to the _find endpoint if the ratio of docs scanned: results returned is higher than a configurable threshold (default 10). This warning was previously generated in Fauxton; moving it to the server side allows us to expose it via _stats as well.
* Add mango.query_invalid_index counterWill Holley2020-01-172-0/+6
| | | | | Adds a metric to expose the number of Mango queries that could not use the index specified in the _find query.
* Refactor Mango warning generationWill Holley2020-01-173-42/+53
| | | | | | | | | | | | | | Refactor the code generating Mango warnings to (hopefully!) improve readability. This also moves the metric counter for unindexed queries such that it gets incremented only when no index is used. Previously, it would increment if *any* warning was generated (e.g. when Mango warned that the user-specified index was not found/valid but fell back to a different index). The warning string returned now also contains all warnings generated for the query, delimited via newlines - not just the first one.
* fix empty queries (#1783)Tony Sun2020-01-1611-16/+164
| | | | | | | | | | | | | | | | | | | | | | | * fix empty queries Mango text indexes currently throw function clauses when queries in two situations: 1) Empty Selector 2) Operators with empty arrays. We fix this issue and change the behavior as follows: 1) Any empty selector will fall back on _all_docs (like json indexes). 2) $or, $and, $in, $all that specify an empty arrays will be treated as no-op when combined with other operators. 3) A single no-nop query such as {"$or": []} will not be executed and return nothing just like json indexes. 4) $nin with an empty array will return all docs that match the field, just like json indexes. Co-authored-by: Jan Lehnardt <jan@apache.org> Co-authored-by: Peng Hui Jiang <jiangphcn@apache.org>
* Explicitly disallow SM60 on aarch64Joan Touzet2020-01-163-2/+12
| | | | Includes configure changes and Jenkins setting change.
* Debug mem3_sync_event_listener flakinessNick Vatamaniuc2020-01-161-0/+4
| | | | | Noticed mem3_sync_event_listner tests still fails intermetently, add a debug log to it to hopefully find the cause of the failure.
* Fix fabric worker failures for partition requestsNick Vatamaniuc2020-01-169-85/+239
| | | | | | | | | | | | | Previously any failed node or rexi worker error resulted in requests failing immediately even though there were available workers to keep handling the request. This was because the progress check function didn't account for the fact that partition requests only use a handful of shards which, by design, do not complete the full ring. Here we fix both partition info queries and dreyfus search functionality. We follow the pattern from fabric and pass through a set of "ring options" that let the progress function know it is dealing with partitions instead of a full ring.
* Merge pull request #2450 from apache/couchdb-ken-hastingsPeng Hui Jiang2020-01-161-1/+3
|\ | | | | Adjust way to detect presence of hastings for Ken
| * More way to detect presence of hastings for Kenjiangph2020-01-161-1/+3
|/ | | | | | | | After moving ken from https://github.com/apache/couchdb-ken to https://github.com/apache/couchdb/tree/master/src/ken. The directory structure related to ken is changed for downstream including Cloudant. Increase more way to detect presence of hastings for Ken so that Ken can work correctly for geospatial index.
* Add SameSite support to auth cookieWill Holley2020-01-154-1/+62
| | | | | | | | Adds a new configuration field, `couch_httpd_auth.same_site` which sets the `SameSite` attribute of the CouchDB auth cookie. If no value is set (the default), no `SameSite` attribute is added. Refs #2221
* mochiweb v2.20Will Holley2020-01-151-1/+1
|
* Preserve replication job stats when jobs are re-createdNick Vatamaniuc2020-01-144-82/+185
| | | | | | | | | | | | | | | | | | | | | | | | Previously we made sure replication job statistics were preserved when the jobs were started and stopped by the scheduler. However, if a db node restarted or user re-created the job, replication stats would be reset to 0. Some statistics like `docs_read` and `docs_written` are perhaps not as critical. However `doc_write_failures` is. That is the indicator that some replication docs have not replicated to the target. Not preserving that statistic meant users could perceive there was a data loss during replication -- data was replicated successfully according to the replication job with no write failures, user deletes source database, then some times later noticed some of their data is missing. These statistics were already logged in the checkpoint history and we just had to initialize a stats object from them when a replication job starts. In that initialization code we pick the highest values from either the running scheduler or the checkpointed log. The reason is that the running stats could be higher if say job was stopped suddenly and failed to checkpoint but scheduler retained the data. Fixes: #2414
* Properly account for replication stats when splitting bulk docs batchesNick Vatamaniuc2020-01-141-2/+3
| | | | | | | | | | | | Previously if batch of bulk docs had to be bisected in order to fit a lower max request size limit on the target, we only counted stats for the second batch. So it was possibly we might have missed some `doc_write_failures` updates which can be perceived as a data loss to the customer. So we use the handy-dandy `sum_stats/2` function to sum the return stats from both batches and return that. Issue: https://github.com/apache/couchdb/issues/2414
* Enable arm64v8 builds on Jenkins (#2436)Joan Touzet2020-01-141-11/+46
|
* Disable JIT compiler on SpiderMonkey 60Paul J. Davis2020-01-131-0/+3
| | | | | | | We've had a number of segfaults in the `make javascript` test suite. The few times we've been able to get core dumps all appear to indicate something wrong in the JIT compiler. Disabling the JIT compilers appears to prevent these segfaults.
* Eliminate multiple compiler warningsJoan Touzet2020-01-135-7/+4
| | | | | | | | | | | | | | | | | | | | | | We now only support OTP 20+, with 19 at a stretch. erlang:now/0 was deprecated in OTP 18, so we can now suppress these warnings: ``` /home/joant/couchdb/src/dreyfus/src/dreyfus_index_updater.erl:62: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. /home/joant/couchdb/src/dreyfus/src/dreyfus_index_updater.erl:83: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. ``` Also, some unused variables were removed: ``` /home/joant/couchdb/src/couch/src/couch_bt_engine.erl:997: Warning: variable 'NewSeq' is unused /home/joant/couchdb/src/mem3/src/mem3_rep.erl:752: Warning: variable 'TMap' is unused /home/joant/couchdb/src/dreyfus/src/dreyfus_httpd.erl:76: Warning: variable 'LimitValue' is unused /home/joant/couchdb/src/dreyfus/src/dreyfus_util.erl:345: Warning: variable 'Db' is unused ``` PRs to follow in ets_lru, hyper, ibrowse to track the rest of `erlang:now/0` deprecations.
* Improve replicator error reportingNick Vatamaniuc2020-01-135-31/+329
| | | | | | | | | | | | | | | | | | | | | | | Previously many HTTP requests failed noisily with `function_clause` errors. Expect some of those failures and handle them better. There are mainly 3 types of improvements: 1) Error messages are shorter. Instead of `function_clause` with a cryptic internal fun names, return a simple marker like `bulk_docs_failed` 2) Include the error body if it was returned. HTTP failures besides the error code may contain useful information in the body to help debug the failure. 3) Do not log or include the stack trace in the message. The error names are enough to identify the place were they are generated so avoid spamming the user and the logs with them. This is done by using `{shutdown, Error}` tuples to bubble up the error the replication scheduler. There is a small but related cleanup of removing source and target monitors since we'd want to handle those error better however those errors are never triggered since we removed local replication endpoints recently. Fixes: https://github.com/apache/couchdb/issues/2413
* Happy New Year 2020! (#2443)Joan Touzet2020-01-132-2/+2
|
* Merge pull request #2438 from apache/reset-corrupt-view-indexRobert Newson2020-01-112-1/+7
|\ | | | | Reset a view shard if the signature is wrong
| * Debug mem3 eunit errorreset-corrupt-view-indexPaul J. Davis2020-01-101-1/+1
| |
| * Reset a view shard if the signature is wrongRobert Newson2020-01-101-0/+6
|/ | | | | | | | | | We encountered a case_clause error when reading the header for a .view file as the response was {ok, {Sig, nil}} where Sig is neither the expected sig or the pre-upgrade sig (though surely the pre-1.2 goop is not firing anymore). We now log this specific issue and then proceed as if we found no valid header.
* When shard splitting make sure to reset the targets before any retriesNick Vatamaniuc2020-01-102-15/+5
| | | | | | | | | | Previously the target was reset only when the whole job started, but not when the initial copy phase restarted on its own. If that happened, we left the target around so the retry failed always with the `eexist` error. Target reset has a check to make sure the shards are not in the global shard map, in case someone manually added them, for example. If they are found there the job panics and exists.
* Remove debug logging from test/javascript/runPaul J. Davis2020-01-101-1/+0
|
* Remove EUnit retries on failureNick Vatamaniuc2020-01-091-10/+1
| | | | | | | Since we switched from Travis to Jenkins, let's see how tests run without retries in the new environment. For reference, retries were introduced in: https://github.com/apache/couchdb/commit/220462a1dd2d921fc4ecba3488f5fedefb75217f