summaryrefslogtreecommitdiff
path: root/src/conn/conn_open.c
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-09-30 15:12:47 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-09-30 15:12:47 -0400
commite6b6d12fd0ff483af48e26a7445ce49334964f74 (patch)
treebc249f4e968be3eca04a602191c152483ec12616 /src/conn/conn_open.c
parentffcb88877201021dd6cb9062ec8acf2b53943798 (diff)
downloadmongo-e6b6d12fd0ff483af48e26a7445ce49334964f74.tar.gz
WT-2149: open private lookaside cursors as part of creating an internal
thread's session, in order to avoid deadlocks later. Change callers of __wt_open_internal_session() to pass a set of session flags. If those flags include WT_SESSION_LOOKASIDE_CURSOR, a lookaside table cursor is opened as part of creating the session. Previously, __wt_open_internal_session() had a uses_dhandles boolean. If that boolean was false, the session flag WT_SESSION_NO_DATA_HANDLES was set. That boolean is gone, callers of __wt_open_internal_session() should pass WT_SESSION_NO_DATA_HANDLES to __wt_open_internal_session(). Create the lookaside table before starting the worker threads, the order is required if lookaside table cursors are opened as part of the worker threads opening internal sessions. Flip the order of creation in the initial lookaside table setup: we now first create the lookaside table itself, then open the WT_CONNECTION_IMPL lookaside session/cursor, that allows the cursor open to happen when the connection's lookaside table session is first opened, like every other internal thread. Re-organize the lookaside table code to expect a lookaside table cursor to be available in any session with the WT_SESSION_LOOKASIDE_CURSOR flag, including the WT_CONNECTION_IMPL structure's lookaside session.
Diffstat (limited to 'src/conn/conn_open.c')
-rw-r--r--src/conn/conn_open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conn/conn_open.c b/src/conn/conn_open.c
index 199cf213e0a..675c3765d1a 100644
--- a/src/conn/conn_open.c
+++ b/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,