couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [2/2] couch-index commit: updated refs/heads/COUCHDB-3287-pluggable-storage-engines to 4e779f2
Date Fri, 03 Feb 2017 16:50:49 GMT
Update API for use with pluggable storage engines

COUCHDB-3287


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

Branch: refs/heads/COUCHDB-3287-pluggable-storage-engines
Commit: 4e779f239e1f259ebb50948ad26ec21aac1135d3
Parents: 81bcb1f
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Wed Feb 10 18:14:07 2016 -0600
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Fri Feb 3 10:48:54 2017 -0600

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


http://git-wip-us.apache.org/repos/asf/couchdb-couch-index/blob/4e779f23/src/couch_index_updater.erl
----------------------------------------------------------------------
diff --git a/src/couch_index_updater.erl b/src/couch_index_updater.erl
index ad48f40..bf31460 100644
--- a/src/couch_index_updater.erl
+++ b/src/couch_index_updater.erl
@@ -166,7 +166,7 @@ update(Idx, Mod, IdxState) ->
             end
         end,
 
-        Proc = fun(DocInfo, _, {IdxStateAcc, _}) ->
+        Proc = fun(DocInfo, {IdxStateAcc, _}) ->
             case CommittedOnly and (GetSeq(DocInfo) > DbCommittedSeq) of
                 true ->
                     {stop, {IdxStateAcc, false}};
@@ -180,7 +180,7 @@ update(Idx, Mod, IdxState) ->
 
         {ok, InitIdxState} = Mod:start_update(Idx, PurgedIdxState, NumChanges),
         Acc0 = {InitIdxState, true},
-        {ok, _, Acc} = couch_db:enum_docs_since(Db, CurrSeq, Proc, Acc0, []),
+        {ok, Acc} = couch_db:fold_changes(Db, CurrSeq, Proc, Acc0, []),
         {ProcIdxSt, SendLast} = Acc,
 
         % If we didn't bail due to hitting the last committed seq we need
@@ -198,7 +198,7 @@ update(Idx, Mod, IdxState) ->
 
 
 purge_index(Db, Mod, IdxState) ->
-    DbPurgeSeq = couch_db:get_purge_seq(Db),
+    {ok, DbPurgeSeq} = couch_db:get_purge_seq(Db),
     IdxPurgeSeq = Mod:get(purge_seq, IdxState),
     if
         DbPurgeSeq == IdxPurgeSeq ->


Mime
View raw message