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

IndexRebuilder should only restart index builds initiated internally

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.5.0
    • Fix Version/s: None
    • Component/s: Indexing, Replication
    • Labels:
      None
    • Operating System:
      ALL
    • Case:

      Description

      It should not restart user-initiated index builds.

      Scenario:
      1) User starts building a unique index on {a:1} on the current primary, node A.
      2) Node A dies suddenly (kill -9 or power failure, etc) and node B becomes the new primary.
      3) Node A restarts and the IndexRebuilder restarts building of the index.

      At this point, node A now has an index that does not exist on the primary and never will. This would be less of a problem for a non-unique index, but because this is unique, an insert can now succeed on the primary but fail on node A, breaking replication.

      I think the right solution is to only rebuild indexes where we would not call logOp on completion.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-execution Backlog - Execution Team
              Reporter:
              redbeard0531 Mathias Stearn
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: