summaryrefslogtreecommitdiff
path: root/src/conn/conn_open.c
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-10-07 16:13:12 +1100
committerMichael Cahill <michael.cahill@mongodb.com>2015-10-07 16:13:12 +1100
commita792371e4584c49f3c94b9e5843e0d57b2341fd8 (patch)
treefdce8d1b04303f326c845667cdf0c6c7d674f1f7 /src/conn/conn_open.c
parent0d74bc686a3a616bfa40e3272a0a04e6958c3892 (diff)
downloadmongo-a792371e4584c49f3c94b9e5843e0d57b2341fd8.tar.gz
WT-2149 Track if the lookaside table is open when starting eviction workers.
Diffstat (limited to 'src/conn/conn_open.c')
-rw-r--r--src/conn/conn_open.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/conn/conn_open.c b/src/conn/conn_open.c
index 6db0c4bb10c..04815c8e152 100644
--- a/src/conn/conn_open.c
+++ b/src/conn/conn_open.c
@@ -234,7 +234,13 @@ __wt_connection_workers(WT_SESSION_IMPL *session, const char *cfg[])
WT_RET(__wt_statlog_create(session, cfg));
WT_RET(__wt_logmgr_create(session, cfg));
- /* Run recovery. */
+ /*
+ * Run recovery.
+ * NOTE: This call will start (and stop) eviction if recovery is
+ * required. Recovery must run before the lookaside table is created
+ * (because recovery will update the metadata), and before eviction is
+ * started for real.
+ */
WT_RET(__wt_txn_recover(session));
/*
@@ -249,8 +255,11 @@ __wt_connection_workers(WT_SESSION_IMPL *session, const char *cfg[])
/* Create the lookaside table. */
WT_RET(__wt_las_create(session));
- /* Start eviction threads. */
- WT_RET(__wt_evict_create(session, true));
+ /*
+ * Start eviction threads.
+ * NOTE: Eviction must be started after the lookaside table is created.
+ */
+ WT_RET(__wt_evict_create(session));
/* Start the handle sweep thread. */
WT_RET(__wt_sweep_create(session));