diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-12-14 16:46:29 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-12-14 16:46:29 -0500 |
commit | 0f2932b966b494df966f8f1a1c7228baa661e67a (patch) | |
tree | ef6367381597b4daf6e754bf046ac7799832fb0a | |
parent | ad33acecd0d537c8adcc8a941f0dfda13541a06c (diff) | |
download | mongo-0f2932b966b494df966f8f1a1c7228baa661e67a.tar.gz |
Reorder verbose messages so the result of the compaction test is correctly
reported (previously, verbose always reported compaction was NOT going to
be done, regardless of whether or not compaction was proceeding.
-rw-r--r-- | src/block/block_compact.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/block/block_compact.c b/src/block/block_compact.c index 59e35c5a57f..3030a6bcfa9 100644 --- a/src/block/block_compact.c +++ b/src/block/block_compact.c @@ -84,23 +84,6 @@ __wt_block_compact_skip(WT_SESSION_IMPL *session, WT_BLOCK *block, bool *skipp) avail_eighty += ext->size; } - WT_ERR(__wt_verbose(session, WT_VERB_COMPACT, - "%s: %" PRIuMAX "MB (%" PRIuMAX ") available space in the first " - "80%% of the file", - block->name, - (uintmax_t)avail_eighty / WT_MEGABYTE, (uintmax_t)avail_eighty)); - WT_ERR(__wt_verbose(session, WT_VERB_COMPACT, - "%s: %" PRIuMAX "MB (%" PRIuMAX ") available space in the first " - "90%% of the file", - block->name, - (uintmax_t)avail_ninety / WT_MEGABYTE, (uintmax_t)avail_ninety)); - WT_ERR(__wt_verbose(session, WT_VERB_COMPACT, - "%s: require 10%% or %" PRIuMAX "MB (%" PRIuMAX ") in the first " - "90%% of the file to perform compaction, compaction %s", - block->name, - (uintmax_t)(fh->size / 10) / WT_MEGABYTE, (uintmax_t)fh->size / 10, - *skipp ? "skipped" : "proceeding")); - /* * Skip files where we can't recover at least 1MB. * @@ -123,6 +106,23 @@ __wt_block_compact_skip(WT_SESSION_IMPL *session, WT_BLOCK *block, bool *skipp) block->compact_pct_tenths = 1; } + WT_ERR(__wt_verbose(session, WT_VERB_COMPACT, + "%s: %" PRIuMAX "MB (%" PRIuMAX ") available space in the first " + "80%% of the file", + block->name, + (uintmax_t)avail_eighty / WT_MEGABYTE, (uintmax_t)avail_eighty)); + WT_ERR(__wt_verbose(session, WT_VERB_COMPACT, + "%s: %" PRIuMAX "MB (%" PRIuMAX ") available space in the first " + "90%% of the file", + block->name, + (uintmax_t)avail_ninety / WT_MEGABYTE, (uintmax_t)avail_ninety)); + WT_ERR(__wt_verbose(session, WT_VERB_COMPACT, + "%s: require 10%% or %" PRIuMAX "MB (%" PRIuMAX ") in the first " + "90%% of the file to perform compaction, compaction %s", + block->name, + (uintmax_t)(fh->size / 10) / WT_MEGABYTE, (uintmax_t)fh->size / 10, + *skipp ? "skipped" : "proceeding")); + err: __wt_spin_unlock(session, &block->live_lock); return (ret); |