diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2019-02-26 14:24:43 -0500 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2019-02-26 17:11:58 -0500 |
commit | 1ba2e45711fb15801539d0bec022a2a474155c09 (patch) | |
tree | bc6501f654089c487008526cb095bab52de73e1d | |
parent | 51c37d843e7a06e29078a7022cc8fbf336e039fe (diff) | |
download | mongo-1ba2e45711fb15801539d0bec022a2a474155c09.tar.gz |
SERVER-39525 move IndexBuildsCoordinator::shutdown() outside the RSTL lock, but still after setKillAllOperations()
-rw-r--r-- | src/mongo/db/db.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index 7e340097b23..33c961238f9 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -921,13 +921,12 @@ void shutdownTask() { rstl.waitForLockUntil(Date_t::max()); } - - // Interrupts all index builds, leaving the state intact to be recovered when the server - // restarts. This should be done after replication oplog application finishes, so foreground - // index builds begun by replication on secondaries do not invariant. - IndexBuildsCoordinator::get(serviceContext)->shutdown(); } + // Shuts down the thread pool and waits for index builds to finish. + // Depends on setKillAllOperations() above to interrupt the index build operations. + IndexBuildsCoordinator::get(serviceContext)->shutdown(); + ReplicaSetMonitor::shutdown(); if (auto sr = Grid::get(serviceContext)->shardRegistry()) { |