summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Implement _all_docs/queriesprototype/fdb-layer-add-queries-support-for-all-docsNick Vatamaniuc2019-08-303-88/+290
| | | | | Also add mrargs validation to match what master does and provide some helpful feedback to the users.
* Fix starkey_docid, endkey_docid and inclusive_end=false for _all_docsNick Vatamaniuc2019-08-291-9/+24
|
* Remove debug logging in fabric2_db_pluginNick Vatamaniuc2019-08-291-3/+1
|
* Skip before_doc_update processing for local docsNick Vatamaniuc2019-08-292-1/+30
| | | | | | This matches behavior on master: https://github.com/apache/couchdb/blob/master/src/couch/src/couch_db.erl#L1373-L1387
* Fix couch_views encoding testNick Vatamaniuc2019-08-231-51/+74
| | | | | Start stop config and couch_drv in `setup/0` and `teardown/1` instead of the test function itself.
* Move fabric2_dir_prefix_tests to test directoryNick Vatamaniuc2019-08-221-0/+0
|
* Implement update_seq for couch_viewsNick Vatamaniuc2019-08-221-3/+11
|
* Open dbs with admin privileges in couch_views_indexerNick Vatamaniuc2019-08-221-1/+1
| | | | That is needed when indexing authentication dbs like `_users`.
* Fix DB reopen behaviorNick Vatamaniuc2019-08-221-10/+26
| | | | | | | | | | | | | | Previously if a VDU was updated in the `before_doc_update/3` handlers, the Db handle wasn't refreshed soon enough such that the `prepare_and_validate/3` would not see the newly update VDU and would not run it. To fix make a stale Db throws an exception which bubbles up all the way to `fabric2_fdb:transactional/2` where the transaction is retried again with a reopened Db. During `reopen/1` make sure to properly transfer the `user_ctx` property to the new handle, and also make sure `user_ctx` is removed from `db_options` to avoid caching it in `fabric2_server`.
* Implement fabric2_db EPI pluginNick Vatamaniuc2019-08-227-46/+269
| | | | | | This mostly equivalent to the `couch_db` EPI plugin, but using fabric2 calls and without some of the functions that are not relevant to FDB such as on_compact/1 and others.
* add trace test for couch_viewsGarren Smith2019-08-221-0/+140
|
* Merge pull request #2123 from ↵iilyak2019-08-191-11/+21
|\ | | | | | | | | cloudant/add-timeout-to-fold_docs_with_different_keys Add timeout for 'fold_docs-with_different_keys' test
| * Add timeout for 'fold_docs-with_different_keys' testILYA Khlopotov2019-08-161-11/+21
|/
* only fetch 1 query server for indexingGarren Smith2019-08-151-2/+5
|
* Configurable FDB directory prefixes for CouchDB instancesNick Vatamaniuc2019-08-126-6/+111
| | | | | | | Specifying a custom prefix allows having multiple CouchDB instances on a single FDB cluster. This can be used for one form of multi-tenancy. It can also be used for integration testing by creating a temporary prefix then deleting all data in that directory when the test has finished.
* Remember to remove old doc bodiesPaul J. Davis2019-08-061-5/+25
|
* Write large documents in chunksPaul J. Davis2019-08-062-17/+30
| | | | | This opens the max document size to the transaction limits rather than a single 100k value.
* Update to use new fold_range_future/wait functionsPaul J. Davis2019-08-061-6/+7
|
* Fix job handling to halt on errorsPaul J. Davis2019-08-011-8/+20
| | | | | | If the indexing job has timed out and has been requed we need to exit the current indexer. This ensures the errors are logged so that we can keep an eye on failing jobs.
* CouchDB map indexes on FDBGarren Smith2019-07-3128-28/+3189
| | | | | | This adds couch_views which builds map indexes and stores them in FDB. Co-authored-by: Paul J. Davis <paul.joseph.davis@gmail.com>
* Fix default key ranges for fold_rangePaul J. Davis2019-07-311-15/+16
| | | | | If a start or end key is not specified we still need to scope the range read to the given `RangePrefix`.
* Expose the is_replicator_db and is_user_db logicPaul J. Davis2019-07-312-12/+31
| | | | | This exposes a single place where we can check for whether a given database or database name is a replicator or users database.
* Make fabric2.hrl publicPaul J. Davis2019-07-311-0/+0
|
* Fix more elixir testsPaul J. Davis2019-07-313-10/+43
|
* Expose ICU ucol_getSortKeyRussell Branca2019-07-313-8/+219
|
* Disable broken couch_att testsPaul J. Davis2019-07-311-187/+187
|
* Reinitialize chttpd_auth_cache on config changePaul J. Davis2019-07-313-12/+56
| | | | | | | | The old test got around this by using couch_httpd_auth cache in its tests which is fairly odd given that we run chttpd_auth_cache in production. This fixes that mistake and upgrades chttpd_auth_cache so that it works in the test scenario of changing the authentication_db configuration.
* Fix formatting of all_docs_test.exsPaul J. Davis2019-07-311-1/+1
|
* Implement `POST /_dbs_info`Paul J. Davis2019-07-311-8/+9
|
* Fix revision tree extensionsPaul J. Davis2019-07-312-8/+20
| | | | | Previously I was forgetting to keep the previous history around which ended up limiting the revision depth to two.
* Fix `COPY` methodPaul J. Davis2019-07-311-1/+1
| | | | Simple function change to `fabric2_db:name/1`
* Fix bulk docs error reportingPaul J. Davis2019-07-313-57/+73
| | | | | | The existing logic around return codes and term formats is labyrinthine. This is the result of much trial and error to get the new logic to behave exactly the same as the previous implementation.
* Implement _all_dbs/_all_docs API parametersPaul J. Davis2019-07-317-251/+512
| | | | | | This adds the mapping of CouchDB start/end keys and so on to the similar yet slightly different concepts in FoundationDB. The handlers for `_all_dbs` and `_all_docs` have been udpated to use this new logic.
* Remove tests for deprecated features.Paul J. Davis2019-07-3115-3148/+0
| | | | | Neither partitioned databases or shard splitting will exist in a FoundationDB layer.
* CouchDB background jobsNick Vatamaniuc2019-07-3120-1/+2909
| | | | | | | RFC: https://github.com/apache/couchdb-documentation/pull/409 Main API is in the `couch_jobs` module. Additional description of internals is in the README.md file.
* Fix exception in cache auth doc updateEric Avdey2019-07-311-1/+1
|
* Fix arity in changes timeout callbackEric Avdey2019-07-312-3/+3
|
* Update get security to use fabric2Eric Avdey2019-07-311-1/+1
|
* Implement `_users` db authenticationPaul J. Davis2019-07-316-26/+212
| | | | | | This changes `chttpd_auth_cache` to use FoundationDB to back the `_users` database including the `before_doc_update` and `after_doc_read` features.
* Database config changes should bump the db versionPaul J. Davis2019-07-311-1/+1
| | | | This was a remnant before we used a version per database.
* Fix validate_doc_update when recreating a documentPaul J. Davis2019-07-311-1/+6
| | | | | | | | This fixes the behavior when validating a document update that is recreating a previously deleted document. Before this fix we were sending a document body with `"_deleted":true` as the existing document. However, CouchDB behavior expects the previous document passed to VDU's to be `null` in this case.
* Allow for previously configured filtersPaul J. Davis2019-07-311-0/+3
| | | | | The older chttpd/fabric split configured filters as one step in the coordinator instead of within each RPC worker.
* Convert attachment info to disk terms correctlyPaul J. Davis2019-07-311-4/+9
| | | | | | | | I was accidentally skipping this step around properly serializing/deserializing attachments. Note to self: If someon specifies attachment headers this will likely break when we attempt to pack the value tuple here.
* Fix revision generation on attachment uploadPaul J. Davis2019-07-312-42/+70
| | | | | | | | | | When uploading an attachment we hadn't yet flushed data to FoundationDB which caused the md5 to be empty. The `new_revid` algorithm then declared that was because it was an old style attachment and thus our new revision would be a random number. This fix just flushes our attachments earlier in the process of updating a document.
* Fix fabric2_txids:terminate/2Paul J. Davis2019-07-311-1/+1
|
* Implement attachment compressionPaul J. Davis2019-07-312-39/+77
| | | | | This still holds all attachment data in RAM which we'll have to revisit at some point.
* Remove debug loggingPaul J. Davis2019-07-312-13/+1
|
* Start switching chttpd HTTP endpoints to fabric2Paul J. Davis2019-07-319-256/+1183
| | | | | | This is not an exhaustive port of the entire chttpd API. However, this is enough to support basic CRUD operations far enough that replication works.
* Update ddoc_cache to use fabric2Paul J. Davis2019-07-312-2/+2
|
* Initial test suite for the fabric2 implementationPaul J. Davis2019-07-3112-0/+2116
| | | | | | | | This provides a good bit of code coverage for the new implementation. We'll want to expand this to include relevant tests from the previous fabric test suite along with reading through the various other tests and ensuring that we cover the API as deeply as is appropriate for this layer.