Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Commit 4e779f2

Browse files
committed
Update API for use with pluggable storage engines
COUCHDB-3287
1 parent 81bcb1f commit 4e779f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/couch_index_updater.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ update(Idx, Mod, IdxState) ->
166166
end
167167
end,
168168

169-
Proc = fun(DocInfo, _, {IdxStateAcc, _}) ->
169+
Proc = fun(DocInfo, {IdxStateAcc, _}) ->
170170
case CommittedOnly and (GetSeq(DocInfo) > DbCommittedSeq) of
171171
true ->
172172
{stop, {IdxStateAcc, false}};
@@ -180,7 +180,7 @@ update(Idx, Mod, IdxState) ->
180180

181181
{ok, InitIdxState} = Mod:start_update(Idx, PurgedIdxState, NumChanges),
182182
Acc0 = {InitIdxState, true},
183-
{ok, _, Acc} = couch_db:enum_docs_since(Db, CurrSeq, Proc, Acc0, []),
183+
{ok, Acc} = couch_db:fold_changes(Db, CurrSeq, Proc, Acc0, []),
184184
{ProcIdxSt, SendLast} = Acc,
185185

186186
% If we didn't bail due to hitting the last committed seq we need
@@ -198,7 +198,7 @@ update(Idx, Mod, IdxState) ->
198198

199199

200200
purge_index(Db, Mod, IdxState) ->
201-
DbPurgeSeq = couch_db:get_purge_seq(Db),
201+
{ok, DbPurgeSeq} = couch_db:get_purge_seq(Db),
202202
IdxPurgeSeq = Mod:get(purge_seq, IdxState),
203203
if
204204
DbPurgeSeq == IdxPurgeSeq ->

0 commit comments

Comments
 (0)