Robert Newson [Thu, 31 Jan 2013 23:18:45 +0000 (23:18 +0000)]
Bump mem3 to 3.2.2
Robert Newson [Thu, 31 Jan 2013 12:53:38 +0000 (12:53 +0000)]
Bump chttpd to 1.4.6
Robert Newson [Wed, 23 Jan 2013 12:25:58 +0000 (12:25 +0000)]
Pin chttpd to 1.4.5
Robert Newson [Fri, 7 Dec 2012 14:04:27 +0000 (14:04 +0000)]
quick fix for badmatch
wohali [Thu, 15 Nov 2012 22:08:47 +0000 (17:08 -0500)]
remove dreyfus
wohali [Thu, 15 Nov 2012 18:20:10 +0000 (13:20 -0500)]
Update couchjs for static build option, eliminate eval()
Robert Newson [Thu, 15 Nov 2012 12:47:56 +0000 (12:47 +0000)]
use chttpd/master during development
Bob Dionne [Thu, 23 Aug 2012 10:06:47 +0000 (06:06 -0400)]
Add twig to path for etap tests
Required to run 030-doc-from-json.t
BugzID: 14419
Conflicts:
Makefile
Robert Newson [Thu, 15 Nov 2012 10:49:05 +0000 (10:49 +0000)]
disable cover
Robert Newson [Thu, 15 Nov 2012 10:35:09 +0000 (10:35 +0000)]
Fix travis build?
Adam Kocoloski [Wed, 16 Mar 2011 21:14:49 +0000 (17:14 -0400)]
Suppress duplicate access logs
Adam Kocoloski [Thu, 10 Mar 2011 16:50:31 +0000 (11:50 -0500)]
Use twig for logging
Conflicts:
apps/couch/include/couch_db.hrl
apps/couch/src/couch_server_sup.erl
rebar.config
rel/reltool.config
Robert Newson [Tue, 4 Sep 2012 23:15:36 +0000 (00:15 +0100)]
Add total_changes to view compaction status
Conflicts:
apps/couch/src/couch_view_compactor.erl
Robert Newson [Tue, 4 Sep 2012 23:00:20 +0000 (00:00 +0100)]
Fix design_document inconsistency
Always report it as "design_document":"_design/foo"
BugzID: 14562
Conflicts:
apps/couch/src/couch_view_compactor.erl
Robert Newson [Wed, 14 Nov 2012 19:32:23 +0000 (19:32 +0000)]
Backport new /_active_tasks API
Improved _active_tasks API
Tasks are now free to set any properties they wish (as an
Erlang proplist). Different tasks can have different properties
and the status string doesn't exist anymore - instead client
applications can build it using more granular properties from
_active_tasks. Some of these properties are:
1) "progress" (an integer percentage, for all tasks)
2) "database" (for compactions and indexer tasks)
3) "design_document" (for indexer and view compaction tasks)
4) "source" and "target" (for replications)
5) "docs_read", "docs_written", "doc_write_failures",
"missing_revs_found", "missing_revs_checked", "source_seq",
"checkpointed_source_seq" and "continuous" for replications
BugzID: 14269
Conflicts:
apps/couch/src/couch_db_updater.erl
apps/couch/src/couch_rep.erl
apps/couch/src/couch_task_status.erl
apps/couch/src/couch_view_compactor.erl
apps/couch/src/couch_view_updater.erl
Adam Kocoloski [Fri, 17 Feb 2012 14:10:52 +0000 (09:10 -0500)]
Don't touch the old couch_lru ets table
It doesn't exist.
BugzID: 13299
Adam Kocoloski [Wed, 13 Jun 2012 16:57:34 +0000 (12:57 -0400)]
Allow 202 as a valid status code
BugzID: 13940
Paul J. Davis [Mon, 28 May 2012 20:14:04 +0000 (15:14 -0500)]
Only close idle processes that have no client
Previously we didn't check if an os_process was in use by a process
before closing it. This ended up generating noproc errors in the
couch_view_updaters which would then spider out to the couch_view_group
processes causing client errors and resetting compaction.
BugzId: 13798
Paul J. Davis [Thu, 9 Feb 2012 21:43:49 +0000 (15:43 -0600)]
Remove the client ref when it dies
We have observed periods of couchjs processes spiking into the hundreds
and thousands for short periods of time since the new couch_proc_manager
was released. Today I happened to catch one in the act and poked at
couch_proc_manager's ets table. There seemed to be a few more couchjs
processes with clients than I would have expected so I skimmed the code
looking for a place where we didn't clear the client value (which would
prevent it from being reused so that it would eventually just timeout).
I found a case where if the Pid that checked out the process dies
without the OS process dying, we were forgetting to clear the client in
the ets table. This patch refactors the two places we return processes
into a single function call which clears the OS process client.
Paul J. Davis [Wed, 18 Jan 2012 21:47:17 +0000 (15:47 -0600)]
Two last bugs in couch_proc_manager
* Design doc languages are converted to lists
* Make sure to monitor every client correctly
Paul J. Davis [Wed, 18 Jan 2012 19:26:14 +0000 (13:26 -0600)]
Use a match_spec() instead of a match_pattern()
I misread the docs on what was expected for ets:select_receive/3.
Paul J. Davis [Mon, 19 Dec 2011 19:39:49 +0000 (13:39 -0600)]
Avoid scanning the entire table of procs
For large numbers of os processes its possible that we have a slowdown
when requesting a new process. The old code matches all possible
processes out of the table to find an appropriate candidate.
We avoid the issue by using ets:select_reverse to also prefer keeping
newer processes and releasing longer lived processes. Length of life is
based on the implicit sorting of pids having newer pids sorting larger.
Adam Kocoloski [Thu, 15 Dec 2011 22:03:47 +0000 (17:03 -0500)]
Mark proc as unused in ret_proc
Otherwise we'll never reuse it
Adam Kocoloski [Sat, 3 Dec 2011 21:34:05 +0000 (16:34 -0500)]
Trigger a GC when OS process is returned
Paul J. Davis [Sat, 3 Dec 2011 19:12:17 +0000 (14:12 -0500)]
Allow processes to idle before exiting
When system load exceeds the ability of os_process_soft_limit to keep
up with demand we enter a fork-use-kill (FUK) cycle. The constant
spawning and destruction os these processes thrashes system resources
and causes general instability.
This patch changes the behavior from killing each process as its
returned to letting it idle for a configurable amount of time (default
five minutes) which allows it to be reused by other clients. This way we
can avoid adding unnecessary load when demand for couchjs processes
exceeds os_process_soft_limit.
As a happy benefit this should also allow os_process_soft_limit to be
set much lower since the number of processes will now more closely
follow actual demand (instead of provisioning for the worst case
scenario).
Conflicts:
apps/couch/src/couch_os_process.erl
apps/couch/src/couch_proc_manager.erl
Conflicts:
apps/couch/src/couch_os_process.erl
Adam Kocoloski [Fri, 2 Dec 2011 21:19:44 +0000 (16:19 -0500)]
Fork new OS processes outside proc_manager loop
Adam Kocoloski [Tue, 7 Feb 2012 03:02:32 +0000 (22:02 -0500)]
Add an index keyed on LRU for faster candidate ID
Our current implementation for closing an LRU DB involves a full scan
of a public ets table. This scan blocks all other activity in
couch_server and can become a serious bottleneck when the LRU cache hit
rate drops too low. In the worst-case all_dbs_active scenario we end up
with O(N**2) algorithmic complexity.
This patch adds a new index keyed on LRU for faster access to the least
recently used databases. It also moves the ets table to a dict on the
couch_server heap. The downside is an increased message rate inbound on
the couch_server, as clients are no longer allowed to update the LRU
data structures without sending a message.
BugzID: 12879
Conflicts:
apps/couch/src/couch_server.erl
Bob Dionne [Tue, 7 Aug 2012 16:56:03 +0000 (12:56 -0400)]
Expose latest=true option in calls to retrieve revisions
When a call is made to retrieve a specific revision, latest=true will
retrieve any descendent leaves instead. This enables the replicator to
better keep up with edits that occur whilst it's retrieving revisions
BugzID: 14241
Adam Kocoloski [Fri, 30 Dec 2011 04:07:06 +0000 (23:07 -0500)]
Skip ddoc pull, use middleman for validation reset
We were pulling a list of design documents and then ignoring the result
when the #db was a partition of a clustered database. Also, the call to
fabric:reset_validation_funs/1 can occasionally cause a stray rexi_EXIT
message to arrive in the db_updater mailbox (and subsequently kill the
server) if a worker fails. I don't think that's desired behavior,
though it's a debatable point. This patch spawns a middleman process to
act as a sink for those stray messages.
BugzID: 13087
Adam Kocoloski [Mon, 31 Jan 2011 02:46:44 +0000 (02:46 +0000)]
Fix spurious declarations of new merge conflicts
This patch also adds extra tests of the key tree merging logic as well
as edoc-formatted documentation for the module and a few of the merge
functions. Closes COUCHDB-902.
Thanks Paul Davis, Bob Dionne, Klaus Trainer.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1065471
13f79535-47bb-0310-9956-
ffa450edef68
Robert Newson [Tue, 18 Oct 2011 14:16:57 +0000 (15:16 +0100)]
Support jsonp in externals.
Allow ?callback= for any external that returns json (i.e,
uses "json":{} instead of "data":"data".
BugzID: 12748
Robert Newson [Wed, 14 Nov 2012 13:22:25 +0000 (13:22 +0000)]
Bump dependencies
Randall Leeds [Sun, 18 Mar 2012 23:00:24 +0000 (16:00 -0700)]
don't delete view groups that fail to open
...but log a message instead. Fixes COUCHDB-1445.
wohali [Wed, 3 Oct 2012 08:48:03 +0000 (04:48 -0400)]
Support multiarch library paths on Linux.
Robert Newson [Tue, 18 Sep 2012 09:45:38 +0000 (10:45 +0100)]
Bump dependencies
Robert Newson [Thu, 9 Aug 2012 13:05:02 +0000 (14:05 +0100)]
Don't always require exactly N replies for an mp attachment PUT
It's not safe to assume we require, or will receive, exactly N replies
(where N is read from the "n" key of the "cluster" section of the
configuaration). This needs proper fabric-ification.
This commit will at least allow replication tests with clusters of
less than N nodes where the documents have attachments (which triggers
the multipart code).
BugzID: 14258
Robert Newson [Wed, 8 Aug 2012 09:07:44 +0000 (10:07 +0100)]
Bump dependencies
Robert Newson [Thu, 2 Aug 2012 15:23:06 +0000 (16:23 +0100)]
Add _replication_stats
Robert Newson [Tue, 19 Jun 2012 15:02:50 +0000 (16:02 +0100)]
Bump couch_replicator to 0.1.2
Robert Newson [Tue, 19 Jun 2012 14:59:16 +0000 (15:59 +0100)]
Don't perform callbacks to couch_replicator
Robert Newson [Mon, 18 Jun 2012 18:38:09 +0000 (19:38 +0100)]
Fix _replicator db
Adam Kocoloski [Tue, 5 Jun 2012 18:19:14 +0000 (14:19 -0400)]
Add a dummy replicate/3 for now
Conflicts:
apps/couch/src/couch_rep.erl
Robert Newson [Mon, 18 Jun 2012 14:05:47 +0000 (15:05 +0100)]
Revert "allow replication callback module to be chosen at runtime."
This reverts commit
faf9071260147275bbac1633b599e85b4a302e8b.
Adam Kocoloski [Sun, 17 Jun 2012 01:12:29 +0000 (21:12 -0400)]
Fix URL for twig
Adam Kocoloski [Sun, 17 Jun 2012 01:08:55 +0000 (21:08 -0400)]
Fix deprecation warnings for port_compiler
Adam Kocoloski [Sun, 17 Jun 2012 00:50:44 +0000 (20:50 -0400)]
Update lots of dependencies
Adam Kocoloski [Sun, 17 Jun 2012 00:50:14 +0000 (20:50 -0400)]
Bump rebar to version 2.0.0
Adam Kocoloski [Wed, 25 Apr 2012 13:27:56 +0000 (06:27 -0700)]
Merge pull request #105 from Asquera/fixes/gentoo-build
Allow building on Gentoo
Felix Gilcher [Tue, 24 Apr 2012 16:15:37 +0000 (18:15 +0200)]
Fix Build for Gentoo
Modify SConscript so that it recognizes the standard name for the
mozjs/spidermonkey lib on gentoo.
Bob Dionne [Tue, 24 Apr 2012 09:09:40 +0000 (05:09 -0400)]
Whitespace
Adam Kocoloski [Tue, 20 Mar 2012 04:52:54 +0000 (00:52 -0400)]
Invoke couch_view_updater with the proper arguments
This fixes stale=update_after.
Robert Newson [Fri, 16 Mar 2012 23:11:03 +0000 (23:11 +0000)]
Enable Travis builds
Robert Newson [Wed, 22 Feb 2012 17:12:22 +0000 (17:12 +0000)]
Merge 0.4.x
Robert Newson [Tue, 31 Jan 2012 21:59:28 +0000 (16:59 -0500)]
Fix previous commit
Paul J. Davis [Tue, 31 Jan 2012 19:34:59 +0000 (14:34 -0500)]
Fix bug in replicator request piplining
A replication with both an HTTP source and target on the same host and
port could end up in a dead lock due to ibrowse replication pipelining
when attachments are present on the source. The ibrowse http worker
would end up forming a multipart/mime body using anonymous reader
functions for attachment stubs. When the attachment stub functions are
executed it is possible that they end up assigned to the same ibrowse
worker.
This is a bit of a long path but then end result is equivalent to
calling gen_server:call(self(), Args, infinity) from a gen_server
callback.
A quick work around for users is to set up a DNA alias (possibly in
/etc/hosts) or to use a combination of hostname and ip address so that
ibrowse assigns the requests to different pools.
Bob Dionne [Fri, 27 Jan 2012 11:29:51 +0000 (06:29 -0500)]
Whitespace
Paul J. Davis [Tue, 24 Jan 2012 09:29:40 +0000 (03:29 -0600)]
Minor bug getting the reduce_limit setting
Paul J. Davis [Tue, 24 Jan 2012 09:29:40 +0000 (03:29 -0600)]
Minor bug getting the reduce_limit setting
Robert Newson [Fri, 20 Jan 2012 19:37:05 +0000 (19:37 +0000)]
Bump dependencies for pre7 release
Robert Newson [Wed, 18 Jan 2012 13:39:37 +0000 (13:39 +0000)]
Revert use of spawn_monitor
As Filipe correctly points out, we want the parent to die if the child dies.
Robert Newson [Tue, 17 Jan 2012 22:33:07 +0000 (22:33 +0000)]
Bump to chttpd 1.4.2
Robert Newson [Tue, 17 Jan 2012 22:16:09 +0000 (14:16 -0800)]
Merge pull request #91 from cloudant/13133-attachment-replication
Fix attachment replication
BugzID: 13133
Robert Newson [Mon, 16 Jan 2012 22:11:20 +0000 (22:11 +0000)]
Only set the process dictionary if exit was ok
Robert Newson [Mon, 16 Jan 2012 19:03:03 +0000 (19:03 +0000)]
Use spawn_monitor to await process completion
BugzID: 13133
Adam Kocoloski [Tue, 10 Jan 2012 20:06:10 +0000 (15:06 -0500)]
Remove superfluous formatting
Adam Kocoloski [Tue, 10 Jan 2012 20:04:16 +0000 (15:04 -0500)]
Remove unused URLs
Adam Kocoloski [Tue, 10 Jan 2012 19:53:17 +0000 (14:53 -0500)]
Bump fabric and chttpd versions
The fabric bump fixes some corner cases for read repair. The chttpd
bump improves error handling for delayed responses.
Paul J. Davis [Tue, 22 Nov 2011 17:52:43 +0000 (11:52 -0600)]
Make cURL a soft dependency
This makes sure that we only optionally require the same version of cURL
that CouchDB does.
Paul J. Davis [Tue, 22 Nov 2011 17:52:43 +0000 (11:52 -0600)]
Make cURL a soft dependency
This makes sure that we only optionally require the same version of cURL
that CouchDB does.
Paul J. Davis [Tue, 6 Dec 2011 16:49:10 +0000 (11:49 -0500)]
Allow CPPPATH to be overriden in the environment
Paul J. Davis [Thu, 1 Dec 2011 16:00:06 +0000 (10:00 -0600)]
Set the stack size for sub contexts
I was forgetting to pass the args through to evalcx so that it could use
the stack size specified on the command line.
Paul J. Davis [Tue, 6 Dec 2011 16:49:10 +0000 (11:49 -0500)]
Allow CPPPATH to be overriden in the environment
Bob Dionne [Fri, 2 Dec 2011 12:35:23 +0000 (07:35 -0500)]
whitespace
Paul J. Davis [Thu, 1 Dec 2011 16:00:06 +0000 (10:00 -0600)]
Set the stack size for sub contexts
I was forgetting to pass the args through to evalcx so that it could use
the stack size specified on the command line.
Bob Dionne [Tue, 22 Nov 2011 16:42:55 +0000 (11:42 -0500)]
Remove unused imports
Paul J. Davis [Wed, 9 Nov 2011 19:41:59 +0000 (13:41 -0600)]
Add check for JS script object type
Paul J. Davis [Wed, 9 Nov 2011 19:41:59 +0000 (13:41 -0600)]
Add check for JS script object type
Adam Kocoloski [Wed, 9 Nov 2011 19:33:46 +0000 (14:33 -0500)]
Bump fabric version and drop the pre1 from release version
Robert Newson [Wed, 9 Nov 2011 13:08:49 +0000 (13:08 +0000)]
Conditionally apply JSON encoding to update_seq values
BigCouch 0.3 cannot parse requests of the form /db/_changes?since="123-foo" so
the recent ?JSON_ENCODE addition to Since in two places causes 0.3 <-> 0.4
replication to fail with json_encode/badterm errors.
This patch applies JSON encoding only when the Since value is not already a
binary (i.e, when it's a [integer(), binary()]) and interop is restored.
BugzID: 12833
Adam Kocoloski [Wed, 9 Nov 2011 19:19:37 +0000 (11:19 -0800)]
Merge pull request #80 from cloudant/12833-conditional_json_encode
Robert Newson [Wed, 9 Nov 2011 13:08:49 +0000 (13:08 +0000)]
Conditionally apply JSON encoding to update_seq values
BigCouch 0.3 cannot parse requests of the form /db/_changes?since="123-foo" so
the recent ?JSON_ENCODE addition to Since in two places causes 0.3 <-> 0.4
replication to fail with json_encode/badterm errors.
This patch applies JSON encoding only when the Since value is not already a
binary (i.e, when it's a [integer(), binary()]) and interop is restored.
BugzID: 12833
Adam Kocoloski [Tue, 8 Nov 2011 16:00:30 +0000 (11:00 -0500)]
Simplify README
Adam Kocoloski [Tue, 8 Nov 2011 16:58:50 +0000 (11:58 -0500)]
Update troubleshooting link
Adam Kocoloski [Tue, 8 Nov 2011 16:00:30 +0000 (11:00 -0500)]
Simplify README
Robert Newson [Wed, 2 Nov 2011 21:04:28 +0000 (21:04 +0000)]
Add a script to create a source tarball
Robert Newson [Mon, 31 Oct 2011 18:36:54 +0000 (18:36 +0000)]
Merge commit '1.1.1' into 0.4.x
Conflicts:
acinclude.m4.in
configure.ac
couchjs/c_src/http.c
src/erlang-oauth/Makefile.am
src/erlang-oauth/oauth.app.in
src/erlang-oauth/oauth_hmac_sha1.erl
src/erlang-oauth/oauth_http.erl
src/erlang-oauth/oauth_plaintext.erl
src/etap/etap_web.erl
Adam Kocoloski [Wed, 26 Oct 2011 18:04:54 +0000 (14:04 -0400)]
Fix retrieval of headers larger than 4k
Our headers start with a <<1>> and then four bytes indicating the length
of the header and its checksum. When the header is larger than 4090
bytes it will be split across multiple blocks in the file and will need
to be reassembled on read. The reassembly consists of stripping out
<<0>> from the beginning of each subsequent block in the
remove_block_prefixes/2 function. The bug here is that we tell
remove_block_prefixes that we're starting 1 byte into the current block
instead of 5, so it ends up removing one good byte from the header and
injecting one or more random <<0>>s.
Headers larger than 4k are very rare and generally require a view group
with a huge number of indexes or indexes with fairly large reductions,
which explains why this bug has gone undetected until now.
Closes COUCHDB-1319.
Adam Kocoloski [Wed, 26 Oct 2011 18:04:54 +0000 (14:04 -0400)]
Fix retrieval of headers larger than 4k
Our headers start with a <<1>> and then four bytes indicating the length
of the header and its checksum. When the header is larger than 4090
bytes it will be split across multiple blocks in the file and will need
to be reassembled on read. The reassembly consists of stripping out
<<0>> from the beginning of each subsequent block in the
remove_block_prefixes/2 function. The bug here is that we tell
remove_block_prefixes that we're starting 1 byte into the current block
instead of 5, so it ends up removing one good byte from the header and
injecting one or more random <<0>>s.
Headers larger than 4k are very rare and generally require a view group
with a huge number of indexes or indexes with fairly large reductions,
which explains why this bug has gone undetected until now.
Closes COUCHDB-1319.
Paul J. Davis [Mon, 24 Oct 2011 20:07:57 +0000 (15:07 -0500)]
Fix SpiderMonkey source evaluation
Looks like we had a couple commits get crossed over during the merges.
This removes the original version of the patch that wrapped JS functions
with parens.
Paul J. Davis [Mon, 24 Oct 2011 20:07:57 +0000 (15:07 -0500)]
Fix SpiderMonkey source evaluation
Looks like we had a couple commits get crossed over during the merges.
This removes the original version of the patch that wrapped JS functions
with parens.
Paul Joseph Davis [Sun, 23 Oct 2011 17:27:35 +0000 (12:27 -0500)]
Hardcode couchjs binary name
Windows doesn't have the libgen.h header or an easily identified
basename function. Instead of playing games we just configure the name
with autoconf and run with that.
Robert Newson [Thu, 20 Oct 2011 17:03:46 +0000 (18:03 +0100)]
Fix object sealing with spidermonkey 1.7.0
Robert Newson [Thu, 20 Oct 2011 17:03:46 +0000 (18:03 +0100)]
Fix object sealing with spidermonkey 1.7.0
Filipe David Manana [Thu, 20 Oct 2011 16:55:58 +0000 (17:55 +0100)]
Update CHANGES and NEWS to reflect COUCHDB-1129
Paul Joseph Davis [Thu, 20 Oct 2011 16:40:25 +0000 (11:40 -0500)]
Fix JavaScript CLI test runner.
Accidentally inverted the logic of a test when patching for newer
versions of SpiderMonkey.
Robert Newson [Thu, 20 Oct 2011 16:25:25 +0000 (17:25 +0100)]
Fix object sealing on sm 1.7.0
Robert Newson [Wed, 19 Oct 2011 11:57:25 +0000 (12:57 +0100)]
mention 1.8.5 support in NEWS/CHANGES
Adam Kocoloski [Wed, 19 Oct 2011 00:30:10 +0000 (20:30 -0400)]
Revert "Build couchjs with C, not C++. Fixes libm error on CentOS."
This reverts commit
6b26f47e8287b2d1c1d7b74199647dec2e7c2bef.
Turns out the 'libm' error is a very obscure way of reporting a lack
of a C++ compiler.
Paul Joseph Davis [Tue, 18 Oct 2011 21:19:51 +0000 (16:19 -0500)]
Minor fixes to link agianst SpiderMonkey trunk
This patch allows couchjs to link against the SpiderMonkey as it existed
in the mercurial hash
59c1e6bdb11 from [1]. This does *not* ensure
compatibility with CouchDB as there are other things that will also need
to be fixed. Specifically, the anonymous function issue for builtin JS
functions.
[1] http://hg.mozilla.org/mozilla-central/
Paul Joseph Davis [Tue, 18 Oct 2011 21:18:01 +0000 (16:18 -0500)]
Prevent linking against too new of a SpiderMonkey
Versions of SpiderMonkey newer than js185-1.0.0 have removed the
JSOPTION_ANONFUNFIX which basically invalidates all CouchDB JavaScript
functions ever written.
This configure patch prevents the accidental linking to a library that
has this new behavior while allowing people to forcefully override the
check.