diff options
author | Benety Goh <benety@mongodb.com> | 2016-12-06 15:13:17 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2016-12-07 10:11:50 -0500 |
commit | b666c293b8dee59b0bb8926afafc6eebf9c7d21c (patch) | |
tree | 3bdc6f54dea3aec82cbdad525e8edc2ec1541936 /src/mongo/db/commands/create_indexes.cpp | |
parent | 27b1e9a1d61fdd522df5376495859cf9f63725a9 (diff) | |
download | mongo-b666c293b8dee59b0bb8926afafc6eebf9c7d21c.tar.gz |
SERVER-27301 converted OpObserver into an interface. ServiceContext should always return a valid OpObserver implementation.
Diffstat (limited to 'src/mongo/db/commands/create_indexes.cpp')
-rw-r--r-- | src/mongo/db/commands/create_indexes.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/db/commands/create_indexes.cpp b/src/mongo/db/commands/create_indexes.cpp index 116a6248cc9..570d95a7bdb 100644 --- a/src/mongo/db/commands/create_indexes.cpp +++ b/src/mongo/db/commands/create_indexes.cpp @@ -392,10 +392,8 @@ public: for (auto&& infoObj : indexInfoObjs) { std::string systemIndexes = ns.getSystemIndexesCollection(); - auto opObserver = getGlobalServiceContext()->getOpObserver(); - if (opObserver) { - opObserver->onCreateIndex(txn, systemIndexes, infoObj); - } + getGlobalServiceContext()->getOpObserver()->onCreateIndex( + txn, systemIndexes, infoObj, false); } wunit.commit(); |