diff options
author | Arun Banala <arun.banala@mongodb.com> | 2022-02-08 13:44:49 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-22 12:52:38 +0000 |
commit | af85e60d19d1a975a7babf5300c6d336e474e40a (patch) | |
tree | 77947d7687a43d749fee2393f78c683fd050135a /src/mongo/db/pipeline/document_source_change_stream.h | |
parent | b6485b14e3749d1c6bc506fa5a5a3fd9b169af74 (diff) | |
download | mongo-af85e60d19d1a975a7babf5300c6d336e474e40a.tar.gz |
SERVER-62801 Add change stream event for create operation
Diffstat (limited to 'src/mongo/db/pipeline/document_source_change_stream.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source_change_stream.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/document_source_change_stream.h b/src/mongo/db/pipeline/document_source_change_stream.h index 5db609a4627..a3dfc14d0dc 100644 --- a/src/mongo/db/pipeline/document_source_change_stream.h +++ b/src/mongo/db/pipeline/document_source_change_stream.h @@ -133,6 +133,10 @@ public: // after the transformation. static constexpr StringData kDocumentKeyField = "documentKey"_sd; + // The name of the field where the operation description of the non-CRUD operations will be + // located. This is complementary to the 'documentKey' for CRUD operations. + static constexpr StringData kOperationDescriptionField = "operationDescription"_sd; + // The name of the field where the pre-image document will be found, if requested and available. static constexpr StringData kFullDocumentBeforeChangeField = "fullDocumentBeforeChange"_sd; @@ -199,10 +203,11 @@ public: // UUID of a collection corresponding to the event (if applicable). static constexpr StringData kCollectionUuidField = "collectionUUID"_sd; - // Object with additional description of operation. - static constexpr StringData kOperationDescriptionField = "operationDescription"_sd; - + // // The different types of operations we can use for the operation type. + // + + // The classic change events. static constexpr StringData kUpdateOpType = "update"_sd; static constexpr StringData kDeleteOpType = "delete"_sd; static constexpr StringData kReplaceOpType = "replace"_sd; @@ -211,11 +216,16 @@ public: static constexpr StringData kRenameCollectionOpType = "rename"_sd; static constexpr StringData kDropDatabaseOpType = "dropDatabase"_sd; static constexpr StringData kInvalidateOpType = "invalidate"_sd; + + // The internal change events that are not exposed to the users. static constexpr StringData kReshardBeginOpType = "reshardBegin"_sd; static constexpr StringData kReshardDoneCatchUpOpType = "reshardDoneCatchUp"_sd; // Internal op type to signal mongos to open cursors on new shards. static constexpr StringData kNewShardDetectedOpType = "kNewShardDetected"_sd; + // These events are guarded behind the 'showExpandedEvents' flag. + static constexpr StringData kCreateOpType = "create"_sd; + static constexpr StringData kRegexAllCollections = R"((?!(\$|system\.)))"_sd; static constexpr StringData kRegexAllDBs = R"(^(?!(admin|config|local)\.)[^.]+)"_sd; static constexpr StringData kRegexCmdColl = R"(\$cmd$)"_sd; |