summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix compactor bind_emsort clause3.x-fix-compaction-emsort-clause-errorNick Vatamaniuc2020-07-131-2/+3
| | | | | | When compactor finds an old compaction file, before the state was upgraded to a a proplist, the state will be `Root` from `emsort`, which is a `{BB, Prev}` tuple not an integer.
* Port view_compaction test to elixirJuanjo Rodriguez2020-07-074-2/+109
|
* Port view_collation_raw.js to elixirJuanjo Rodriguez2020-07-073-1/+161
|
* fix: set gen_server:call() timeout to infinity on ioq bypassJan Lehnardt2020-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Before the bypass existed, ioq would call `gen_server:call()` on hehalf of it calling module with the queueing logic in between. Commit e641a740 introduced a way to bypass any queues, but the delegated `gen_server:call()` there was added without a timeout parameter, leading to a default timeout of 5000ms. A problem manifests here when operations that are sent through ioq that take longer than that 5000ms timeout. In practice, these operations should be very rare and this timeout should be a help on overloaded systems. However, one sure-fire way to cause an issue on an otherwise idle machine is raise the max_document_size and store unreasonably large documents, think 50MB+ of raw JSON). Not that we recommend this, but folks have run this fine on 2.x before the ioq changes and it isn’t too hard to support here. By adding an `infinity` timeout delegated `gen_server:call()` in the queue bypasse case, this no longer applies. Thanks to Joan @woahli Touzet, Bob @rnewson Newson and Paul @davisp Davis for helping to track this down.
* Port view_update_seq.js into elixirJuanjo Rodriguez2020-06-303-1/+144
|
* Port reader_acl test into elixir test suiteJuanjo Rodriguez2020-06-303-2/+257
|
* Skip tests as temporary views are not supportedJuanjo Rodriguez2020-06-271-0/+1
|
* Tests already ported to elixirJuanjo Rodriguez2020-06-272-0/+2
|
* Upgrade Credo to 1.4.0Alessio Biancalana2020-06-222-3/+3
|
* In replicator, when rescheduling, pick only pending jobs which are not runningNick Vatamaniuc2020-06-181-0/+16
| | | | | | | Previously, when pending jobs were picked in the `ets:foldl` traversal, both running and non-running jobs were considered and a large number of running jobs could displace pending jobs in the accumulator. In the worst case, no crashed jobs would be restarted during rescheduling.
* move compact and replicate functions into CouchTestCase shared moduleJuanjo Rodriguez2020-05-278-155/+56
|
* Port rev_stemming into elixirJuanjo Rodriguez2020-05-273-1/+195
|
* Quit test run without checking that couchdb is runningJuanjo Rodriguez2020-05-031-8/+15
|
* Report the chttpd_auth authentication db in session info (#2823)3.1.0-RC23.1.0Jay Doane2020-04-303-1/+111
| | | | | | | | Currently, result of GET `/_session` reports the `authentication_db` of the obsolete admin port 5986. This updates it to report the actual db used for authentication, provided it is configured. Otherwise, it omits `authentication_db` entirely from the session info. (cherry picked from commit 1e9d0e3c1828d828bb3e8efdbbbd2e348ff518f2)
* Merge pull request #2854 from apache/3.x-backports-verbumpJoan Touzet2020-04-304-6/+9
|\ | | | | 3.x backports verbump
| * Fix python-black target for WindowsJoan Touzet2020-04-301-2/+2
| |
| * allow to run 'javascript' target with other test targets in the same 'make' ↵Juanjo Rodriguez2020-04-302-2/+5
| | | | | | | | process
| * Bump version number to 3.1.0Joan Touzet2020-04-302-2/+2
|/
* bump docs, fauxton for 3.1.03.1.0-RC1Joan Touzet2020-04-291-2/+2
|
* Add Ubuntu Focal (20.04) + SM68 to JenkinsJoan Touzet2020-04-292-2/+48
|
* Drop os_mon from dependenciesJoan Touzet2020-04-285-6/+2
|
* Suppress offsetof gcc warnings for SM60Joan Touzet2020-04-281-1/+1
| | | | | | Mozilla did this years ago: https://hg.mozilla.org/mozilla-central/rev/41d9d32ab5a7
* View is partitioned if db and view are partitionedRobert Newson2020-04-271-10/+1
| | | | | | | We've seen a crash if DbPartitioned is false and ViewPartitioned is true, which is obviously nonsense. The effect of the `nocase` is the termination of the couch_index_server gen_server, which is a serious amplification of a small (user-initiated) oddity.
* Ensure python black runs on all .py files (#2827)Joan Touzet2020-04-272-4/+4
|
* python black cleanupJoan Touzet2020-04-271-7/+3
|
* Fix new JS test caseJoan Touzet2020-04-271-2/+3
|
* Replace broken u-escape sequencesPaul J. Davis2020-04-271-2/+104
|
* Incorporate changes from #2786Joan Touzet2020-04-279-597/+239
|
* First pass at SpiderMonkey 68 supportJoan Touzet2020-04-2712-37/+2107
|
* Fix couchjs utf8 conversions (#2786)Paul J. Davis2020-04-277-569/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove unused string conversion functions * Set UTF-8 encoding when compiling scripts * Encode JavaScript strings as UTF-8 for printing * Check that only strings are passed to print * Use builtin UTF-8 conversions in http.cpp * Add tests for couchjs UTF-8 support * Remove custom UTF-8 conversion functions We're now using 100% built-in functionality of SpiderMonkey to handle all UTF-8 conversions. * Report error messages at global scope Previously we weren't reporting any uncaught exceptions or compilation errors. This changes that to print any compilation errors or any uncaught exceptions with stack traces. The previous implementation of `couch_error` was attempting to call `String.replace` on the `stack` member string of the thrown exception. This likely never worked and attempting to fix I was unable to properly invoke the `String.replace` function. This changes the implementation to use the builtin stack formatting method instead. * Modernize sources to minimize changes for 68 These are a handful of changes that modernize various aspects of the couchjs 60 source files. Behaviorally they're all benign but will shorten the diff required for adding support for SpiderMonkey 68. Co-authored-by: Joan Touzet <wohali@apache.org>
* Merge pull request #2817 from apache/mango-bookmark-3.xRobert Newson2020-04-231-1/+1
|\ | | | | safer binary_to_term in mango_json_bookmark
| * safer binary_to_term in mango_json_bookmarkmango-bookmark-3.xRobert Newson2020-04-231-1/+1
|/
* fix: use correct logging module name, fixes #2797 (#2798) (#2811)Joan Touzet2020-04-221-1/+1
| | | | | Co-authored-by: Joan Touzet <wohali@users.noreply.github.com> Co-authored-by: Jan Lehnardt <jan@apache.org>
* fix operator issue with empty arrays (#2805) (#2808)Tony Sun2020-04-222-3/+25
| | | | | | | | | | | | | Previously, in https://github.com/apache/couchdb/pull/1783, the logic was wrong in relation to how certain operators interacted with empty arrays. We modify this logic to make it such that: {"foo":"bar", "bar":{"$in":[]}} and {"foo":"bar", "bar":{"$all":[]}} should return 0 results. Co-authored-by: Joan Touzet <wohali@users.noreply.github.com>
* Replace VM_ARGS with ARGS_FILE which is set as it is in couchdb script ↵Joan Touzet2020-04-221-5/+16
| | | | | | /etc/vm.args; also parses name from config. (#2738) (#2809) Co-authored-by: Joan Touzet <wohali@users.noreply.github.com> Co-authored-by: Simon Klassen <6997477+sklassen@users.noreply.github.com>
* Bump fauxton to v1.2.3 (#2515) (#2803)Joan Touzet2020-04-221-1/+1
| | | | | Co-authored-by: Joan Touzet <wohali@users.noreply.github.com> Co-authored-by: Will Holley <willholley@apache.org>
* Update compaction progress during docid phasesPaul J. Davis2020-04-142-29/+99
| | | | | | | | | | | Previously the sort and copy phases when handling document IDs was not measured in _active_tasks. This adds size tracking to allow operators a way to measure progress during those phases. I'd like to thank Vitaly for the example in #1006 that showed a clean way for tracking the size info in `couch_emsort`. Co-Authored-By: Vitaly Goot <vitaly.goot@gmail.com>
* Optimize compactor to use multi-IO APIPaul J. Davis2020-04-141-21/+33
| | | | | | | | This updates couch_db_updater to use the new multi-IO API functions (append_terms/pread_terms) in couch_file. This optimization benefits us by no longer requiring the `couch_emsort:merge/1` step to copy `#full_doc_info{}` records multiple times while also not being penalized by signficantly increasing the number of calls through couch_file APIs.
* Optimize btree node writesPaul J. Davis2020-04-141-13/+15
| | | | | This uses the new couch_file:append_terms/2 function to write all chunks in a single write call.
* Add multi-append functions to couch_filePaul J. Davis2020-04-141-27/+135
| | | | | | | These functions allow the caller to append multiple terms or binaries to a file and receive the file position and size for each individual element. This is to optimize throughput in situations where we want to write multiple pieces of independant data.
* Implement compactor test suitePaul J. Davis2020-04-143-0/+464
|
* Simplify compaction state managementPaul J. Davis2020-04-141-42/+123
| | | | | | | This change adds a new `#comp_st{}` record that is used to pass compaction state through the various compaction steps. There are zero changes to the existing compaction logic. This merely sets the stage for adding our docid copy optimization.
* Port reduce_false.js and reduce_builtin.js to Elixir (#2541)Leonardo Pires2020-04-143-2/+334
| | | | Port reduce_false.js and reduce_builtin.js to Elixir
* Port recreate docs testJuanjo Rodriguez2020-04-143-1/+167
|
* Improve test initializationJuanjo Rodriguez2020-04-071-7/+8
|
* Port view_offset.js to elixir test suiteAlessio Biancalana2020-04-044-2/+128
|
* Merge pull request #2645 from danielbarbarito/users-db-security-editable-ini-fixRobert Newson2020-04-021-3/+3
| | | Move "users_db_security_editable" to the correct location in the ini file
* Merge pull request #2654 from apache/fix-filter-changes-feed-rewindsRobert Newson2020-04-021-1/+2
| | | Send correct seq values for filtered changes
* Merge pull request #2657 from apache/cookie-domain-deleteRobert Newson2020-04-022-2/+14
| | | Set cookie domain when DELETE'ing
* Merge pull request #2690 from apache/fix-create-db-optionsRussell Branca2020-04-027-21/+280
| | | Fix create db options on secondary shard creation