summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2014-06-18 16:21:59 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2014-06-18 16:21:59 +1000
commitebbcb21eef95c4b541c390520491a7557ffd2511 (patch)
treeef7b447b627d731a7fb0a123edca605e057bc65b
parent45c7280fe518d744d8bdf726d433902c8e885378 (diff)
downloadmongo-ebbcb21eef95c4b541c390520491a7557ffd2511.tar.gz
When flushing LSM chunks, only check switch_txn for in-memory chunks.
-rw-r--r--src/lsm/lsm_worker.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lsm/lsm_worker.c b/src/lsm/lsm_worker.c
index e39ccf98a5d..f22a21f6250 100644
--- a/src/lsm/lsm_worker.c
+++ b/src/lsm/lsm_worker.c
@@ -285,12 +285,6 @@ __wt_lsm_checkpoint_worker(void *arg)
chunk = cookie.chunk_array[i];
- /* Stop if a running transaction needs the chunk. */
- __wt_txn_update_oldest(session);
- if (chunk->switch_txn == WT_TXN_NONE ||
- !__wt_txn_visible_all(session, chunk->switch_txn))
- break;
-
/*
* If the chunk is already checkpointed, make sure it
* is also evicted. Either way, there is no point
@@ -311,6 +305,12 @@ __wt_lsm_checkpoint_worker(void *arg)
if (F_ISSET(chunk, WT_LSM_CHUNK_ONDISK))
continue;
+ /* Stop if a running transaction needs the chunk. */
+ __wt_txn_update_oldest(session);
+ if (chunk->switch_txn == WT_TXN_NONE ||
+ !__wt_txn_visible_all(session, chunk->switch_txn))
+ break;
+
WT_ERR(__wt_verbose(session, WT_VERB_LSM,
"LSM worker flushing %u", i));