diff options
author | Keith Bostic <keith@wiredtiger.com> | 2016-03-19 10:32:32 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2016-03-19 10:32:32 -0400 |
commit | 08e11cc4822d97f9cf0c22ae9b3f6b2a1718ac0a (patch) | |
tree | 12a00c852160dda9b82ef576baed0e317fc3bf13 | |
parent | 5a6d06b712eff6be8a77c7944636e98b3ccab1fa (diff) | |
download | mongo-08e11cc4822d97f9cf0c22ae9b3f6b2a1718ac0a.tar.gz |
WT-2330: in-memory configurations should not create on-disk collection files
Don't create/sweep/whatever the LAS table when running in-memory.
-rw-r--r-- | src/cache/cache_las.c | 4 | ||||
-rw-r--r-- | src/conn/conn_sweep.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/cache/cache_las.c b/src/cache/cache_las.c index 8796ec6b2fc..fd541458fa8 100644 --- a/src/cache/cache_las.c +++ b/src/cache/cache_las.c @@ -58,8 +58,10 @@ __wt_las_create(WT_SESSION_IMPL *session) conn = S2C(session); - if (F_ISSET(conn, WT_CONN_READONLY)) + /* Read-only and in-memory configurations don't need the LAS table. */ + if (F_ISSET(conn, WT_CONN_IN_MEMORY | WT_CONN_READONLY)) return (0); + /* * Done at startup: we cannot do it on demand because we require the * schema lock to create and drop the table, and it may not always be diff --git a/src/conn/conn_sweep.c b/src/conn/conn_sweep.c index cc0aa5a1322..5d24ea61607 100644 --- a/src/conn/conn_sweep.c +++ b/src/conn/conn_sweep.c @@ -369,8 +369,9 @@ __wt_sweep_create(WT_SESSION_IMPL *session) * * Don't tap the sweep thread for eviction. */ - session_flags = WT_SESSION_CAN_WAIT | - WT_SESSION_LOOKASIDE_CURSOR | WT_SESSION_NO_EVICTION; + session_flags = WT_SESSION_CAN_WAIT | WT_SESSION_NO_EVICTION; + if (F_ISSET(conn, WT_CONN_LAS_OPEN)) + session_flags |= WT_SESSION_LOOKASIDE_CURSOR; WT_RET(__wt_open_internal_session( conn, "sweep-server", true, session_flags, &conn->sweep_session)); session = conn->sweep_session; |