|
Implement startup recovery logic for a replica set node that has been restarted. This is split from the work in SERVER-39451.
This should ideally be able to enable the indexbg_shutdown.js and indexbg_restart_secondary.js tests by fixing a specific bug. This test hits a bug described below on secondaries:
- Process a startIndexBuild oplog entry and start the background thread
- Process a commitIndexBuild oplog entry, and wait for the build to finish
- Interrupt the index build at shutdown, return status::OK
- Joining the index build will succeed and the "commitIndexBuild" will be successfully applied
- Restart the secondary, which restarts the index build. The commit will not be applied at startup because it succeeded before shutdown
|