Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-65909

Make oplog and change stream formats of {op: "n"} events consistent

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • QE 2022-05-16

      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.

            Assignee:
            arun.banala@mongodb.com Arun Banala
            Reporter:
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: