couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [3/5] couch-index commit: updated refs/heads/master to 9e638f6
Date Thu, 28 Aug 2014 12:12:17 GMT
Add an index committed event


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

Branch: refs/heads/master
Commit: f99e082d89772357f5f618cf21dc939f10180278
Parents: 6a12ce1
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Sun Aug 17 14:39:37 2014 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Sun Aug 17 14:39:37 2014 -0500

----------------------------------------------------------------------
 src/couch_index.erl | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/f99e082d/src/couch_index.erl
----------------------------------------------------------------------
diff --git a/src/couch_index.erl b/src/couch_index.erl
index 75cf7d1..d14a74a 100644
--- a/src/couch_index.erl
+++ b/src/couch_index.erl
@@ -305,12 +305,14 @@ handle_info(commit, #st{committed=true}=State) ->
 handle_info(commit, State) ->
     #st{mod=Mod, idx_state=IdxState, commit_delay=Delay} = State,
     DbName = Mod:get(db_name, IdxState),
+    IdxName = Mod:get(idx_name, IdxState),
     GetCommSeq = fun(Db) -> couch_db:get_committed_update_seq(Db) end,
     CommittedSeq = couch_util:with_db(DbName, GetCommSeq),
     case CommittedSeq >= Mod:get(update_seq, IdxState) of
         true ->
             % Commit the updates
             ok = Mod:commit(IdxState),
+            couch_event:notify(DbName, {index_commit, IdxName}),
             {noreply, State#st{committed=true}};
         _ ->
             % We can't commit the header because the database seq that's


Mime
View raw message