[SERVER-59084] Add "includeIndexBuildInfo" flag to listIndexes Created: 03/Aug/21 Updated: 29/Oct/23 Resolved: 03/Dec/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Gabriel Marks |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, newgrad | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Sprint: | Execution Team 2021-11-01, Execution Team 2021-11-29 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 20 | ||||||||||||||||||||
| Description |
|
The current listIndexes command displays in-progress index builds by default, but it does not include any information to indicate which indexes are in progress. The command will report this information with the "includeBuildUUIDs" option, which displays the UUID of any active index builds as its "buildUUID". This option is not enabled by default, and at the time of writing, is not documented. To avoid confusion for users, listIndexes should just include buildUUIDs by default. We should consider eliminating the includeBuildUUIDs option, or at least making it default to 'true', since the current behavior is pretty confusing. In the spirit of being more explicit, we may also want to consider adding an "inProgress" field, since it might not be obvious that the presence of a buildUUID means that an index build is in progress. "includeBuildUUIDs" is not part of the stable API, so I think we can safely remove it without having to update the API version, but I'm not sure. |
| Comments |
| Comment by Githook User [ 03/Dec/21 ] |
|
Author: {'name': 'Gabriel Marks', 'email': 'gabriel.marks@mongodb.com', 'username': 'marksg07'}Message: |
| Comment by Gabriel Marks [ 18/Nov/21 ] |
|
Update: We cannot enable the includeBuildUUIDs flag by default, since that would constitute a breaking change in the listIndexes API, which would affect users (including mongomirror), and would also require lots of internal changes because we rely on listIndexes internally. Since the includeBuildUUIDs flag is used internally, we have decided not to modify its behavior and leave it internal-only. We will add a new flag to listIndexes, includeIndexBuildInfo, which if enabled, will return information about the index build state along with each index in the listIndexes output. This will be designed to be extensible and possibly user-facing in the future. |
| Comment by Dianna Hohensee (Inactive) [ 03/Aug/21 ] |
|
For context (but TL;DR this ticket seems like a good idea): includeBuildUUIDs was added for initial sync, which at the time of simultaneous index builds development only cared about completed index builds, because replicating nodes would not start building an index until they saw the createIndexes oplog entry written upon index completion on the sync source. Simul builds required initial sync to become aware of in-progress index builds. I think listIndexes was not modified to always return in-progress for downstream reasons, that these reasons have clearly been resolved since we default to include in-progress builds now. |