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

Allow clients to add context to oplog

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.2.5
    • Component/s: Write Ops
    • Labels:
      None
    • Repl 2020-04-20

      When a document is mutated, it would be very handy to be able to audit what caused the mutation to happen. However, the oplog doesn't currently include much client context.

      Ideally, clients could add some context, eg:

      db.runCommand({
        insert: mycoll,
        documents: [{_id: "myid"}],
        oplogContext: {"some": "document}
      })
      

      And then this context could appear in the oplog:

      {
        "ts": Timestamp(1585854690, 1),
        "t": NumberLong(1),
        ...
        "context": {"some": "document}
      }
      

            Assignee:
            alan.zheng@mongodb.com Alan Zheng
            Reporter:
            vasi@stripe.com Dave Vasilevsky
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: