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

appendOplogNote command needs to ensure it's still primary after taking locks

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Labels:
    • Replication
    • ALL
    • Repl 2017-10-02, Repl 2017-10-23

      The append oplog note command relies on the command subsystem to prevent it from running when it's a secondary, but that check is inherently racy as it's not holding any db locks at that point.

      Also, the appendOplogNote command currently takes a global write lock, which is unnecessary heavy.

      The command should be changed to take the global lock in mode IX, check that it's still primary, and then proceed with calling onOpMessage to write the no-op oplog entry (which takes a write lock on the oplog internally).

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: