| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the latest erlfdb release v1.1.0 we have the ability to set default
transaction options on the database handle. Once set, those are inherited by
every transaction started from that handle.
Use this feature to give advanced users a way to experiment with various
transaction options. Descriptions of those options in the default.ini file have
been mostly a copy and paste from the fdb_c_option.g.h file from the client
library.
In addition, specify some safer default values for transaction timeouts (1min)
and retry limit (100). These quite conservative and are basically something
less that "infinity". In the future these may be adjusted lower.
|
|
|
|
| |
https://github.com/apache/couchdb-erlfdb/releases/tag/v1.1.0
|
|
|
|
|
|
|
|
| |
Adds a fold_docs function that will do a parallel fetch for the supplied
Doc Ids. This is used for _all_docs?keys=["id1", "id2"].
This uses a queue for fetching the revs and another queue for fetching
the doc bodies. These queues will be drained if the future queue gets
to large.
|
|
|
|
|
| |
Use a common `get_revs_future` and `get_revs_wait` for fetching
winning revs and all revs.
|
| |
|
|\
| |
| | |
Fix typo in error message
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, transactions are used to check metadata, and possibly
reopen the db, to get a current db handle. However, if a `max_age`
option is provided and db handle was checked less than `max_age`
milliseconds ago, use properties from that cached handle instead.
The main use of this feature be in pluggable authorization handlers
where it might be necessary to inspect the security doc multiple times
for the same request before a final decision is made.
`revs_limit/1` was updated as well, mainly for consistency since it is
almost identical to `get_security/1`.
|
|\
| |
| | |
Merge keys from rebar.config
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change allows creation of local `src/couch/rebar.config` and `rebar.config`
files to set additional configuration options. This is useful for:
- disabling deprecation warnings `{nowarn_deprecated_function, MFAs}`
- control debugging in eunit tests
- `DEBUG` - `{eunit_compile_opts, [{d, DEBUG, true}]}`
- `NODEBUG` - `{eunit_compile_opts, [{d, NODEBUG, true}]}`
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When an existing key is inserted with different timestamps, the primary
key is the same but the primary value is different from the existing one.
Currently, this results in a new expiry key being inserted, but the old
one is not deleted and lingers until it is removed by the inexorable
advance of time via the `remove_expired` server messages.
This checks whether there's already primary key for the inserted key,
and if so, cleans up the existing expiry key before proceeding with the
insert.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Rename `clear_expired_range` to `clear_range_to`
- Move `EXPIRING_CACHE` layer prefix into fabric2.hrl
- Move primary key setting to just after key & value calculations
- Factor out `get_val/2` to lookup a key from FDB and unpack the value
- Factor out `prefixes/2`
- Factor out `fold_range/5`
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* report changes stats intermittently with boolean market
Stats are reported at the end of a request. With changes feeds,
sometimes the request can be long or forever. This commit allows
stats to be reported intermittently via a configurable time in seconds.
The report function can return a boolean whether stats was reported
so that a reset may not necessarily be needed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, the size of binary chunks used for values is fixed at the FDB
imposed limit of 100kB, although they recommend using 10KB [1], (also
note they subtly change units).
This makes that value configurable, allowing e.g. benchmarks to compare
performance of runs with varying chunk size. The cost is a ~10µs config
lookup penalty each time data needs to be chunked.
[1] https://www.foundationdb.org/files/record-layer-paper.pdf
|
|\ \
| |/
|/|
| |
| | |
Integrate emilio - erang linter
Merging it on the grounds of CI pass and +1 in the original PR.
|
|/ |
|
|
|
|
| |
Add tests for view cleanup.
|
|
|
|
|
| |
If a client notices that a job has failed we restart it. If a job failed
for a different design document id then we resubmit the build request.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Each registered index type can now get a signal on when to clean up
their indexes.
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
The defaults commented out in `default.ini` did not match the names used
in `fabric2_index.erl`.
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Fix incorrect usage of couch_epi in mango plugin
|
|/
|
|
|
| |
Previously we used the value returned from couch_epi apply as is.
However it returns a list of arguments passed in the same order.
|
|
|
|
|
|
|
|
| |
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 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.
|
|\
| |
| | |
Prototype/fdb layer mango plugin
|
|/
|
|
|
|
| |
Implement the following extention points:
- `before_find(Req) -> {ok, Req}`
- `after_find(Req, HttpResp, KVs) -> {ok, KVs}`
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
soft-deletion for database
|
| |
| |
| |
| | |
Co-Authored-By: Paul J. Davis <paul.joseph.davis@gmail.com>
|
|/
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
It should only be allowed if explicitly configured. Previously we did not
propertly match on the database name and effectively always allowed it.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Clean up unused mango_utils functions.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Removing quorum stats since they are not relevant with FDB.
|