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

Rollback should take global write lock while truncating oplog

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Replication
    • Labels:
      None

      Description

      In ReplicationRecoveryImpl::_truncateOplogTo we lock the oplog's database and collection; however, we have a general principle that we can read from the oplog with a global IS lock, write to it without locking the database and collection.

      For example the oplog cap maintainer thread only takes the global IX lock to truncate old entries in OplogCapMaintainerThread::_deleteExcessDocuments.

      Let's change ReplicationRecoveryImpl to take the global X or IX lock (I'm not sure which) instead of locking the oplog's db and collection.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-repl Backlog - Replication Team
              Reporter:
              jesse A. Jesse Jiryu Davis
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated: