[SERVER-60791] Add information about index build state in listIndexes output Created: 18/Oct/21  Updated: 29/Oct/23  Resolved: 23/May/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Gabriel Marks Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-15353 [Server] Investigate changes in SERVE... Backlog
Related
related to SERVER-59084 Add "includeIndexBuildInfo" flag to l... Closed
is related to SERVER-57625 Add serverStatus metrics for index bu... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-05-02, Execution Team 2022-05-16, Execution Team 2022-05-30
Participants:
Linked BF Score: 20

 Description   

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.



 Comments   
Comment by Githook User [ 20/May/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60791 add replication state to listIndexes indexBuildInfo section
Branch: master
https://github.com/mongodb/mongo/commit/537d6f9fbf143b4395d1f62f3ce4741a7b57a333

Comment by Githook User [ 19/May/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60791 add opid and resumable index build info to listIndexes indexBuildInfo section
Branch: master
https://github.com/mongodb/mongo/commit/5b63a432d152cafcd2e8479a28754c3d51d63baf

Comment by Githook User [ 18/May/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: Revert "SERVER-60791 add opid and resumable index build info to listIndexes indexBuildInfo section"

This reverts commit 76afdba43ae9e6000f7837f8e2072b00fccf3049.
Branch: master
https://github.com/mongodb/mongo/commit/1ed99dd17503f9cc05a5a722fe3730715b0742d5

Comment by Githook User [ 18/May/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: Revert "SERVER-60791 add replication state to listIndexes indexBuildInfo section"

This reverts commit 3b24de4cdac250de6c74874d1410ab6d433d79dc.
Branch: master
https://github.com/mongodb/mongo/commit/8ca44f1214297e7dd6311dd82548146989658831

Comment by Githook User [ 17/May/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60791 add replication state to listIndexes indexBuildInfo section
Branch: master
https://github.com/mongodb/mongo/commit/3b24de4cdac250de6c74874d1410ab6d433d79dc

Comment by Githook User [ 17/May/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60791 add opid and resumable index build info to listIndexes indexBuildInfo section
Branch: master
https://github.com/mongodb/mongo/commit/76afdba43ae9e6000f7837f8e2072b00fccf3049

Comment by Githook User [ 16/May/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60791 add phase and method (hybrid/foreground) to listIndexes indexBuildInfo section
Branch: master
https://github.com/mongodb/mongo/commit/690427709f5382b110615394101a3dd3b76e6525

Comment by Githook User [ 16/May/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60791 IndexBuildTest.assertIndexes() supports includeIndexBuildInfo
Branch: master
https://github.com/mongodb/mongo/commit/0fc78a8b14bb85d655a25f571d5d76af9a989233

Comment by Githook User [ 16/May/22 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-60791 add appendBuildInfo() method to IndexBuildsCoordinator and index build class hierarchy for listIndexes includeIncludeBuildInfo

Contains no functional or formatting changes to listIndexes.
Branch: master
https://github.com/mongodb/mongo/commit/04402176f1ae8471396905b419ebb3d1b7d1c7a9

Generated at Thu Feb 08 05:50:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.