summaryrefslogtreecommitdiff
path: root/src/conn/conn_open.c
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2014-02-25 14:51:24 -0500
committerKeith Bostic <keith@wiredtiger.com>2014-02-25 14:51:24 -0500
commitb68764aaf4297ff7222e4068d18f4ec96b5ad2af (patch)
treeb0a8589f5aeca4c6ca749c8552bf996266a007ef /src/conn/conn_open.c
parent527f7ed4c93934d549d68462d1a315b7f39f899e (diff)
downloadmongo-b68764aaf4297ff7222e4068d18f4ec96b5ad2af.tar.gz
Add a WT_SESSION_IMPL structure that allows us to store memory and free
it once no transaction can still be using it.
Diffstat (limited to 'src/conn/conn_open.c')
-rw-r--r--src/conn/conn_open.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/conn/conn_open.c b/src/conn/conn_open.c
index a7ae59ed155..68338445fcf 100644
--- a/src/conn/conn_open.c
+++ b/src/conn/conn_open.c
@@ -163,6 +163,14 @@ __wt_connection_close(WT_CONNECTION_IMPL *conn)
session = conn->default_session = &conn->dummy_session;
}
+ /*
+ * Free remaining "free-on-transaction generation" memory for all
+ * sessions.
+ */
+ if ((s = conn->sessions) != NULL)
+ for (i = 0; i < conn->session_size; ++s, ++i)
+ __wt_session_fotxn_discard(session, 1);
+
/* Free the hazard pointers for all sessions. */
if ((s = conn->sessions) != NULL)
for (i = 0; i < conn->session_size; ++s, ++i)