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

Rollback should take global write lock while truncating oplog

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication
    • None
    • Replication

    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

        Activity

          People

            backlog-server-repl Backlog - Replication Team
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated: