diff options
author | Will Korteland <will.korteland@mongodb.com> | 2022-04-29 04:01:33 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-29 04:41:57 +0000 |
commit | f9e7b6d7de6270a5ed7bf79da40d31a78633ca2a (patch) | |
tree | 34105dd5c655a94ba7ab1c745e43dae3524a15f2 /src | |
parent | 997c7a7d04cfff75f8126575f90f165346aa0eb6 (diff) | |
download | mongo-f9e7b6d7de6270a5ed7bf79da40d31a78633ca2a.tar.gz |
Import wiredtiger: 8a6e8fcc67705940d0c55bb014c52886a0deb9cd from branch mongodb-master
ref: f033922dc5..8a6e8fcc67
for: 6.1.0-rc0
WT-9204 Change wtperf checkpoint stopping for flush thread
Diffstat (limited to 'src')
-rw-r--r-- | src/third_party/wiredtiger/bench/wtperf/wtperf.c | 15 | ||||
-rw-r--r-- | src/third_party/wiredtiger/bench/wtperf/wtperf.h | 1 | ||||
-rw-r--r-- | src/third_party/wiredtiger/import.data | 2 |
3 files changed, 8 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/bench/wtperf/wtperf.c b/src/third_party/wiredtiger/bench/wtperf/wtperf.c index feecc2854a8..ce20ec27388 100644 --- a/src/third_party/wiredtiger/bench/wtperf/wtperf.c +++ b/src/third_party/wiredtiger/bench/wtperf/wtperf.c @@ -1331,19 +1331,14 @@ checkpoint_worker(void *arg) goto err; } - while (!wtperf->stop || wtperf->flushthreads != NULL) { + while (!wtperf->ckpt_stop && !wtperf->error) { /* Break the sleep up, so we notice interrupts faster. */ for (i = 0; i < opts->checkpoint_interval; i++) { sleep(1); - if (wtperf->stop) + if (wtperf->ckpt_stop || wtperf->error) break; } - /* - * If the workers are done, don't bother with a final call unless the flush tier worker - * needs to a final checkpoint to complete. The checkpoint thread keeps running as long as - * there is a flush tier worker thread running. - */ - if (wtperf->stop && wtperf->flushthreads == NULL) + if (wtperf->ckpt_stop || wtperf->error) break; wtperf->ckpt = true; @@ -1657,12 +1652,13 @@ execute_populate(WTPERF *wtperf) free(wtperf->flushthreads); wtperf->flushthreads = NULL; } + wtperf->ckpt_stop = true; if (wtperf->ckptthreads != NULL) { stop_threads(1, wtperf->ckptthreads); free(wtperf->ckptthreads); wtperf->ckptthreads = NULL; } - wtperf->stop = false; + wtperf->ckpt_stop = wtperf->stop = false; return (0); } @@ -2381,6 +2377,7 @@ err: stop_threads(1, wtperf->backupthreads); /* We must stop the flush thread before the checkpoint thread. */ stop_threads(1, wtperf->flushthreads); + wtperf->ckpt_stop = true; stop_threads(1, wtperf->ckptthreads); stop_threads(1, wtperf->scanthreads); diff --git a/src/third_party/wiredtiger/bench/wtperf/wtperf.h b/src/third_party/wiredtiger/bench/wtperf/wtperf.h index 5ec6aa9be83..b7d679b8f49 100644 --- a/src/third_party/wiredtiger/bench/wtperf/wtperf.h +++ b/src/third_party/wiredtiger/bench/wtperf/wtperf.h @@ -187,6 +187,7 @@ struct __wtperf { /* Per-database structure */ volatile bool flush; /* flush_tier in progress */ volatile bool scan; /* scan in progress */ volatile bool error; /* thread error */ + volatile bool ckpt_stop; /* notify checkpoint thread to stop */ volatile bool stop; /* notify threads to stop */ volatile bool in_warmup; /* running warmup phase */ diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data index 80971b85121..5df791f9d01 100644 --- a/src/third_party/wiredtiger/import.data +++ b/src/third_party/wiredtiger/import.data @@ -2,5 +2,5 @@ "vendor": "wiredtiger", "github": "wiredtiger/wiredtiger.git", "branch": "mongodb-master", - "commit": "f033922dc5c534c3e516869f856674bc7b9e73cb" + "commit": "8a6e8fcc67705940d0c55bb014c52886a0deb9cd" } |