Repository: couchdb-couch-index Updated Branches: refs/heads/windsor-merge 6a12ce192 -> f99e082d8
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/windsor-merge Commit: f99e082d89772357f5f618cf21dc939f10180278 Parents: 6a12ce1 Author: Paul J. Davis <[email protected]> Authored: Sun Aug 17 14:39:37 2014 -0500 Committer: Paul J. Davis <[email protected]> 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
