@ -314,9 +314,18 @@ namespace Squidex.Infrastructure.Commands
await persistence.ReadAsync();
if (persistence.IsSnapshotStale)
{
try
await persistence.WriteSnapshotAsync(Snapshot);
}
catch (Exception ex)
log.LogError(ex, w => w
.WriteProperty("action", "RepairSnapshot")
.WriteProperty("status", "Failed"));
@ -46,7 +46,7 @@ namespace Squidex.Infrastructure.States
public bool IsSnapshotStale
get => persistenceMode == PersistenceMode.SnapshotsAndEventSourcing && versionSnapshot < versionEvents;
get => persistenceMode == PersistenceMode.SnapshotsAndEventSourcing && versionSnapshot < versionEvents && versionSnapshot > EtagVersion.Empty;
public Persistence(DomainId ownerKey, Type ownerType,