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

all non-primary-started index builds should be labeled backgroundSecondary

    • Fully Compatible
    • ALL
    • v4.2, v4.0
    • Execution Team 2019-07-15
    • 13

      The logic for setting the backgroundSecondary flag in an index spec for an index build currently checks replCoord->getMemberState().secondary():
      https://github.com/mongodb/mongo/blob/8071e24f0f7a4fa83015daa59d828c11c246423c/src/mongo/db/catalog/index_build_block.cpp#L85

      This causes such builds to be mislabeled if the node happens to be in state RECOVERING. The effect of this is that if the node starts and discovers such an unfinished index build, it will remove the catalog entry instead of continuing the index build, thus causing the index to be lost on that node.

            Assignee:
            milkie@mongodb.com Eric Milkie
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: