There are a number of {op:"n"} oplog events that change streams consume, some for internal use and some of which are returned to the client:
- migrateChunkToNewShard
- reshardBegin
- reshardDoneCatchUp
- shardCollection
- migrateLastChunkFromShard
- refineCollectionShardKey
- reshardCollection
The newly-added events shardCollection, migrateLastChunkFromShard, refineCollectionShardKey and reshardCollection all record their o2 fields similar to how a command records an operation, with the first field of the object being {opName: "db.collection"}. They also generate operationDescription fields and resume tokens consistent with other events.
The older events migrateChunkToNewShard, reshardBegin, and reshardDoneCatchUp, however, record their oplog entries as {o2.type: "opName"} and their change events record the description of the operation as documentKey, since operationDescription did not exist at the time they were created. We should make all these events consistent with other events both in their oplog and change event formats.
- related to
-
SERVER-67413 Remove getNewShardDetectedOpName after 7.0
- Closed
-
SERVER-66645 Validate change stream output 'ns' field in resharding_change_stream_internal_ops.js
- Closed