diff options
author | Eric Milkie <milkie@10gen.com> | 2015-06-01 13:55:15 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2015-06-04 09:10:05 -0400 |
commit | bc44c26302d2f377bc0cefb4e8fbffa247d18db6 (patch) | |
tree | 24335e29f9b349860a97c51331b399c41cd6edab /src/mongo/db/commands/compact.cpp | |
parent | 167d6de7241570e8bc73bcd8878fe91f1f77c12a (diff) | |
download | mongo-bc44c26302d2f377bc0cefb4e8fbffa247d18db6.tar.gz |
SERVER-17923 prohibit database/collection actions when bg index is running
Diffstat (limited to 'src/mongo/db/commands/compact.cpp')
-rw-r--r-- | src/mongo/db/commands/compact.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/mongo/db/commands/compact.cpp b/src/mongo/db/commands/compact.cpp index c0986823389..e0c935a3f19 100644 --- a/src/mongo/db/commands/compact.cpp +++ b/src/mongo/db/commands/compact.cpp @@ -77,16 +77,6 @@ namespace mongo { } CompactCmd() : Command("compact") { } - virtual std::vector<BSONObj> stopIndexBuilds(OperationContext* opCtx, - Database* db, - const BSONObj& cmdObj) { - const std::string ns = parseNsCollectionRequired(db->name(), cmdObj); - - IndexCatalog::IndexKillCriteria criteria; - criteria.ns = ns; - return IndexBuilder::killMatchingIndexBuilds(db->getCollection(ns), criteria); - } - virtual bool run(OperationContext* txn, const string& db, BSONObj& cmdObj, @@ -169,8 +159,6 @@ namespace mongo { log() << "compact " << ns << " begin, options: " << compactOptions.toString(); - std::vector<BSONObj> indexesInProg = stopIndexBuilds(txn, collDB, cmdObj); - StatusWith<CompactStats> status = collection->compact( txn, &compactOptions ); if ( !status.isOK() ) return appendCommandStatus( result, status.getStatus() ); @@ -180,8 +168,6 @@ namespace mongo { log() << "compact " << ns << " end"; - IndexBuilder::restoreIndexes(txn, indexesInProg); - return true; } }; |