Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix off by one error

That allowed the first doc to be copied over as TotalCopied begins with 0
  • Loading branch information...
commit 60088312cd2bf14f792cdf88443028599ca2ac75 1 parent 41298f6
Bob Dionne authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 apps/couch/src/couch_db_updater.erl
View
4 apps/couch/src/couch_db_updater.erl
@@ -922,11 +922,11 @@ copy_compact_snapshot(DbSs, NewDb, Retry, TotalChanges) ->
couch_task_status:update(
"Copied ~p of ~p changes (~p%)",
[TotalCopied, TotalChanges, (TotalCopied*100) div TotalChanges]),
- if TotalCopied rem 1000 =:= 0 ->
+ if (TotalCopied + 1) rem 1000 =:= 0 ->
NewDb2 =
copy_docs(DbSs, AccNewDb,
lists:reverse([DocInfo | AccUncopied]), Retry),
- if TotalCopied rem 10000 =:= 0 ->
+ if (TotalCopied + 1) rem 10000 =:= 0 ->
NewDb3 = commit_data(NewDb2#db{update_seq=Seq}),
{ok, {NewDb3, [], TotalCopied + 1}};
true ->
Please sign in to comment.
Something went wrong with that request. Please try again.