| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| | |
I couldn’t find a cleaner way to add _bulk_docs with
`new_edits: false`.
|
| |
| |
| |
| |
| |
| | |
This allows for using Mango queries for finding docs with conflicts.
Closes #1101
|
| | |
|
| | |
|
| |
| |
| |
| | |
Complete deletion tests with not found
|
|/
|
|
|
|
|
|
|
|
|
| |
Previously on view compaction, the new index state would not carry
over the associated database update sequence. As a result, views
who were compacted at least once could no longer use the ?update_seq
query option.
We also copy over purge_seq and options.
Closes #984
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the aebdbc452573f70f4e50d88af5814d0fbe936333 stemming is done separately
from merge so stem interactive option didn't take effect. That is mostly ok as
speed improvements should reduce the need for that option, but it still might
be nice to keep the option (just in case).
Also, a nice side effect is it removes an extra external function from
couch_key_tree module and simplifies the tests a bit.
Related PR: #958
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
When we delete files with context option set to `delete`,
`couch_file` respects configuration flag "enable_database_recovery"
and just renames the files in case it's set to true.
This change removes context for compaction files deleted
during database deletion to make sure we are actually
erasing them and not just renaming and leaving behind.
|
|\
| |
| | |
Fix for a function_clause crash in the couch_native_process for Erlang views
|
| | |
|
|/
|
|
| |
Crash was caused by a missing implementation of ddoc function for <<"views">> FunPath, implementation is based on FilterFun but matches return values of the erlang:put() which is called in the native Emit function and also expects ok and false when docs were not emitted.
|
|
|
|
| |
Thanks to Just Some Enterprises for donating the compute power!
|
| |
|
|
|
|
| |
Issue #1396
|
|
|
|
|
|
|
|
| |
This moves the sort check into the is_usable function for all indexes.
For map/reduce indexes it can add any constant fields e.g {a: {"$eq": 4}
to the prefix of the sort because it won't affect the actual sort but
will increase the chance that an index is selected. This is a user
experience fix to help a user if they don't add all the columns for an
index to the sort fields.
|
|
|
|
|
|
|
|
|
|
|
| |
Passing closures around is fragile and prevents smooth upgrading. Instead pass
a tuple with a data from the receiver closure explicitly and convert to back to
a local fun locally on each node.
This is a preparatory commit before the switch. To ensure attachment uploading
requests are successful, would need to first install this change on all the
nodes. Then in a separate upgrade step, switch fabric.erl to call
fabric_doc_atts:receiver instead fabric_doc_attatchments:recevier.
|
|
|
|
| |
Previously, when we fail authorization but pass authentication, we use
the old HttpReq which drops user_ctx. This change leaves user_ctx.
|
|
|
|
|
|
| |
This uses the new `couch_util:set_mqd_off_heap/0` function to set
message queues to off_heap for some of our critical processes that
receive a significant amount of load in terms of message volume.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Erlang VMs starting with version 19.0 have a new process_flag to
store messages off the process heap. This is extremely useful for
processes that can have huge numbers of messages in their mailbox. For
CouchDB this is most usually observed when couch_server backs up with a
large message queue which wedges the entire node.
This utility function will set a process's message_queue_data flag to
off_heap in a way that doesn't break builds of CouchDB on older Erlang
VMs while automatically enabling the flag on VMs that do support it.
|
|
|
|
|
|
|
|
|
|
| |
The `should_merge_tree_to_itself` and `should_merge_tree_of_odd_length`
tests were both invalid as merging does not support merging of anything
other than a linear path. This failure was covered up by the fact that
the stem operation will detect and cover up any errors from a failed
merge.
Co-Authored-By: Nick Vatamaniuc <vatamane@apache.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is two related optimizations for stemming revisions. The first
optimization re-writes the stemming algorithm to drop it from an O(N^2)
to O(N) operation by using a depth first search through the tree and
tracking which revisions are within `revs_limit` revs from a leaf
dropping any revision that exceeds that limit.
The second optimization is just that we avoid calling stemming more
often than necessary by switching away from using `merge/3` to `merge/2`
and then calling `stem/2` only when necessary.
Co-Authored-By: Nick Vatamaniuc <vatamane@apache.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was brought to my attention that the active size looked a bit funny
occasionally as it could be larger than the file size. Given that active
size is defined to be the number of bytes used in a view file it must be
strictly greater than or equal to zero as well as less than or equal to
file size. Thus the great hunt had begun!
While I'd love more than anything to regail you, Dear Reader, with the
tales, the joys, the highs, and yes, even the lows of this search, it
turns out that I cannot. I must not. For there were none!
Turns out this was a trivial bug where we were re-using the ExternalSize
calculation instead of applying `couch_btree:size/1` to all of the
btrees in the `#mrview` records. Simple bug comes with a correspondingly
simple fix.
I also noticed that the info tests were broken and not being run so I
spent a few minutes cleaning those up to make the various assumptions.
|
|\
| |
| | |
Add compile's command line options, introduce `ERL_OPTS` and make `bin_opt_info` optional.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Flag `debug_info` auto-propagated from rebar,
so there are no need to set it manually or we'll
end up with a double entry in opts.
|
| |
| |
| |
| |
| |
| | |
Allow to compile a specified list of apps.
Fix for eunit's OPTS regexp on systems
with sed withouth GNU extension (i.e MacOS)
|
|/
|
|
| |
This reverts commit b58021e6d9751fa36a4164974664e86248d444fd.
|
| |
|
| |
|
| |
|
|
|
|
| |
What a kooky idea, but I guess we're committed to it.
|
|
|
|
|
|
| |
Rather than packing the stats into an ejson object on each write
we use a more compact tuple format on disk and then turn it into
ejson at query time.
|
|
|
|
|
| |
If we're in a cluster, finalization runs at the coordinator. Otherwise,
couch_mrview can run it directly to simplify things for consumers.
|
|
|
|
|
|
| |
Releases and dialyzer checks need app dependencies to work properly
Issue: #1346
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new builtin reduce function, which uses a HyperLogLog
algorithm to estimate the number of distinct keys in the view index. The
precision is currently fixed to 2^11 observables andtherefore uses
approximately 1.5 KB of memory.
It also introduces a finalize step which can be used to improve the
efficiency of other builtin reduce functions going forward.
Closes COUCHDB-2971
|
|
|
|
|
|
| |
* Newly provisioned images
* Add ubuntu bionic (18.04) support
* Add our own couch-js/couch-libmozjs185 pkgs to rolling repo build
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mango requires that a JSON index can only be used to fulfil
a query if the "selector" field covers all of the fields the
index. For example, if an index contains ["a", "b"] but the
selector only requires field ["a"] to exist in the matching documents,
the index would not be valid for the query (because it only includes
documents containing both "a" and "b").
There is a special case here around built-in fields; _id and _rev
specifically, because they are guaranteed to exist in any matching
documents.
If a user declares an index ["a", "_id"], we can safely exclude "_id"
from the index coverage check, so a selector of {"a": "foo"} should be
able to use this index.
Prior to this commit, a user would have to alter the selector so that
it covered the "_id" field, e.g. {"a": "foo",
"_id": {"$exists": true}}. The commit removes the need to explicitly
cover _id or _rev fields in the query selector.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This was introduced in:
https://github.com/apache/couchdb/commit/083239353e919e897b97e8a96ee07cb42ca4eccd
Issue #1286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The changes listener started in setup of mem3_shards test
was crashing when tried to register on unstarted couch_event
server, so the test was either fast enough to do assertions
before of that or failed on dead listener process.
This change removes dependency on mocking and uses
a standard test_util's star and stop of couch. Module start
moved into the test body to avoid masking potential failure
in a setup.
Also the tests mem3_sync_security_test and mem3_util_test
been modified to avoid setup and teardown side effects.
|
| |
|