summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WIP: moar stuffprototype/fdb-layer-view-cleanupPaul J. Davis2020-04-104-32/+89
|
* WIP: Stuff.Paul J. Davis2020-04-103-7/+21
|
* Implement couch_views_cleanup_test.erlPaul J. Davis2020-04-101-0/+368
| | | | Add tests for view cleanup.
* Remove jobs on index cleanupPaul J. Davis2020-04-102-1/+9
|
* Optionally cleanup stale indices automaticallyPaul J. Davis2020-04-102-5/+20
|
* Implement _view_cleanup for FoundationDBPaul J. Davis2020-04-101-1/+1
|
* Implement couch_views:cleanup_indices/2Paul J. Davis2020-04-102-1/+57
|
* Extend fabric2_index callbacks for index cleanupPaul J. Davis2020-04-101-0/+22
| | | | | Each registered index type can now get a signal on when to clean up their indexes.
* Update to use `fabric2_db:get_design_docs/1`Paul J. Davis2020-04-101-17/+1
|
* Move process_db/1 to match the logical progressionPaul J. Davis2020-04-101-10/+10
| | | | | | | Functions are easier to read and process if they're defined in the order that they are referenced. Co-Authored-By: Nick Vatamaniuc <vatamane@apache.org>
* Rename variables to indicate transaction statePaul J. Davis2020-04-101-3/+3
| | | | | | | | Usually we indicate the transaction status of a Db handle by naming it `TxDb`. This updates fabric2_index:build_indices/2 to match that pattern. Co-Authored-By: Nick Vatamaniuc <vatamane@apache.org>
* Fix index updater configuration keysPaul J. Davis2020-04-101-3/+3
| | | | | The defaults commented out in `default.ini` did not match the names used in `fabric2_index.erl`.
* Fix flaky fabric2_index testNick Vatamaniuc2020-04-101-3/+3
| | | | | | Previously in the the test we first set up the callback, then disabled the indexing. By that time, there was a chance that building could have started especially in a slower execution environment.
* Merge pull request #2775 from cloudant/mango-plugin-fixupiilyak2020-04-101-2/+5
|\ | | | | Fix incorrect usage of couch_epi in mango plugin
| * Fix incorrect usage of couch_epi in mango pluginILYA Khlopotov2020-04-101-2/+5
|/ | | | | Previously we used the value returned from couch_epi apply as is. However it returns a list of arguments passed in the same order.
* Make 'make check' run all the passing FDB tests on this branchNick Vatamaniuc2020-04-092-5/+7
| | | | | | | | This will let CI gate PRs hopefully as we now have the necessary FDB server bits installed in Jenkins. Eventually when we can run all the tests revert to using `make check-all-tests` as the default.
* Fix division by zeroPaul J. Davis2020-04-091-0/+2
|
* Fix job removal notificationsNick Vatamaniuc2020-04-092-0/+32
| | | | | | | | | | | Fix the case when a job is removed while there are subscribers waiting for it. Most of the logic was already there except: * Handle the case when when data decoded from subscription results could be `not_found`, in that case we just pass that atom back as is. * Need to notify the watch when jobs are removed or couch_jobs_notifiers would wake up and send notification messages.
* Merge pull request #2767 from cloudant/prototype/fdb-layer-mango-pluginiilyak2020-04-093-10/+57
|\ | | | | Prototype/fdb layer mango plugin
| * Add mango_pluginILYA Khlopotov2020-04-093-10/+57
|/ | | | | | Implement the following extention points: - `before_find(Req) -> {ok, Req}` - `after_find(Req, HttpResp, KVs) -> {ok, KVs}`
* Compress doc bodies and attachmentsNick Vatamaniuc2020-04-074-11/+90
| | | | | | | | | | | | | In CouchDB < 4.x we compressed document bodies by default, so enable it for 4.x as well. Use the basic term_to_binary compression mechanism for: - Document bodies - Local document bodies - Attachments, but only if they have not already been compressed.
* Merge pull request #2666 from apache/db-softdeletionPeng Hui Jiang2020-04-088-43/+847
|\ | | | | soft-deletion for database
| * Support soft-deletion in chttpd leveljiangph2020-04-073-29/+332
| | | | | | | | Co-Authored-By: Paul J. Davis <paul.joseph.davis@gmail.com>
| * Support soft-deletion in fabric leveljiangph2020-04-075-14/+515
|/ | | | | | | | | Instead of automatically and immediately removing data and index in database after a delete operation, soft-deletion allows to restore the deleted data back to original state due to a “fat finger”or undesired delete operation, up to defined periods, such as 48 hours. Co-Authored-By: Paul J. Davis <paul.joseph.davis@gmail.com>
* Start running chttpd eunit testsNick Vatamaniuc2020-04-0712-215/+92
| | | | | | | | | | | | | | Enable running all chttpd tests. Some fixes needed for this to happen are: * Some tests were not valid (checking shard maps, etc) and were deleted * Some tests were disabled either because functionality is not implemented yet or simply to minimize the diff between 3.x and this branch for when we have to rebase * Some applications used for index querying had to be started explicitly * Mock updated to use new version of modules instead of old ones
* Do not allow editing _security in _user databaseNick Vatamaniuc2020-04-071-1/+1
| | | | | It should only be allowed if explicitly configured. Previously we did not propertly match on the database name and effectively always allowed it.
* Fix POST _all_docs/queries endpointNick Vatamaniuc2020-04-072-4/+5
| | | | | | Call couch_views module instead of the old fabric:query_view also needed to call `view_cb(complete, ...)` when using keys similar to how `all_docs_view/4` does it.
* Return better responses for endpoints which are not implementedNick Vatamaniuc2020-04-073-23/+35
| | | | | | | | | | | | | | | | | | | Endpoints which are removed return a 410 response: - _show - _list - _rewrite Endpoints which will be implemented in CouchDB 4.x eventually now return a 510 response: - _purge - _purge_infos_limit Endpoints which return a 2xx but are a no-op effectively: - _compact - _view_cleanup
* remove defer and load_ddocs from mango_utilsGarren Smith2020-04-062-63/+0
| | | | Clean up unused mango_utils functions.
* update mango tests to work with Mango on FDBGarren Smith2020-04-0614-136/+129
|
* Update mango test creds to same as elixir testsGarren Smith2020-04-063-5/+5
|
* Update Mango query to work with couch_viewsGarren Smith2020-04-069-147/+139
|
* Add mango indexingGarren Smith2020-04-067-19/+187
| | | | | | This uses couch_views_updater to create mango indexes in the doc update along with the couch_views_indexer to update the indexes in the background up to the creation versionstamp.
* Remove quorum statsGarren Smith2020-04-063-13/+1
| | | | Removing quorum stats since they are not relevant with FDB.
* Remove view_cb predicate push downGarren Smith2020-04-061-94/+1
| | | | | Removes the view callback that was performed on the nodes before sending the results back to the co-ordinator.
* remove unneeded r/w parameterGarren Smith2020-04-066-67/+6
|
* remove partition opts from mangoGarren Smith2020-04-0610-200/+10
|
* remove mango native procGarren Smith2020-04-063-375/+0
|
* Add couch_views_encoding max valueGarren Smith2020-04-061-0/+12
| | | | | Adds a max value to use for encoding. This is useful when getting the max range when encoding startkey/endkeys.
* Add couch_views_updater interactive indexerGarren Smith2020-04-069-5/+470
| | | | | | This adds the ability for couch_views to index an index in the docs update transaction. This only happens if a design doc has the field <<"interactive">> = true.
* All couch_view queries to run across transactionsGarren Smith2020-04-061-1/+2
|
* Add couch_views_indexer build to creation versionstampGarren Smith2020-04-067-33/+206
| | | | | | This creates a versionstamp for when an indexed was created and build status for indexes. if the index has a creation_vs, then couch_views_indexer will built the index to this creation versionstamp.
* add fabric2 after_doc_write pluginGarren Smith2020-04-062-0/+8
|
* add include_docs option to fold_docsGarren Smith2020-04-061-2/+25
|
* move all_doc view options to fabric2_utilGarren Smith2020-04-062-29/+39
|
* fix all_docs call to return rowGarren Smith2020-04-061-1/+2
|
* Merge pull request #2662 from cloudant/couch_view-rate_limitiilyak2020-04-0226-28/+1839
|\ | | | | Use `couch_rate` application for `couch_view`
| * Use `couch_rate` application for `couch_view`ILYA Khlopotov2020-04-0226-28/+1839
|/
* Merge pull request #2743 from apache/switch-erlfdb-couchRobert Newson2020-04-011-6/+2
|\ | | | | Switch erlfdb to the couchdb repo at tag v1.0.0
| * Switch erlfdb to the couchdb repo at tag v1.0.0Robert Newson2020-04-011-6/+2
|/