diff options
author | Misha Tyulenev <misha.tyulenev@mongodb.com> | 2022-03-29 17:03:22 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-29 22:15:23 +0000 |
commit | d1306d8b8118cf6c420f6c34daab28ab7c7c33b2 (patch) | |
tree | 018df57665ce47f61f95ffd547609299c224cde1 /src/mongo/db/op_observer_impl.cpp | |
parent | accb0f21fef16d0d114dabe533f3f013663d5c20 (diff) | |
download | mongo-d1306d8b8118cf6c420f6c34daab28ab7c7c33b2.tar.gz |
SERVER-63838 expose createIndexes and create events from chunkMigration only when showEventsSystem is true
Diffstat (limited to 'src/mongo/db/op_observer_impl.cpp')
-rw-r--r-- | src/mongo/db/op_observer_impl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp index 37fc927add5..5ee47e84dc9 100644 --- a/src/mongo/db/op_observer_impl.cpp +++ b/src/mongo/db/op_observer_impl.cpp @@ -1014,7 +1014,8 @@ void OpObserverImpl::onCreateCollection(OperationContext* opCtx, const NamespaceString& collectionName, const CollectionOptions& options, const BSONObj& idIndex, - const OplogSlot& createOpTime) { + const OplogSlot& createOpTime, + bool fromMigrate) { // do not replicate system.profile modifications if (collectionName.isSystemDotProfile()) { return; @@ -1035,6 +1036,7 @@ void OpObserverImpl::onCreateCollection(OperationContext* opCtx, oplogEntry.setObject( MutableOplogEntry::makeCreateCollCmdObj(collectionName, options, idIndex)); oplogEntry.setOpTime(createOpTime); + oplogEntry.setFromMigrateIfTrue(fromMigrate); logOperation(opCtx, &oplogEntry); } } |