|
We should add failpoints to rs_rollback.cpp that can allow us to more deterministically test rollbacks scenarios where operations are happening on the sync source node during rollback. There are two failpoints that should provide a good level of control.
- Provide ability to hang at specified doc refetch progress. This failpoint can take as an argument a percentage (between 0 and 1), that will determine when in the document refetching process rollback will hang. For example, specifying a hang point of 0.5, and with 100 documents to refetch, rollback would hang after the 50th refetch, allowing us to apply operations on the sync source while rollback is paused.
- Provide ability to hang before re-syncing collection metadata. This will provide ability to apply more operations to the sync source after we have already updated minValid once, and after we have refetched docs.
These two fail points should provide a suitable level of control, and help to make tests more reproducible.
|