Permalink
Browse files

More precise compaction time calculation

When measuring the duration of view compaction, account for
the initial step of coordinating with the updater if the
updater is running in parallel. Normally this is very fast,
but for some edge cases it can take a significant amount of
time, as it did in MB-7280 (Windows environment).

Change-Id: I666c0d418c6eeda14fee92a89dc2b599b1b48355
Reviewed-on: http://review.couchbase.org/24255
Reviewed-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-on: http://review.couchbase.org/25013
Reviewed-by: Volker Mische <volker.mische@gmail.com>
  • Loading branch information...
fdmanana committed Jan 29, 2013
1 parent 441cd50 commit 2995b40f85f477c36e75aec6984246db38b9c8e0
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/couch_set_view/src/couch_set_view_compactor.erl
@@ -81,6 +81,7 @@ compact_group(Group0, EmptyGroup, TmpDir, UpdaterPid, Owner, UserStatus) ->
set_name = SetName,
type = Type
} = Group0,
+ StartTime = os:timestamp(),
case is_pid(UpdaterPid) of
true ->
@@ -110,7 +111,6 @@ compact_group(Group0, EmptyGroup, TmpDir, UpdaterPid, Owner, UserStatus) ->
index_header = Header,
sig = GroupSig
} = Group,
- StartTime = os:timestamp(),
#set_view_group{
id_btree = EmptyIdBtree,

0 comments on commit 2995b40

Please sign in to comment.