summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/conn/conn_tiered.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/conn/conn_tiered.c')
-rw-r--r--src/third_party/wiredtiger/src/conn/conn_tiered.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/src/conn/conn_tiered.c b/src/third_party/wiredtiger/src/conn/conn_tiered.c
index 507e1a13fcf..a443802197c 100644
--- a/src/third_party/wiredtiger/src/conn/conn_tiered.c
+++ b/src/third_party/wiredtiger/src/conn/conn_tiered.c
@@ -658,7 +658,6 @@ __wt_tiered_storage_destroy(WT_SESSION_IMPL *session)
__wt_tiered_work_free(session, entry);
}
}
- __wt_cond_destroy(session, &conn->tiered_cond);
if (conn->tiered_session != NULL) {
WT_TRET(__wt_session_close_internal(conn->tiered_session));
conn->tiered_session = NULL;
@@ -671,8 +670,10 @@ __wt_tiered_storage_destroy(WT_SESSION_IMPL *session)
WT_TRET(__wt_thread_join(session, &conn->tiered_mgr_tid));
conn->tiered_mgr_tid_set = false;
}
+ /* Destroy all condition variables after threads have stopped. */
+ __wt_cond_destroy(session, &conn->tiered_cond);
__wt_cond_destroy(session, &conn->tiered_mgr_cond);
- /* This condition variable is last because any internal thread could be using it. */
+ /* The flush condition variable must be last because any internal thread could be using it. */
__wt_cond_destroy(session, &conn->flush_cond);
if (conn->tiered_mgr_session != NULL) {