Currently, we ignore certain errors when applying oplog in Mode::kRecovering for idempotency (e.g. this). This makes sense for initial sync, eMRC=false and rollback via refetch. But if we are recovering from a stable checkpoint, oplog application should be able to finish without any errors. And we should fassert on oplog application errors like we do in secondary oplog application.
Skip fassert on oplog application failures in selective restore process:
As the first step of selective restore is to start the shard node as a replica set to do oplog application of the snapshot taken for restore, so for selective restore we might still have some oplogs referencing the unrestored collections which will fail with collection see this test.Selective restore process done with --restore flag is enabled, so we need to skip fassert on oplog application failures. (See this PR for implementation)