diff options
author | Jason Chan <jason.chan@mongodb.com> | 2021-10-08 14:17:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-27 15:04:10 +0000 |
commit | fe85da675e17eba36184954345eeff023e04a1fb (patch) | |
tree | 4c7ea72d98d3b31f04f6c1afabcf891606b49077 | |
parent | 7c57ae156eb9519c1cde7e30df1ee08d81efeb2d (diff) | |
download | mongo-fe85da675e17eba36184954345eeff023e04a1fb.tar.gz |
SERVER-60424 Have TenantOplogFetcher recreate cursors with initial maxTimeout
(cherry picked from commit 9c229633f98be337d0fe676c2b4b7b1aa5cf4f61)
-rw-r--r-- | src/mongo/db/repl/oplog_fetcher.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/repl/oplog_fetcher.cpp b/src/mongo/db/repl/oplog_fetcher.cpp index c7977f30ef8..b3f06150854 100644 --- a/src/mongo/db/repl/oplog_fetcher.cpp +++ b/src/mongo/db/repl/oplog_fetcher.cpp @@ -665,7 +665,11 @@ StatusWith<OplogFetcher::Documents> OplogFetcher::_getNextBatch() { Timer timer; if (!_cursor) { // An error occurred and we should recreate the cursor. - auto status = _createNewCursor(false /* initialFind */); + // The OplogFetcher uses an aggregation command in tenant migrations, which does not + // support tailable cursors. When recreating the cursor, use the longer initial max time + // to avoid timing out. + const bool initialFind = _config.forTenantMigration; + auto status = _createNewCursor(initialFind /* initialFind */); if (!status.isOK()) { return status; } |