couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikewall...@apache.org
Subject [3/4] couch commit: updated refs/heads/2365-fix-failed-multipart-process-leak to f02a101
Date Wed, 29 Oct 2014 23:19:58 GMT
Remove couch_query_servers:map_docs/2

It's not being used since couch_mrview introduction which provides own
couch_mrview_updater:map_docs/2 and actually uses it instead.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/40c5c85d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/40c5c85d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/40c5c85d

Branch: refs/heads/2365-fix-failed-multipart-process-leak
Commit: 40c5c85d3bf60c73f28389394058ec1f27207335
Parents: c6c3c1e
Author: Alexander Shorin <kxepal@apache.org>
Authored: Mon Oct 13 23:54:44 2014 +0400
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Mon Oct 13 23:54:44 2014 +0400

----------------------------------------------------------------------
 src/couch_query_servers.erl | 25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/40c5c85d/src/couch_query_servers.erl
----------------------------------------------------------------------
diff --git a/src/couch_query_servers.erl b/src/couch_query_servers.erl
index 13b0b91..d38f040 100644
--- a/src/couch_query_servers.erl
+++ b/src/couch_query_servers.erl
@@ -13,7 +13,7 @@
 -module(couch_query_servers).
 
 -export([try_compile/4]).
--export([start_doc_map/3, map_docs/2, map_doc_raw/2, stop_doc_map/1, raw_to_ejson/1]).
+-export([start_doc_map/3, map_doc_raw/2, stop_doc_map/1, raw_to_ejson/1]).
 -export([reduce/3, rereduce/3,validate_doc_update/5]).
 -export([filter_docs/5]).
 -export([filter_view/3]).
@@ -56,29 +56,6 @@ start_doc_map(Lang, Functions, Lib) ->
     end, Functions),
     {ok, Proc}.
 
-map_docs(Proc, Docs) ->
-    % send the documents
-    Results = lists:map(
-        fun(Doc) ->
-            Json = couch_doc:to_json_obj(Doc, []),
-
-            FunsResults = proc_prompt(Proc, [<<"map_doc">>, Json]),
-            % the results are a json array of function map yields like this:
-            % [FunResults1, FunResults2 ...]
-            % where funresults is are json arrays of key value pairs:
-            % [[Key1, Value1], [Key2, Value2]]
-            % Convert the key, value pairs to tuples like
-            % [{Key1, Value1}, {Key2, Value2}]
-            lists:map(
-                fun(FunRs) ->
-                    [list_to_tuple(FunResult) || FunResult <- FunRs]
-                end,
-            FunsResults)
-        end,
-        Docs),
-    couch_stats:increment_counter([couchdb, couchjs, map_doc], length(Docs)),
-    {ok, Results}.
-
 map_doc_raw(Proc, Doc) ->
     Json = couch_doc:to_json_obj(Doc, []),
     {ok, proc_prompt_raw(Proc, [<<"map_doc">>, Json])}.


Mime
View raw message