summaryrefslogtreecommitdiff
path: root/src/lsm/lsm_manager.c
diff options
context:
space:
mode:
authorSusan LoVerso <sue@wiredtiger.com>2014-12-11 15:19:48 -0500
committerSusan LoVerso <sue@wiredtiger.com>2014-12-11 15:19:48 -0500
commit0c3c7c2d9b33c622a6caba91b7dbcf9f9dafd94e (patch)
tree005824eb225afca158ccbeb036c249e62badc894 /src/lsm/lsm_manager.c
parent9b33b7c46a2672f36b9673d5e4cbc7315bc9ecf4 (diff)
downloadmongo-0c3c7c2d9b33c622a6caba91b7dbcf9f9dafd94e.tar.gz
Minor cleanup. #1447
Diffstat (limited to 'src/lsm/lsm_manager.c')
-rw-r--r--src/lsm/lsm_manager.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lsm/lsm_manager.c b/src/lsm/lsm_manager.c
index 1356d336f6e..06aaa679fd9 100644
--- a/src/lsm/lsm_manager.c
+++ b/src/lsm/lsm_manager.c
@@ -68,8 +68,16 @@ __lsm_general_worker_start(WT_SESSION_IMPL *session)
* throttling stalls.
*/
if (manager->lsm_workers == 1)
+
+ /*
+ * If there are only two threads handling work units
+ * let them both do flushes otherwise a single merge
+ * can lead to switched chunks filling up the cache.
+ */
worker_args->type =
WT_LSM_WORK_DROP | WT_LSM_WORK_SWITCH;
+ if (manager->lsm_workers_max == WT_LSM_MIN_WORKERS)
+ worker_args->type |= WT_LSM_WORK_FLUSH;
else {
worker_args->type =
WT_LSM_WORK_BLOOM |
@@ -92,13 +100,6 @@ __lsm_general_worker_start(WT_SESSION_IMPL *session)
WT_RET(__wt_lsm_worker_start(session, worker_args));
}
- /*
- * If there are only two threads handling work units let them
- * both do flushes otherwise a single merge can lead to switched
- * chunks filling up the cache.
- */
- if (manager->lsm_workers_max == 3)
- FLD_SET(manager->lsm_worker_cookies[1].type, WT_LSM_WORK_FLUSH);
return (0);
}