Hi Steven,
I'm wondering whether it would be a better Idea to fail fast when we are unable to read the snapshot.
E.g. like this in the AbstractEventStore Class:
public DomainEventStream readEvents(String aggregateIdentifier) {
Optional<DomainEventMessage<?>> optionalSnapshot;
try {
optionalSnapshot = storageEngine.readSnapshot(aggregateIdentifier);
} catch (Exception | LinkageError e) {
String message = String.format("Error reading snapshot. I stop to read the events for aggregateIdentifier %s. Caused by: %s %s",
aggregateIdentifier, e.getClass().getName(), e.getMessage());
throw new JdbcException(message, e);
}
If we have an exception due to a db rollback, a retry wouldn't help since the transaction has already been marked as rollback only.
What do you think?