DevrexLabs / OrigoDB

In-memory event-sourced database engine for NET/Mono
http://origodb.com
MIT License
137 stars 34 forks source link

Initial snapshot when PersistenceMode is ManualSnapshots #24

Open loofbon opened 7 years ago

loofbon commented 7 years ago

Even when PersistenceMode is set to ManualSnapshots, an initial journal entry is still created on disk. Not sure if there’s any way to avoid/defer this for cases when the database is intended to be ephemeral.

rofr commented 7 years ago

Good catch, that shouldn't be the case. This is not a fully explored feature, neither in tests nor production use cases. After a quick peek at the code, this looks like it will be a fairly simple change. Meanwhile, if you want to turn off persistence altogether you can use the in memory storage components:

https://github.com/DevrexLabs/OrigoDB/blob/dev/src/OrigoDB.Core/Configuration/ConfigurationExtensions.cs#L14-L19