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

Race in _finishReplSetReconfig with background compaction

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc5
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • v8.0
    • Hide

      See those patches to see the diff:
      patch build
      patch build

      Show
      See those patches to see the diff: patch build patch build
    • Repl 2024-03-04, Repl 2024-03-18, Repl 2024-04-01, Repl 2024-04-15, Repl 2024-04-29, Repl 2024-05-13
    • 200

      When background compaction is enabled (as shown here and here), one may hit the following invariant:

      "expr":"_rsConfigState == kConfigReconfiguring","file":"src/mongo/db/repl/replication_coordinator_impl.cpp","line":4224
      

      suganthi.mani@mongodb.com started to investigate the issue:

      It seems like your change has exposed a bug in repl layer. Enabling the auto compaction as part of notifyReplRecoveryComplete (internally called by replSetInitiate cmd code path) , makes replSetInitiate cmd to take longer time to complete (few milliseconds) and that causes to race with stepup thread and leading to the invariant failure

            Assignee:
            xuerui.fa@mongodb.com Xuerui Fa
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:
              Resolved: