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

Allow clients to add context to oplog

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • 4.2.5
    • Write Ops
    • None
    • Repl 2020-04-20

    Description

      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}
      }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: