couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject couch-mrview commit: updated refs/heads/master to 2341c38
Date Mon, 11 Jan 2016 14:41:37 GMT
Repository: couchdb-couch-mrview
Updated Branches:
  refs/heads/master 6c9833d66 -> 2341c38c6


Remove duplicated monitor set on index opening

When mrview index is opening it adds monitor on couch_file server
of the index file. This is not necessary because couch_mrview_util's
init_state called before already does that, so we are ending up
with duplicated monitor reference.


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

Branch: refs/heads/master
Commit: 2341c38c66c471d01b50972fb2e5b02c091b8bec
Parents: 6c9833d
Author: Eric Avdey <eiri@eiri.ca>
Authored: Fri Jan 8 15:24:57 2016 -0400
Committer: Eric Avdey <eiri@eiri.ca>
Committed: Fri Jan 8 15:24:57 2016 -0400

----------------------------------------------------------------------
 src/couch_mrview_index.erl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/2341c38c/src/couch_mrview_index.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_index.erl b/src/couch_mrview_index.erl
index 7113bb1..95698bc 100644
--- a/src/couch_mrview_index.erl
+++ b/src/couch_mrview_index.erl
@@ -134,15 +134,15 @@ open(Db, State) ->
                 {ok, {OldSig, Header}} ->
                     % Matching view signatures.
                     NewSt = couch_mrview_util:init_state(Db, Fd, State, Header),
-                    {ok, NewSt#mrst{fd_monitor=erlang:monitor(process, Fd)}};
+                    {ok, NewSt};
                 % end of upgrade code for <= 1.2.x
                 {ok, {Sig, Header}} ->
                     % Matching view signatures.
                     NewSt = couch_mrview_util:init_state(Db, Fd, State, Header),
-                    {ok, NewSt#mrst{fd_monitor=erlang:monitor(process, Fd)}};
+                    {ok, NewSt};
                 _ ->
                     NewSt = couch_mrview_util:reset_index(Db, Fd, State),
-                    {ok, NewSt#mrst{fd_monitor=erlang:monitor(process, Fd)}}
+                    {ok, NewSt}
             end;
         {error, Reason} = Error ->
             couch_log:error("Failed to open view file '~s': ~s",


Mime
View raw message