diff options
author | Mathias Stearn <redbeard0531@gmail.com> | 2016-01-15 16:30:52 -0500 |
---|---|---|
committer | Mathias Stearn <redbeard0531@gmail.com> | 2016-01-18 13:33:40 -0500 |
commit | c44a3ecdffd5c98fdd2daa6e46f52c50ff594576 (patch) | |
tree | 4a04d9df845d94beba13abcde6b13a8ab6e0ba6d /src/mongo/db/dbcommands.cpp | |
parent | 930e47f1864d0319b7d9033ad2c2bf99f02014c1 (diff) | |
download | mongo-r3.0.9-rc0.tar.gz |
SERVER-19128 Clean up interaction of background index builds and cursor killingr3.0.9-rc0
This reverts commit 90a684ad25a86deff16f80e11e257c6ac6611683, restoring
1d26b77d115eb39f03dffbdbaccf10e696cd4fe3.
Diffstat (limited to 'src/mongo/db/dbcommands.cpp')
-rw-r--r-- | src/mongo/db/dbcommands.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index d59ddbfc132..e83a287631b 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -1079,6 +1079,10 @@ public: Database* const db = autoDb.getDb(); Collection* coll = db ? db->getCollection(ns) : NULL; + // This can kill all cursors so don't allow running it while a background operation is in + // progress. + BackgroundOperation::assertNoBgOpInProgForNs(ns); + // If db/collection does not exist, short circuit and return. if (!db || !coll) { errmsg = "ns does not exist"; |