[SERVER-45572] Make IndexBuildsCoordinator an interface Created: 14/Jan/20 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | techdebt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Storage Execution
|
||||||||||||
| Sprint: | Execution Team 2020-04-20, Execution Team 2020-05-04, Execution Team 2020-05-18, Execution Team 2020-06-01 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
Once the mobile storage engine is removed, we can consolidate the IndexBuildsCoodinator into a real interface with a single implementation. It is currently a very bloated class. We could optionally split the implementations into single-phase and two-phase components. |
| Comments |
| Comment by Eric Milkie [ 03/Feb/20 ] |
|
Note: the mobile storage engine has now been removed in the master branch. |
| Comment by Dianna Hohensee (Inactive) [ 29/Jan/20 ] |
|
The original idea behind the IndexBuildsCoordinator and IndexBuildManager is that the Coordinator would handle cross-replica set relevant index building code while the Manager would deal with all of the server specific index building code. The ReplIndexBuildState was a tool to maintain and facilitate passing around an index build's state information within the Coordinator. Ultimately, I thought it would be nice to stick the IndexBuildsManager behind some kind of storage layer interface, whereas the IndexBuildsCoordinator would live above the storage engine layer, bossing the storage layer around to get the index builds done as the replica set desires. I haven't been following along with the project to understand why we would keep single-phase index builds in future versions. |
| Comment by Benety Goh [ 14/Jan/20 ] |
|
The index building logic within IndexBuildsManager could also be moved into the ReplIndexBuildState class. |
| Comment by Benety Goh [ 14/Jan/20 ] |
|
The ReplIndexBuildState could be turned into a more active class with the handling of single-phase/two-phase index builds in different subclases. |