summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/oplog_fetcher.cpp
diff options
context:
space:
mode:
authorMatthew Russotto <matthew.russotto@10gen.com>2020-01-24 14:43:40 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-01-27 21:56:56 +0000
commit6ccdc0ce67811ac9ed4699f9cf006d803720a3d7 (patch)
tree207c594efe43fbd972b5071ad07fc1bd0a0877ab /src/mongo/db/repl/oplog_fetcher.cpp
parent960e71f038a268cff71f52eb6b16e6f020a7840c (diff)
downloadmongo-6ccdc0ce67811ac9ed4699f9cf006d803720a3d7.tar.gz
SERVER-42705 Create test that initial sync survives sync source restart
create mode 100644 jstests/replsets/initial_sync_oplog_fetcher_survives_restart.js create mode 100644 jstests/replsets/initial_sync_survives_restart.js
Diffstat (limited to 'src/mongo/db/repl/oplog_fetcher.cpp')
-rw-r--r--src/mongo/db/repl/oplog_fetcher.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/repl/oplog_fetcher.cpp b/src/mongo/db/repl/oplog_fetcher.cpp
index c4595103905..e4ccc9f6469 100644
--- a/src/mongo/db/repl/oplog_fetcher.cpp
+++ b/src/mongo/db/repl/oplog_fetcher.cpp
@@ -623,7 +623,12 @@ NewOplogFetcher::~NewOplogFetcher() {
Status NewOplogFetcher::_doStartup_inlock() noexcept {
return _scheduleWorkAndSaveHandle_inlock(
[this](const executor::TaskExecutor::CallbackArgs& args) {
- hangBeforeStartingOplogFetcher.pauseWhileSet();
+ // Tests use this failpoint to prevent the oplog fetcher from starting. If those
+ // tests fail and the oplog fetcher is canceled, we want to continue so we see
+ // a test failure quickly instead of a test timeout eventually.
+ while (hangBeforeStartingOplogFetcher.shouldFail() && !args.myHandle.isCanceled()) {
+ sleepmillis(100);
+ }
_runQuery(args);
},
&_runQueryHandle,