| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When a JS test requested a restart server we would wip the current log
file. This makes it hard to debug failing tests occasionally when they
happen just after a restart. This change prevents just opens log files
in read/write mode specifically when a test requests a server restart.
The current behavior for interactive use of `dev/run` will continue to
truncate log files on startup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
max_document_size currently checks document sizes based on Erlang's external
term size of the jiffy-decoded document body. This makes sense because that's
what used to store the data on disk and it's what manipulated by the CouchDB
internals.
However erlang term size is not always a good approximation of the size of json
encoded data. Sometimes it can be way off (I've seen 30% off) and It's hard for
users to estimate or check the external term size beforehand. So for example if
max_document_size is 1MB, CouchDB might reject user's 600KB json document
because Erlang's external term size of that document greater than 1MB.
To fix the issue provide a module which calculates the encoded size of a json
document. The size calculation approximates as well, since there is no
canonical json size as it depends on the encoder used.
Issue #659
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the compaction daemon cannot calculate the free space
for a volume, do not crash CouchDB. Instead, log a warning
that free space could not be calculated and continue.
Compaction of the database is not necessarily prevented -
just that the disk space for this specific volume
won't be taken into account when deciding whether
to automatically compact or not.
This is primarily to cope with edge cases arising from
ERL-343, whereby disksup:get_disk_data() returns invalid
paths for volumes containing whitespace.
Fixes #732
|
| |
|
|
|
|
|
|
| |
Fixes a regression where a 500 status code was returned when
no index is available to service a _find query because the
sort order does not match any available indexes.
|
|
|
|
|
|
| |
The assertion functions inherited from unittest
provide clearer errors when tests fail - use these
in preference to plain assert.
|
|
|
|
|
|
| |
Replace use of native assert with unittest.assertX.
This ensures we return descriptive errors when assertions
fail.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, index selection for a given query
was run twice for each request - once to add
a warning in case a full database scan would be
performed and then again when the query was executed.
This moves the warning generation so that it occurs
at the end of the query processing and we can use
the existing index context to decide whether to
add a warning or not.
Whilst only a minor optimisation (which also assumes
we don't have cached query plans etc), it
at least moves index selection to where you'd expect
it to happen (query planning).
|
|
|
|
|
|
|
|
|
|
|
|
| |
* add operator tests for text indexes
* add operator tests for _all_docs
* add tests for null and range handling
Tests consistent behaviour for handling null values
and range queries between different index types
(_all_docs, json indexes and text indexes).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently CouchDB has configurable single document body size limits, as well as
http request body limits, and this commit implements attachment size limit.
Maximum attachment size can be configured with:
```
[couchdb]
max_attachment_size = Bytes | infinity
```
`infinity` (i.e. no maximum) is the default value it also preserves the current
behavior.
Fixes #769
|
|
|
|
|
|
|
|
|
| |
Previously only `views` sections could have a `lib` object. But some users
might choose to have a library for filters for example.
This makes it agree with this section of the wiki:
https://wiki.apache.org/couchdb/CommonJS_Modules
|
|
|
|
| |
Clarify behaviour for null / missing fields. Convert tests
to unittest assertions for clearer errors.
|
| |
|
|\
| |
| | |
include mrview options in _explain result
|
|/
|
|
|
|
|
| |
_explain previously returned the options passed in by the user but
not those modified at execution time by Mango. Now we include
index-specific options (mrargs for map/reduce indexes) in the output,
allowing us to see e.g. when include_docs was used.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Accept an "execution_stats" parameter to _find. If present, return
a new "execution_stats" object in the response which contains
information about the query executed. Currently, this is only
implemented for json/all_docs indexes and contains:
- total keys examined (currently always 0 for json indexes)
- total documents examined (when include_docs=true used)
- total quorum documents examined (when fabric doc lookups used)
|