diff options
author | Hari Khalsa <hkhalsa@10gen.com> | 2014-04-30 15:32:46 -0400 |
---|---|---|
committer | Hari Khalsa <hkhalsa@10gen.com> | 2014-04-30 16:02:04 -0400 |
commit | c7625872ea64c1846c6799966a700d57c6e2ad6e (patch) | |
tree | 26ae117c1f5e4f4049fcdc4a364342a2d9a36e92 /src/mongo/db/auth/auth_index_d.cpp | |
parent | 57e01bdc252cb06225edb0ac5fc712666236dbcf (diff) | |
download | mongo-c7625872ea64c1846c6799966a700d57c6e2ad6e.tar.gz |
SERVER-13643 pull TransactionExperiment above (most) catalog stuff
Diffstat (limited to 'src/mongo/db/auth/auth_index_d.cpp')
-rw-r--r-- | src/mongo/db/auth/auth_index_d.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/auth/auth_index_d.cpp b/src/mongo/db/auth/auth_index_d.cpp index 738e8883f0e..09c289b70c7 100644 --- a/src/mongo/db/auth/auth_index_d.cpp +++ b/src/mongo/db/auth/auth_index_d.cpp @@ -32,12 +32,13 @@ #include "mongo/base/status.h" #include "mongo/db/auth/authorization_manager.h" #include "mongo/db/auth/authorization_manager_global.h" +#include "mongo/db/catalog/collection.h" +#include "mongo/db/catalog/index_catalog.h" #include "mongo/db/client.h" #include "mongo/db/dbhelpers.h" -#include "mongo/db/jsobj.h" -#include "mongo/db/catalog/index_catalog.h" #include "mongo/db/index/index_descriptor.h" -#include "mongo/db/catalog/collection.h" +#include "mongo/db/jsobj.h" +#include "mongo/db/storage/mmap_v1/dur_transaction.h" #include "mongo/util/assert_util.h" #include "mongo/util/log.h" @@ -83,6 +84,7 @@ namespace { // Make sure the old unique index from v2.4 on system.users doesn't exist. Client::WriteContext wctx(systemUsers); + DurTransaction txn; Collection* collection = wctx.ctx().db()->getCollection(NamespaceString(systemUsers)); if (!collection) { return; @@ -90,7 +92,7 @@ namespace { IndexCatalog* indexCatalog = collection->getIndexCatalog(); IndexDescriptor* oldIndex = NULL; while ((oldIndex = indexCatalog->findIndexByKeyPattern(v1SystemUsersKeyPattern))) { - indexCatalog->dropIndex(oldIndex); + indexCatalog->dropIndex(&txn, oldIndex); } } } |