summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* extra partition size testspartition-size-testsGarren Smith2019-01-141-0/+101
|
* Add Elixir tests for database partitionsPaul J. Davis2019-01-1010-3/+1821
| | | | | Co-authored-by: Garren Smith <garren.smith@gmail.com> Co-authored-by: Robert Newson <rnewson@apache.org>
* Support partitioned queries in MangoPaul J. Davis2019-01-0810-11/+182
| | | | | Co-authored-by: Garren Smith <garren.smith@gmail.com> Co-authored-by: Robert Newson <rnewson@apache.org>
* Use index names when testing index selectionPaul J. Davis2019-01-082-29/+28
| | | | | | | | Using the internal hash values for indexes was a brittle approach to ensuring that a specific index was or was not picked. By naming the index and design docs we can more concretely ensure that the chosen indexes match the intent of the test while also not breaking each time mango internals change.
* Optimize offset/limit for partition queriesPaul J. Davis2019-01-085-16/+29
| | | | | | | | | Now that a single shard handles the entire response we can optimize work normally done in the coordinator by moving it to the RPC worker which then removes the need to send an extra `skip` number of rows to the coordinator. Co-authored-by: Robert Newson <rnewson@apache.org>
* Optimize all_docs queries in a single partitionPaul J. Davis2019-01-081-0/+26
| | | | | | | | If a user specifies document ids that scope the query to a single partition key we can automatically determine that we only need to consuly a single shard range. Co-authored-by: Robert Newson <rnewson@apache.org>
* Implement partitioned viewsPaul J. Davis2019-01-0821-59/+360
| | | | | | | | | The benefit of using partitioned databases is that views can then be scoped to a single shard range. This allows for views to scale nearly as linearly as document lookups. Co-authored-by: Garren Smith <garren.smith@gmail.com> Co-authored-by: Robert Newson <rnewson@apache.org>
* Implement `couch_db:get_partition_info/2`Paul J. Davis2019-01-087-2/+203
| | | | | | | | This feature allows us to fetch statistics for a given partition key which will allow for users to find bloated partitions and such forth. Co-authored-by: Garren Smith <garren.smith@gmail.com> Co-authored-by: Robert Newson <rnewson@apache.org>
* Implement partitioned dbsPaul J. Davis2019-01-0814-77/+320
| | | | | | | | | | | | | This change introduces the ability for users to place a group of documents in a single shard range by specifying a "partition key" in the document id. A partition key is denoted by everything preceding a colon ':' in the document id. Every document id (except for design documents) in a partitioned database is required to have a partition key. Co-authored-by: Garren Smith <garren.smith@gmail.com> Co-authored-by: Robert Newson <rnewson@apache.org>
* Implement configurable hash functionsPaul J. Davis2019-01-086-21/+116
| | | | | | | This provides the capability for features to specify alternative hash functions for placing documents in a given shard range. While the functionality exists with this implementation it is not yet actually used.
* Validate design document options more strictlyPaul J. Davis2019-01-081-0/+4
| | | | | | | | This adds specific datatype requirements to the list of allowable design document options. Co-authored-by: Garren Smith <garren.smith@gmail.com> Co-authored-by: Robert Newson <rnewson@apache.org>
* Pass the DB record to index validation functionsPaul J. Davis2019-01-083-8/+11
| | | | | Allow index validation to be parameterized by the database without having to reopen its own copy.
* Implement `fabric_util:open_cluster_db`Paul J. Davis2019-01-083-7/+18
| | | | | This allows for more fine grained use of couch_db:clustered_db as well as chagnes the name to something more appropriate than `fake_db`.
* Improve `couch_db:clustered_db` flexibilityPaul J. Davis2019-01-081-3/+14
| | | | | This allows for setting any combintaion of supported settings using a proplist appraoch.
* Add PSE API to store opaque propertiesGarren Smith2019-01-087-9/+180
| | | | | | | | | | This allows us to implement features outside of the PSE API without requiring changes to the API for each bit of data we may want to end up storing. The use of this opaque object should only be used for features that don't require a beahvior change from the storage engine API. Co-authored-by: Garren Smith <garren.smith@gmail.com> Co-authored-by: Robert Newson <rnewson@apache.org>
* Merge pull request #1808 from apache/before_doc_updatePeng Hui Jiang2019-01-058-26/+34
|\ | | | | Update before_doc_update/2 to before_doc_update/3
| * Update before_doc_update/2 to before_doc_update/3before_doc_updatejiangph2019-01-058-26/+34
|/ | | | - Pass UpdateType to before_doc_update/3
* Merge pull request #1831 from apache/intro-cpse_test_purge_seqsPeng Hui Jiang2019-01-032-6/+9
|\ | | | | Re-Introduce cpse_test_purge_seqs
| * Introduce cpse_test_purge_seqs againjiangph2019-01-032-6/+9
|/ | | | | | - Re-introduce cpse_test_purge_seqs after fixing issue on cpse_test_purge_seqs:cpse_increment_purge_seq_on_partial_purge/1 with undef issue
* happy new year (#1838)Jan Lehnardt2018-12-312-2/+2
|
* Merge pull request #1833 from cloudant/minimum-erlang-otp-19iilyak2018-12-285-46/+1
|\ | | | | Change minimum supported Erlang version to OTP 19
| * Change minimum supported Erlang version to OTP 19Jay Doane2018-12-285-46/+1
|/
* Remove obsolete travis filesJay Doane2018-12-2710-308/+0
| | | | | | These files were used when their apps had separate repositories, but are obsolete in the "mono repo" since their apps are built together using the top level .travis.yml now.
* Remove explicit modules list from .app.src filesJay Doane2018-12-276-74/+0
| | | | | | The modules lists in .app files are automatically generated by rebar from .app.src files, so these explicit lists are unnecessary and prone to being out of date.
* Merge pull request #1798 from cloudant/suppress-compiler-warningsiilyak2018-12-2746-260/+332
|\ | | | | Suppress compiler warnings
| * Suppress export-related compiler warningsJay Doane2018-12-2722-108/+188
| | | | | | | | | | | | | | | | | | | | | | - For export_all warnings: either replace with explicit exports, add nowarn_export_all compiler directives when appropriate, or in the case of couch_epi_sup, move the test to dedicated test file and export the function needed for testing. - For "function already exported" warning in couch_key_tree_prop_tests, remove include_lib attribute for eunit.hrl since it already gets imported in triq.hrl
| * Reduce number of behaviour undefined compiler warningsJay Doane2018-12-272-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move couch_event and mem3 modules earlier in the list of SubDirs to suppress behaviour undefined warnings. This has the side effect of running the tests in the new order, which induces failures in couch_index tests. Those failures are related to quorum, and can be traced to mem3 seeds tests leaving a _nodes db containing several node docs in the tmp/data directory, ultimately resulting in badmatch errors e.g. when a test expects 'ok' but gets 'accepted' instead. To prevent test failures, a cleanup function is implemented which deletes any existing "nodes_db" left after test completion.
| * Suppress misc compiler warningsJay Doane2018-12-273-5/+3
| | | | | | | | | | | | | | | | | | | | | | - couch_util_tests.erl:90: Warning: the result of the expression is ignored - couch_mrview_index_changes_tests.erl:189,196: Warning: a term is constructed, but never used - couch_replicator_connection_tests.erl:76: Warning: this expression will fail with a 'badarith' exception
| * Suppress unused function compiler warningsJay Doane2018-12-274-100/+98
| | | | | | | | | | | | - Add unused test cases to test fixture - Eliminate unreferenced code - Comment out code that is referenced in commented code only
| * Suppress crypto and random compiler warningsJay Doane2018-12-275-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | Replace deprecated crypto:rand_uniform/2 and 'random' module functions with equivalent couch_rand:uniform/1 calls, or eliminate the offending code entirely if unused. Note that crypto:rand_uniform/2 takes two parameters which have different semantics than the single argument couch_rand:uniform/1. Tests in mem3 are also provided to validate that the random rotation of node lists was converted correctly.
| * Suppress unused variable and type compiler warningsJay Doane2018-12-279-12/+8
| |
| * Suppress variable exported from 'case' compiler warningsJay Doane2018-12-272-9/+8
|/
* Merge pull request #1829 from cloudant/elixir-test-improvementsiilyak2018-12-276-33/+61
|\ | | | | Elixir test improvements
| * Do not automatically fail tests if quorum conditions unmetJay Doane2018-12-221-3/+3
| |
| * Improve all_docs_test robustnessJay Doane2018-12-221-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrap deleted element assertions in retry_until to prevent timing related failures like: AllDocsTest * test All Docs tests (331.1ms) 1) test All Docs tests (AllDocsTest) test/all_docs_test.exs:15 Assertion with == failed code: assert length(deleted) == 1 left: 0 right: 1 stacktrace: test/all_docs_test.exs:72: (test)
| * Fix elixir test formattingJay Doane2018-12-225-27/+52
|/ | | | | | | | | | | | | Prior to this, `make elixir` was failing with these errors: ** (Mix) mix format failed due to --check-formatted. The following files were not formatted: * test/security_validation_test.exs * test/rewrite_test.exs * test/cluster_with_quorum_test.exs * test/cluster_without_quorum_test.exs * test/all_docs_test.exs
* Remove shim couch_replicator_manager moduleKyle Snavely2018-12-204-89/+15
|
* Clean rexi stream workers when coordinator process is killedNick Vatamaniuc2018-12-201-0/+132
| | | | | | | | | | | | | | | | | Sometimes fabric coordinators end up getting brutally terminated [1], and in that case they might never process their `after` clause where their remote rexi workers are killed. Those workers are left lingering around keeping databases active for up to 5 minutes at a time. To prevent that from happening, let coordinators which use streams spawn an auxiliary cleaner process. This process will monitor the main coordinator and if it dies will ensure remote workers are killed, freeing resources immediately. In order not to send 2x the number of kill messages during the normal exit, fabric_util:cleanup() will stop the auxiliary process before continuing. [1] One instance is when the ddoc cache is refreshed: https://github.com/apache/couchdb/blob/master/src/ddoc_cache/src/ddoc_cache_entry.erl#L236
* Move fabric streams to a fabric_streams moduleNick Vatamaniuc2018-12-207-98/+129
| | | | | | Streams functionality is fairly isolated from the rest of the utils module so move it to its own. This is mostly in preparation to add a streams workers cleaner process.
* Suppress credo TODO suggests (#1822)Ivan Mironov2018-12-201-2/+5
|
* Migrate cluster with(out) quorum js tests as elixir tests (#1812)Juanjo Rodriguez2018-12-194-2/+383
|
* Increase timeout on restart in JS/elixir tests to 30s (#1820)Joan Touzet2018-12-192-3/+3
|
* Merge pull request #1800 from cloudant/allow-specifying-individual-elixir-testsiilyak2018-12-194-4/+17
|\ | | | | Support specifying individual Elixir tests to run
| * Merge branch 'master' into allow-specifying-individual-elixir-testsJoan Touzet2018-12-1211-45/+327
| |\ | |/ |/|
* | Merge pull request #1805 from cloudant/fix-with-haproxyiilyak2018-12-111-1/+1
|\ \ | | | | | | Fix haproxy config file location
| * | Fix haproxy config file locationILYA Khlopotov2018-12-111-1/+1
|/ / | | | | | | | | The problem was introduced in 94eff0d8 during rebase of https://github.com/apache/couchdb/pull/1774
* | Merge pull request #1774 from cloudant/support-more-than-3-nodesiilyak2018-12-112-15/+86
|\ \ | | | | | | Support for more than 3 nodes dev cluster
| * | Support for more than 3 nodes dev clusterILYA Khlopotov2018-12-112-15/+86
|/ /
* | Merge pull request #1796 from cloudant/tests/port-delayed_commits-to-elixirEric Avdey2018-12-104-1/+89
|\ \ | | | | | | Port delayed_commits test to Elixir
| * | Port delayed_commits test to ElixirEric Avdey2018-12-102-1/+32
| | |