|
Closing as Won't Do, as the current behaviour looks fine.
- Startup recovery (from unclean shutdown) restarts an incomplete index build.
- The DiskSpaceMonitor starts after startup recovery completes. At that point, it is able to abort the in-progress build.
- A corner case scenario probably exists where the server crashed because it ran out of disk space, an index build contributing to it. On restart, the DiskSpaceMonitor must race again to cancel that index build. Even if it eventually managed to do it (potentially after multiple restarts) at that point, the index build may have already committed in the replica set. In summary, it would be the administrator's responsibility to increase disk size at that point.
- Replication rollback kills the index build. Quoting here: "Called during rollback to stop all active index builds. [...] no abortIndexBuild is replicated and the current node will restart these builds at the completion of rollback. [...]". At that point, the DiskSpaceMonitor comes into play.
|