Basically, there are two classes of errors in the event processor:
- Incorrect event: The event is faulty due to a mistake by the transaction sender, e.g. bad signature in validatorAdded
- Internal fault: if e.g. disk space runs out, we wont be able to modify the database.
For the first kind, we should just continue the sync with the next event.
But for the second kind, we should retry, because we must not miss events. But this is tricky: while we can roll back the database transaction, we can not roll back the internal memory cache. But we rely on the internal cache being in the same state as the database.
We need to cope with this. As internal faults should be exceedingly rare, it should be fine to just reload the in-memory database.