summaryrefslogtreecommitdiff
path: root/src/mongo/db/op_observer_impl.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2019-01-08 18:54:38 -0500
committerBenety Goh <benety@mongodb.com>2019-01-08 18:54:54 -0500
commitecf269ff6494930ae4dfa98f66c4cbd6335cede2 (patch)
treef4b8d60e6a09812b06c6d65ff7645d70efded954 /src/mongo/db/op_observer_impl.cpp
parente2b8d928d796b4b6a6144bc4aa27db6fe95bfdd8 (diff)
downloadmongo-ecf269ff6494930ae4dfa98f66c4cbd6335cede2.tar.gz
SERVER-38800 OpObserver accepts numRecords for drop and rename operations
Diffstat (limited to 'src/mongo/db/op_observer_impl.cpp')
-rw-r--r--src/mongo/db/op_observer_impl.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/op_observer_impl.cpp b/src/mongo/db/op_observer_impl.cpp
index d9086af8939..7a4a75a1f28 100644
--- a/src/mongo/db/op_observer_impl.cpp
+++ b/src/mongo/db/op_observer_impl.cpp
@@ -668,6 +668,7 @@ void OpObserverImpl::onDropDatabase(OperationContext* opCtx, const std::string&
repl::OpTime OpObserverImpl::onDropCollection(OperationContext* opCtx,
const NamespaceString& collectionName,
OptionalCollectionUUID uuid,
+ std::uint64_t numRecords,
const CollectionDropType dropType) {
const auto cmdNss = collectionName.getCommandNS();
const auto cmdObj = BSON("drop" << collectionName.coll());
@@ -734,6 +735,7 @@ repl::OpTime OpObserverImpl::preRenameCollection(OperationContext* const opCtx,
const NamespaceString& toCollection,
OptionalCollectionUUID uuid,
OptionalCollectionUUID dropTargetUUID,
+ std::uint64_t numRecords,
bool stayTemp) {
const auto cmdNss = fromCollection.getCommandNS();
@@ -788,8 +790,10 @@ void OpObserverImpl::onRenameCollection(OperationContext* const opCtx,
const NamespaceString& toCollection,
OptionalCollectionUUID uuid,
OptionalCollectionUUID dropTargetUUID,
+ std::uint64_t numRecords,
bool stayTemp) {
- preRenameCollection(opCtx, fromCollection, toCollection, uuid, dropTargetUUID, stayTemp);
+ preRenameCollection(
+ opCtx, fromCollection, toCollection, uuid, dropTargetUUID, numRecords, stayTemp);
postRenameCollection(opCtx, fromCollection, toCollection, uuid, dropTargetUUID, stayTemp);
}