diff options
author | Ramon Fernandez <ramon@mongodb.com> | 2015-10-09 09:38:22 -0400 |
---|---|---|
committer | Ramon Fernandez <ramon@mongodb.com> | 2015-10-09 09:38:22 -0400 |
commit | f6f222926658eb9e79463e2bf0ee94beb15813c9 (patch) | |
tree | 76252644371ac883cbf2c088c3b4aa05c19e6584 /src/third_party/wiredtiger/src/conn/conn_open.c | |
parent | 5ab3290f8796f2143acd5011ab0baae70ed5cece (diff) | |
download | mongo-f6f222926658eb9e79463e2bf0ee94beb15813c9.tar.gz |
Import wiredtiger-wiredtiger-2.6.1-1333-g0537648.tar.gz from wiredtiger branch mongodb-3.2
Diffstat (limited to 'src/third_party/wiredtiger/src/conn/conn_open.c')
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_open.c | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_open.c b/src/third_party/wiredtiger/src/conn/conn_open.c index 199cf213e0a..04815c8e152 100644 --- a/src/third_party/wiredtiger/src/conn/conn_open.c +++ b/src/third_party/wiredtiger/src/conn/conn_open.c @@ -38,7 +38,7 @@ __wt_connection_open(WT_CONNECTION_IMPL *conn, const char *cfg[]) * need to get cleaned up on close. */ WT_RET(__wt_open_internal_session( - conn, "connection", true, false, &session)); + conn, "connection", false, 0, &session)); /* * The connection's default session is originally a static structure, @@ -228,33 +228,45 @@ int __wt_connection_workers(WT_SESSION_IMPL *session, const char *cfg[]) { /* - * Start the eviction thread. - */ - WT_RET(__wt_evict_create(session)); - - /* * Start the optional statistics thread. Start statistics first so that * other optional threads can know if statistics are enabled or not. */ 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)); + /* + * Start the optional logging/archive threads. + * NOTE: The log manager must be started before checkpoints so that the + * checkpoint server knows if logging is enabled. It must also be + * started before any operation that can commit, or the commit can + * block. + */ + WT_RET(__wt_logmgr_open(session)); + + /* Create the lookaside table. */ + WT_RET(__wt_las_create(session)); + + /* + * 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)); /* Start the optional async threads. */ WT_RET(__wt_async_create(session, cfg)); - /* - * Start the optional logging/archive thread. - * NOTE: The log manager must be started before checkpoints so that the - * checkpoint server knows if logging is enabled. - */ - WT_RET(__wt_logmgr_open(session)); - /* Start the optional checkpoint thread. */ WT_RET(__wt_checkpoint_server_create(session, cfg)); |