diff options
author | Robert Newson <robert.newson@cloudant.com> | 2012-02-22 17:12:22 +0000 |
---|---|---|
committer | Robert Newson <robert.newson@cloudant.com> | 2012-02-22 17:13:21 +0000 |
commit | 986c86bf4355ea2b772e141d008efd1894b7df30 (patch) | |
tree | 22546c27d8ccacd0775266423217ef91c06013c6 | |
parent | f5913f7f4d59e8aee16468325497caf33894d3a3 (diff) | |
parent | db23528537fed7b9b0e85d3f3617f560cb52d630 (diff) |
Merge 0.4.x
-rw-r--r-- | README.md | 6 | ||||
-rw-r--r-- | apps/couch/CHANGES | 4 | ||||
-rw-r--r-- | apps/couch/NEWS | 4 | ||||
-rw-r--r-- | apps/couch/src/couch_rep_writer.erl | 19 | ||||
-rw-r--r-- | couchjs/c_src/help.h | 2 | ||||
-rw-r--r-- | couchjs/c_src/http.c | 12 | ||||
-rw-r--r-- | couchjs/c_src/sm185.c | 2 | ||||
-rwxr-xr-x | make_tarball | 20 | ||||
-rw-r--r-- | rebar.config | 14 | ||||
-rw-r--r-- | rel/reltool.config | 2 |
10 files changed, 52 insertions, 33 deletions
@@ -15,7 +15,6 @@ used for read/write operations. BigCouch is made available under an Apache 2.0 license. See the LICENSE file for details. - ## Getting Started If your main intent is to use BigCouch, you can follow [this @@ -27,7 +26,6 @@ More information can be found on the official [BigCouch website](http://bigcouch.cloudant.com/). You can also ask questions on or subscribe to [the mailing list](http://groups.google.com/group/bigcouch-user). - ## Troubleshooting Please see http://bigcouch.cloudant.com/troubleshoot @@ -37,10 +35,6 @@ Please see http://bigcouch.cloudant.com/troubleshoot Cloudant folks are usually hanging out in IRC. Freenode, channel #cloudant. There's also a [Google Group](http://groups.google.com/group/bigcouch-user). ----- - [1]: http://couchdb.apache.org [2]: http://cloudant.com -[3]: http://haproxy.1wt.eu/ [4]: http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html -[5]: https://github.com/cloudant/bigcouch/wiki/API-Extensions diff --git a/apps/couch/CHANGES b/apps/couch/CHANGES index 0c619ab9..8e89305f 100644 --- a/apps/couch/CHANGES +++ b/apps/couch/CHANGES @@ -4,8 +4,7 @@ Apache CouchDB CHANGES Version 1.1.1 ------------- -This version has not been released yet. - +* Support SpiderMonkey 1.8.5 * Add configurable maximum to the number of bytes returned by _log. * Allow CommonJS modules to be an empty string. * Bump minimum Erlang version to R13B02. @@ -29,6 +28,7 @@ This version has not been released yet. * Fix replication crash when source database has a document with empty ID. * Fix deadlock when assigning couchjs processes to serve requests. * Fixes to the document multipart PUT API. +* Fixes regarding file descriptor leaks for databases with views. Version 1.1.0 ------------- diff --git a/apps/couch/NEWS b/apps/couch/NEWS index 13e6ac56..e62289ed 100644 --- a/apps/couch/NEWS +++ b/apps/couch/NEWS @@ -10,8 +10,7 @@ Each release section notes when backwards incompatible changes have been made. Version 1.1.1 ------------- -This version has not been released yet. - +* Support SpiderMonkey 1.8.5 * Add configurable maximum to the number of bytes returned by _log. * Allow CommonJS modules to be an empty string. * Bump minimum Erlang version to R13B02. @@ -35,6 +34,7 @@ This version has not been released yet. * Fix replication crash when source database has a document with empty ID. * Fix deadlock when assigning couchjs processes to serve requests. * Fixes to the document multipart PUT API. +* Fixes regarding file descriptor leaks for databases with views. Version 1.1.0 ------------- diff --git a/apps/couch/src/couch_rep_writer.erl b/apps/couch/src/couch_rep_writer.erl index 40323925..cea4408e 100644 --- a/apps/couch/src/couch_rep_writer.erl +++ b/apps/couch/src/couch_rep_writer.erl @@ -126,13 +126,18 @@ write_multi_part_doc(#http_db{headers=Headers} = Db, #doc{atts=Atts} = Doc) -> {"Content-Length", Len} | Headers ] }, - Result = case couch_rep_httpc:request(Request) of - {[{<<"error">>, Error}, {<<"reason">>, Reason}]} -> - {Pos, [RevId | _]} = Doc#doc.revs, - ErrId = couch_util:to_existing_atom(Error), - [{Doc#doc.id, couch_doc:rev_to_str({Pos, RevId})}, {ErrId, Reason}]; - _ -> - [] + Conn = couch_rep_httpc:spawn_link_worker_process(Request), + Result = try + case couch_rep_httpc:request(Request#http_db{conn=Conn}) of + {[{<<"error">>, Error}, {<<"reason">>, Reason}]} -> + {Pos, [RevId | _]} = Doc#doc.revs, + ErrId = couch_util:to_existing_atom(Error), + [{Doc#doc.id, couch_doc:rev_to_str({Pos, RevId})}, {ErrId, Reason}]; + _ -> + [] + end + after + ibrowse:stop_worker_process(Conn) end, StreamerPid ! stop, Result. diff --git a/couchjs/c_src/help.h b/couchjs/c_src/help.h index 84c83c06..c42c9f59 100644 --- a/couchjs/c_src/help.h +++ b/couchjs/c_src/help.h @@ -51,7 +51,7 @@ static const char USAGE_TEMPLATE[] = " -H enable %s cURL bindings (only avaiable\n" " if package was built with cURL available)\n" " -S SIZE specify that the interpreter should set the\n" - " the stack quota for JS contexts to SIZE bytes\n" + " stack quota for JS contexts to SIZE bytes\n" "\n" "Report bugs at <%s>.\n"; diff --git a/couchjs/c_src/http.c b/couchjs/c_src/http.c index aa21515c..44df3a33 100644 --- a/couchjs/c_src/http.c +++ b/couchjs/c_src/http.c @@ -181,7 +181,7 @@ http_open(JSContext* cx, JSObject* req, jsval mth, jsval url, jsval snc) goto done; } - if(mth == JSVAL_VOID) { + if(JSVAL_IS_VOID(mth)) { JS_ReportError(cx, "You must specify a method."); goto done; } @@ -203,7 +203,7 @@ http_open(JSContext* cx, JSObject* req, jsval mth, jsval url, jsval snc) http->method = methid; - if(url == JSVAL_VOID) { + if(JSVAL_IS_VOID(url)) { JS_ReportError(cx, "You must specify a URL."); goto done; } @@ -219,7 +219,7 @@ http_open(JSContext* cx, JSObject* req, jsval mth, jsval url, jsval snc) goto done; } - if(snc != JSVAL_FALSE) { + if(JSVAL_IS_BOOLEAN(snc) && JSVAL_TO_BOOLEAN(snc)) { JS_ReportError(cx, "Synchronous flag must be false."); goto done; } @@ -255,7 +255,7 @@ http_set_hdr(JSContext* cx, JSObject* req, jsval name, jsval val) goto done; } - if(name == JSVAL_VOID) + if(JSVAL_IS_VOID(name)) { JS_ReportError(cx, "You must speciy a header name."); goto done; @@ -268,7 +268,7 @@ http_set_hdr(JSContext* cx, JSObject* req, jsval name, jsval val) goto done; } - if(val == JSVAL_VOID) + if(JSVAL_IS_VOID(val)) { JS_ReportError(cx, "You must specify a header value."); goto done; @@ -313,7 +313,7 @@ http_send(JSContext* cx, JSObject* req, jsval body) goto done; } - if(body != JSVAL_VOID && body != JS_GetEmptyStringValue(cx)) { + if(!JSVAL_IS_VOID(body)) { bodystr = enc_string(cx, body, &bodylen); if(!bodystr) { JS_ReportError(cx, "Failed to encode body."); diff --git a/couchjs/c_src/sm185.c b/couchjs/c_src/sm185.c index dd7dbb61..ecca4c8b 100644 --- a/couchjs/c_src/sm185.c +++ b/couchjs/c_src/sm185.c @@ -312,7 +312,7 @@ main(int argc, const char* argv[]) JSObject* global = NULL; JSCrossCompartmentCall *call = NULL; JSObject* klass = NULL; - JSObject* script; + JSSCRIPT_TYPE script; JSString* scriptsrc; const jschar* schars; size_t slen; diff --git a/make_tarball b/make_tarball new file mode 100755 index 00000000..6b13c5fc --- /dev/null +++ b/make_tarball @@ -0,0 +1,20 @@ +#!/bin/sh -e + +COUCHDB_VERSION=`git describe --match 1.*` +BIGCOUCH_VERSION=`git describe` + +rm -rf .tmp +git archive HEAD --prefix=.tmp/bigcouch/ | tar xf - +pushd .tmp/bigcouch +git init +git add --all +git commit -m "Tarball commit" +git tag -m "CouchDB version" "$COUCHDB_VERSION" +echo "This is the release tarball for $BIGCOUCH_VERSION" > BUILD +git add BUILD +git commit -am "Tarball commit" +git tag -m "BigCouch version" "$BIGCOUCH_VERSION" +popd + +tar czf $BIGCOUCH_VERSION.tar.gz -C .tmp bigcouch +rm -rf .tmp diff --git a/rebar.config b/rebar.config index 6fb5113f..6b49e107 100644 --- a/rebar.config +++ b/rebar.config @@ -14,19 +14,19 @@ {deps, [ {oauth, ".*", {git, "https://github.com/cloudant/erlang-oauth.git", - {branch, "couch"}}}, + {tag, "BigCouch-0.4.0"}}}, {ibrowse, ".*", {git, "https://github.com/cloudant/ibrowse.git", - {branch, "couch_1.1"}}}, + {tag, "CouchDB-1.1.0"}}}, {mochiweb, ".*", {git, "https://github.com/cloudant/mochiweb.git", - {branch, "couch_1.1"}}}, + {tag, "CouchDB-1.1.0"}}}, {rexi, ".*", {git, "https://github.com/cloudant/rexi.git", - master}}, + {tag, "1.5.5"}}}, {fabric, ".*", {git, "https://github.com/cloudant/fabric.git", - master}}, + {tag, "2.0.4"}}}, {mem3, ".*", {git, "https://github.com/cloudant/mem3.git", - master}}, + {tag, "2.0.0"}}}, {chttpd, ".*", {git, "https://github.com/cloudant/chttpd.git", - master}} + {tag, "1.4.3"}}} ]}. % needed for a clean transition to the deps model {clean_files, [ diff --git a/rel/reltool.config b/rel/reltool.config index ccca5aed..4486c1d5 100644 --- a/rel/reltool.config +++ b/rel/reltool.config @@ -14,7 +14,7 @@ {sys, [ {lib_dirs, ["../apps", "../deps"]}, - {rel, "bigcouch", "0.4a", [ + {rel, "bigcouch", "0.4.0", [ kernel, stdlib, sasl, |