We use litedb to pull information from a mongodb instance and "export the configuration" of our app. The export translates the Mongo.Bson.BsonDocuments to LiteDb documents and saves them to collections in a litedb file. After that, a 7zip operation is run to package it up for developers to load that configuration of our app on a local dev machine.
We frequently encounter what appears to be a corruption error when we receive the file.
I'm speculating there's an operation thats in the process of writing to the litedb file when 7zip is compressing the byte stream, thus leaving the litedb file itself, from the archive standpoint in a bad state.
Is there a need to flush / close the Litedb instance? Is there a way to force flush? I'm pretty sure we are calling Dispose by applying using statements around the writes.