diff options
author | Benety Goh <benety@mongodb.com> | 2017-08-14 16:01:51 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2017-08-15 12:00:35 -0400 |
commit | 578e5c4f168db90ebb7ec661831363575d801f5b (patch) | |
tree | 4fb93cdd7ba236270816d4e9692614bf43a94496 /src/mongo/db/op_observer.h | |
parent | eacef2db99841b1a88837f0e10d1c8726656dc0f (diff) | |
download | mongo-578e5c4f168db90ebb7ec661831363575d801f5b.tar.gz |
SERVER-30212 OpObserver::onRenameCollection() returns rename op time
Diffstat (limited to 'src/mongo/db/op_observer.h')
-rw-r--r-- | src/mongo/db/op_observer.h | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/mongo/db/op_observer.h b/src/mongo/db/op_observer.h index f6f1408f585..9ccafadc298 100644 --- a/src/mongo/db/op_observer.h +++ b/src/mongo/db/op_observer.h @@ -161,7 +161,7 @@ public: /** * This function logs an oplog entry when a 'drop' command on a collection is executed. * Returns the optime of the oplog entry successfully written to the oplog. - * Returns a null optime if an oplog entry should not be written for this operation. + * Returns a null optime if an oplog entry was not written for this operation. */ virtual repl::OpTime onDropCollection(OperationContext* opCtx, const NamespaceString& collectionName, @@ -181,14 +181,21 @@ public: OptionalCollectionUUID uuid, const std::string& indexName, const BSONObj& indexInfo) = 0; - virtual void onRenameCollection(OperationContext* opCtx, - const NamespaceString& fromCollection, - const NamespaceString& toCollection, - OptionalCollectionUUID uuid, - bool dropTarget, - OptionalCollectionUUID dropTargetUUID, - OptionalCollectionUUID dropSourceUUID, - bool stayTemp) = 0; + + /** + * This function logs an oplog entry when a 'renameCollection' command on a collection is + * executed. + * Returns the optime of the oplog entry successfully written to the oplog. + * Returns a null optime if an oplog entry was not written for this operation. + */ + virtual repl::OpTime onRenameCollection(OperationContext* opCtx, + const NamespaceString& fromCollection, + const NamespaceString& toCollection, + OptionalCollectionUUID uuid, + bool dropTarget, + OptionalCollectionUUID dropTargetUUID, + OptionalCollectionUUID dropSourceUUID, + bool stayTemp) = 0; virtual void onApplyOps(OperationContext* opCtx, const std::string& dbName, const BSONObj& applyOpCmd) = 0; |