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

simplify update and delete replication oplog entry application

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
      None
    • Replication
    • Repl 2020-03-23

      Today, applyOperation_inlock() builds and executes an entire Query plan to do each replicated 'u' update and 'd' delete operation. This method has a lot of overhead that could be avoided. I believe we can avoid the query code entirely for simplification and performance improvements.
      For example, instead of calling deleteObjects(), the delete code could instead:
      1. Find the RecordId of the document to be deleted by doing a point lookup for the _id field in the _id index (use IndexAccessMethod::findSingle()).
      2. Use that RecordId in a call to Collection::deleteDocument().

      For update operations, a similar (but a bit more involved) method could be used.

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated: