disallow empty collection index build optimization on secondaries

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              Suganthi Mani
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: