diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-08-01 14:08:12 +1000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-01 04:38:52 +0000 |
commit | c8955fd7b89009f3c65eb2a6d6227249ea561fdb (patch) | |
tree | 3f2942f6d9c233e5e0bc882b15f59d5975ff4e4c /src/third_party/wiredtiger/test/checkpoint | |
parent | f6fd11ab11600164200b5514759ee501f30da1aa (diff) | |
download | mongo-c8955fd7b89009f3c65eb2a6d6227249ea561fdb.tar.gz |
Import wiredtiger: 0427579d14f4a274bb55eb84be954054e96242dc from branch mongodb-master
ref: 8b0ee25694..0427579d14
for: 6.1.0-rc0
WT-9643 Fix pthread_mutex_destroy() failure during test_checkpoint. (#8169)
Diffstat (limited to 'src/third_party/wiredtiger/test/checkpoint')
-rw-r--r-- | src/third_party/wiredtiger/test/checkpoint/checkpointer.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/third_party/wiredtiger/test/checkpoint/checkpointer.c b/src/third_party/wiredtiger/test/checkpoint/checkpointer.c index b7f73f20071..1e1e924659a 100644 --- a/src/third_party/wiredtiger/test/checkpoint/checkpointer.c +++ b/src/third_party/wiredtiger/test/checkpoint/checkpointer.c @@ -79,15 +79,24 @@ void end_threads(void) { if (g.tiered) { + /* + * The flush lock is also used by the worker threads. They have exited by the time this is + * called, so it is safe to destroy it. + */ testutil_check(__wt_thread_join(NULL, &g.flush_thread)); __wt_rwlock_destroy(NULL, &g.flush_lock); } + /* Shutdown checkpoint after flush thread completes because flush depends on checkpoint. */ + testutil_check(__wt_thread_join(NULL, &g.checkpoint_thread)); + if (g.use_timestamps) { + /* + * The clock lock is also used by the checkpoint thread. Now that it has exited it is safe + * to destroy that lock. + */ testutil_check(__wt_thread_join(NULL, &g.clock_thread)); __wt_rwlock_destroy(NULL, &g.clock_lock); } - /* Shutdown checkpoint after flush thread completes because flush depends on checkpoint. */ - testutil_check(__wt_thread_join(NULL, &g.checkpoint_thread)); } /* |