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

disallow empty collection index build optimization on secondaries

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc0, 4.7.0
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2020-03-23
    • 43

      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]

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

              Created:
              Updated:
              Resolved: