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

Commit 6fbc319

Browse files
committed
Return value change
- return StateAcc instead of {ok, StateAcc} for fun/2 in couch_db:fold_purged_docs/5
1 parent b56faf3 commit 6fbc319

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/couch_index_updater.erl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,16 @@ purge_index(Db, Mod, IdxState) ->
202202
{ok, IdxState};
203203
true ->
204204
FoldFun = fun({PurgeSeq, _UUId, Id, Revs}, Acc) ->
205-
Mod:purge(Db, PurgeSeq, [{Id, Revs}], Acc)
205+
{ok, StateAcc} = Mod:purge(Db, PurgeSeq, [{Id, Revs}], Acc),
206+
StateAcc
206207
end,
207208
{ok, NewStateAcc} = couch_db:fold_purged_docs(
208-
Db,
209-
IdxPurgeSeq,
210-
FoldFun,
211-
IdxState,
212-
[]
213-
),
209+
Db,
210+
IdxPurgeSeq,
211+
FoldFun,
212+
IdxState,
213+
[]
214+
),
214215
Mod:update_local_purge_doc(Db, NewStateAcc),
215216
{ok, NewStateAcc}
216217
end.

0 commit comments

Comments
 (0)