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

disallow empty collection index build optimization on secondaries

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.4.0-rc0, 4.7.0
    • None
    • Storage
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-03-23
    • 43

    Description

      summary: shouldBuildIndexesOnEmptyCollectionSinglePhased() is racy and can make index builds to hang forever and can block DDL operations.

      The empty collection check is racy.

      [Acquires collection lock in X mode.
      Register index build.
      Performs collection empty check by opening cursor and see if record exists or not.
      Releases the collection lock.]

      ======>>>>Documents can get deleted here

      [Index build thread pool scheduling
      Collection scan phase
      Drain phase
      Commit phase]

      Attachments

        Activity

          People

            benety.goh@mongodb.com Benety Goh
            suganthi.mani@mongodb.com Suganthi Mani
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: