summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobert Newson <robert.newson@cloudant.com>2012-02-22 17:12:22 +0000
committerRobert Newson <robert.newson@cloudant.com>2012-02-22 17:13:21 +0000
commit986c86bf4355ea2b772e141d008efd1894b7df30 (patch)
tree22546c27d8ccacd0775266423217ef91c06013c6 /apps
parentf5913f7f4d59e8aee16468325497caf33894d3a3 (diff)
parentdb23528537fed7b9b0e85d3f3617f560cb52d630 (diff)
Merge 0.4.x
Diffstat (limited to 'apps')
-rw-r--r--apps/couch/CHANGES4
-rw-r--r--apps/couch/NEWS4
-rw-r--r--apps/couch/src/couch_rep_writer.erl19
3 files changed, 16 insertions, 11 deletions
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.