[SERVER-65909] Make oplog and change stream formats of {op: "n"} events consistent Created: 23/Apr/22  Updated: 29/Oct/23  Resolved: 23/May/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Bernard Gorman Assignee: Arun Banala
Resolution: Fixed Votes: 0
Labels: pm1950-m6
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-67413 Remove getNewShardDetectedOpName afte... Closed
related to SERVER-66645 Validate change stream output 'ns' fi... Closed
Backwards Compatibility: Fully Compatible
Sprint: QE 2022-05-16
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 23/May/22 ]

Author:

{'name': 'Arun Banala', 'email': 'arun.banala@mongodb.com', 'username': 'banarun'}

Message: SERVER-65909 Make oplog and change stream formats of

{op: "n"}

events consistent
Branch: master
https://github.com/mongodb/mongo/commit/9d559b3ad8942ade301b41284dee9e6b8c8f098c

Generated at Thu Feb 08 06:03:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.