diff options
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"; |