I have EventStore(5.0.5) running in embedded mode on desktop software running on Windows tablets.
Looking in our logs there is occasional entries like:
InvalidReadException: Log record at actual pos 155425642 has non-positive length: 0. in chunk #6-6
.CorruptDatabaseException: Corrupt database detected. —> EventStore.Core.Exceptions.ChunkNotFoundException: C:\ProgramData\BlastIQ_Local\Data\eventstore\data\chunk-000000.000000 not found.
I’m assuming these errors are caused by power loss events corrupting the database. Looks like the recommended approach is to disable disk cache:
However, I don’t have control over the OS’s the software is installed on.
Will setting WriteThrough=true & Unbuffered=true achieve the same?
Is the OS disk caching option more effective than those flags?
Are there any other settings that can be configured to minimize power loss file corruption?