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

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

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2, v4.0
    • Sprint:
      Execution Team 2019-07-15
    • Linked BF Score:
      13

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            milkie Eric Milkie
            Reporter:
            milkie Eric Milkie
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: