diff options
author | Robert Newson <robert.newson@cloudant.com> | 2012-09-05 00:15:36 +0100 |
---|---|---|
committer | Robert Newson <robert.newson@cloudant.com> | 2012-11-15 11:23:55 +0000 |
commit | 478e957f17813676ec2d1b57cde249c06d00d1e5 (patch) | |
tree | 1ec91610f5f7b02465c357897cf8290c6951bdb8 | |
parent | cde32e6e3728e7896bf311f77fcb5e6d266e8465 (diff) |
Add total_changes to view compaction status
Conflicts:
apps/couch/src/couch_view_compactor.erl
-rw-r--r-- | apps/couch/src/couch_view_compactor.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/couch/src/couch_view_compactor.erl b/apps/couch/src/couch_view_compactor.erl index ccb3fe3a..65475d8a 100644 --- a/apps/couch/src/couch_view_compactor.erl +++ b/apps/couch/src/couch_view_compactor.erl @@ -62,7 +62,9 @@ compact_group(Group, EmptyGroup, DbName) -> exit({view_duplicated_id, DocId}); true -> ok end, if TotalCopied rem 10000 =:= 0 -> - couch_task_status:update([{changes_done, TotalCopied}, {progress, (TotalCopied * 100) div Count}]), + couch_task_status:update([{changes_done, TotalCopied}, + {total_changes, Count}, + {progress, (TotalCopied * 100) div Count}]), {ok, Bt2} = couch_btree:add(Bt, lists:reverse([KV|Acc])), {ok, {Bt2, [], TotalCopied+1, DocId}}; true -> @@ -110,7 +112,9 @@ compact_view(View, EmptyView) -> %% Key is {Key,DocId} Fun = fun(KV, {Bt, Acc, TotalCopied}) -> if TotalCopied rem 10000 =:= 0 -> - couch_task_status:update([{changes_done, TotalCopied}, {progress, (TotalCopied * 100) div Count}]), + couch_task_status:update([{changes_done, TotalCopied}, + {total_changes, Count}, + {progress, (TotalCopied * 100) div Count}]), {ok, Bt2} = couch_btree:add(Bt, lists:reverse([KV|Acc])), {ok, {Bt2, [], TotalCopied + 1}}; true -> |