diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-04-04 15:59:49 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-04-05 12:44:10 -0400 |
commit | 8765acc0fcc6ca3dd7158521ba8d864af4e0f2df (patch) | |
tree | 9fc35ffc0f93b334bbc846cb6ccf91250ae11252 /src/mongo/db/dbhelpers.cpp | |
parent | 97691221bcf43245ddfd906766abc93bb617d2aa (diff) | |
download | mongo-8765acc0fcc6ca3dd7158521ba8d864af4e0f2df.tar.gz |
SERVER-27691 Make OperationContext::setKillAllOperations interrupt all operations
Diffstat (limited to 'src/mongo/db/dbhelpers.cpp')
-rw-r--r-- | src/mongo/db/dbhelpers.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/mongo/db/dbhelpers.cpp b/src/mongo/db/dbhelpers.cpp index c247d31a6d1..9eec07c3fea 100644 --- a/src/mongo/db/dbhelpers.cpp +++ b/src/mongo/db/dbhelpers.cpp @@ -83,34 +83,6 @@ using std::stringstream; using logger::LogComponent; -void Helpers::ensureIndex(OperationContext* opCtx, - Collection* collection, - BSONObj keyPattern, - IndexDescriptor::IndexVersion indexVersion, - bool unique, - const char* name) { - BSONObjBuilder b; - b.append("name", name); - b.append("ns", collection->ns().ns()); - b.append("key", keyPattern); - b.append("v", static_cast<int>(indexVersion)); - b.appendBool("unique", unique); - BSONObj o = b.done(); - - MultiIndexBlock indexer(opCtx, collection); - - Status status = indexer.init(o).getStatus(); - if (status.code() == ErrorCodes::IndexAlreadyExists) - return; - uassertStatusOK(status); - - uassertStatusOK(indexer.insertAllDocumentsInCollection()); - - WriteUnitOfWork wunit(opCtx); - indexer.commit(); - wunit.commit(); -} - /* fetch a single object from collection ns that matches query set your db SavedContext first */ |