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

Add information about index build state in listIndexes output

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • Execution Team 2022-05-02, Execution Team 2022-05-16, Execution Team 2022-05-30
    • 20

      See discussion in SERVER-59084 – Currently, in the currentOp output as well as in the system.indexBuilds collection, there's a lot of information regarding the status of index builds (Namely, the phase of each index build and which indexes are being built by a given index build). It would be nice to have this index build state information be output in listIndexes. After SERVER-59084, the listIndexes output will include, per index, a field "indexBuildStatus" denoting whether that index is currently building or not, but not the specific phase of index building.


      Information about phases for each index build which goes into CurOp is maintained by various index-build related operations, for example here where the phase is set to scanning collection. Information about index builds in system.indexBuilds is maintained by _setUpIndexBuildInner here. The serverStatus command also includes some information about current index builds, but it only holds how many index builds are in each phase, not which index builds are in which phase – that information is maintained in the activeIndexBuilds server status section by the IndexBuildsCoordinator, for example here where the number of index builds in the scanCollection phase is maintained.

            benety.goh@mongodb.com Benety Goh
            gabriel.marks@mongodb.com Gabriel Marks
            0 Vote for this issue
            5 Start watching this issue