diff options
Diffstat (limited to 'src/third_party/wiredtiger/src/conn/conn_dhandle.c')
-rw-r--r-- | src/third_party/wiredtiger/src/conn/conn_dhandle.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_dhandle.c b/src/third_party/wiredtiger/src/conn/conn_dhandle.c index 56a37cf16eb..2606c9d083b 100644 --- a/src/third_party/wiredtiger/src/conn/conn_dhandle.c +++ b/src/third_party/wiredtiger/src/conn/conn_dhandle.c @@ -774,13 +774,14 @@ __wt_conn_dhandle_discard(WT_SESSION_IMPL *session) __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. + * Close open data handles: first, everything apart from metadata and + * lookaside (as closing a normal file may write metadata and read + * lookaside entries). Then close whatever is left open. */ restart: TAILQ_FOREACH(dhandle, &conn->dhqh, q) { - if (WT_IS_METADATA(dhandle)) + if (WT_IS_METADATA(dhandle) || + strcmp(dhandle->name, WT_LAS_URI) == 0) continue; WT_WITH_DHANDLE(session, dhandle, @@ -789,6 +790,9 @@ restart: goto restart; } + /* Shut down the lookaside table after all eviction is complete. */ + WT_TRET(__wt_las_destroy(session)); + /* * Closing the files may have resulted in entries on our default * session's list of open data handles, specifically, we added the @@ -807,7 +811,7 @@ restart: if (session->meta_cursor != NULL) WT_TRET(session->meta_cursor->close(session->meta_cursor)); - /* Close the metadata file handle. */ + /* Close the remaining handles. */ WT_TAILQ_SAFE_REMOVE_BEGIN(dhandle, &conn->dhqh, q, dhandle_tmp) { WT_WITH_DHANDLE(session, dhandle, WT_TRET(__wt_conn_dhandle_discard_single( |