couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [9/9] couch-mrview commit: updated refs/heads/master to 4cc8114
Date Thu, 28 Aug 2014 12:12:58 GMT
Monitor the newly compacted view file


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/4cc8114a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/4cc8114a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/4cc8114a

Branch: refs/heads/master
Commit: 4cc8114a680d309deb77e0451bad5e45642f4006
Parents: 6831348
Author: Robert Newson <rnewson@apache.org>
Authored: Wed Aug 27 19:15:18 2014 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Wed Aug 27 19:15:18 2014 +0100

----------------------------------------------------------------------
 src/couch_mrview_compactor.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/4cc8114a/src/couch_mrview_compactor.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_compactor.erl b/src/couch_mrview_compactor.erl
index f8293bd..735b790 100644
--- a/src/couch_mrview_compactor.erl
+++ b/src/couch_mrview_compactor.erl
@@ -174,6 +174,7 @@ swap_compacted(OldState, NewState) ->
     } = NewState,
 
     link(NewState#mrst.fd),
+    Ref = erlang:monitor(process, NewState#mrst.fd),
 
     RootDir = couch_index_util:root_dir(),
     IndexFName = couch_mrview_util:index_file(DbName, Sig),
@@ -184,4 +185,4 @@ swap_compacted(OldState, NewState) ->
     unlink(OldState#mrst.fd),
     erlang:demonitor(OldState#mrst.fd_monitor, [flush]),
     
-    {ok, NewState}.
+    {ok, NewState#mrst{fd_monitor=Ref}}.


Mime
View raw message