summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@mongodb.com>2015-10-01 15:59:30 +1000
committerMichael Cahill <michael.cahill@mongodb.com>2015-10-01 15:59:30 +1000
commit735e3ddcd3a12a1a53af1bf6469ec8b34ab60f9a (patch)
treeff588b01fad2215f19ced0af98cfece6f2643cc5
parent1ea12d03e2132a5c2e8c0e0822749c509b55b773 (diff)
downloadmongo-735e3ddcd3a12a1a53af1bf6469ec8b34ab60f9a.tar.gz
WT-2149 Remove files from the dummy session during connection close so the lookaside handle isn't referenced after it is closed.
-rw-r--r--src/conn/conn_dhandle.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/conn/conn_dhandle.c b/src/conn/conn_dhandle.c
index 77e7693042b..0b364b5fd4b 100644
--- a/src/conn/conn_dhandle.c
+++ b/src/conn/conn_dhandle.c
@@ -678,11 +678,15 @@ __wt_conn_dhandle_discard(WT_SESSION_IMPL *session)
conn = S2C(session);
/*
- * Close open data handles: first, everything but the metadata file
- * (as closing a normal file may open and write the metadata file),
- * then the metadata file. This function isn't called often, and I
- * don't want to "know" anything about the metadata file's position on
- * the list, so we do it the hard way.
+ * Empty the session cache: any data handles created in a connection
+ * method may be cached here, and we're about to close them.
+ */
+ __wt_session_close_cache(session);
+
+ /*
+ * Close open data handles: first, everything but the metadata file (as
+ * closing a normal file may open and write the metadata file), then
+ * the metadata file.
*/
restart:
TAILQ_FOREACH(dhandle, &conn->dhqh, q) {