summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDianna Hohensee <dianna.hohensee@10gen.com>2019-02-26 14:24:43 -0500
committerDianna Hohensee <dianna.hohensee@10gen.com>2019-02-26 17:11:58 -0500
commit1ba2e45711fb15801539d0bec022a2a474155c09 (patch)
treebc6501f654089c487008526cb095bab52de73e1d
parent51c37d843e7a06e29078a7022cc8fbf336e039fe (diff)
downloadmongo-1ba2e45711fb15801539d0bec022a2a474155c09.tar.gz
SERVER-39525 move IndexBuildsCoordinator::shutdown() outside the RSTL lock, but still after setKillAllOperations()
-rw-r--r--src/mongo/db/db.cpp9
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()) {