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

Add diagnostic information about multi-update/removes in oplog

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication, Write Ops
    • None
    • Replication

    Description

      Add an runtime ServerParameter to allow annotating fan-out operations in the oplog.

      For any fan-out (multi-update/remove) we can add an operation-id to each oplog entry which results from that operation as executed on the primary. In addition we would log a no-op oplog entry with the orig. query+update ( with only the operations and their paths so we don't log the orig data completely).

      With this information in the oplog we can easily detect inefficiencies in the replication process or costly operations via replication. This would also allow more explicit understanding of the root operation and its effects via replication.

      Here is an example oplog sequence in this mode:

       
      {ts:..., h:..., op:"n", o2:{counter:{$lt:100}}, 
       o:[
         {$push:{"a.b" : undefined}}, 
         {$inc:{"counter": undefined, version: undefined}], 
       opid:123123}
       
      {ts:..., h:..., op:u, o2:{_id:y}, 
       o:{$set:{counter:56, version:3, "a.7" :{...}}} 
       opid:123123}
      {ts:..., h:..., op:u, o2:{_id:x}, 
       o:{$set:{counter:200, version:12, "a.12" :{...}}} 
       opid:123123}

      Attachments

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: