You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the exception that is happening in the call to EnsureIndex():
LiteDB.LiteException: Datafile is not a LiteDB database.
at LiteDB.HeaderPage.ReadContent(ByteReader reader)
at LiteDB.BasePage.ReadPage(Byte[] buffer)
at LiteDB.PageService.GetPage[T](UInt32 pageID)
at LiteDB.PageService.NewPage[T](BasePage prevPage)
at LiteDB.CollectionService.Add(String name)
at LiteDB.LiteEngine.GetCollectionPage(String name, Boolean addIfNotExits)
at LiteDB.LiteEngine.Transaction[T](String collection, Boolean addIfNotExists, Func`2 action)
at LiteDB.LiteEngine.EnsureIndex(String collection, String field, String expression, Boolean unique)
at LiteDB.LiteCollection`1.EnsureIndex(String field, String expression, Boolean unique)
at LiteDB.LiteCollection`1.EnsureIndex[K](Expression`1 property, Boolean unique)
at Program.Main() in Program.cs:line 25
My guess is
the pages that are written initially in response to the InitialSize property are not being encrypted
subsequent attempts to read these pages use decryption and thus return invalid data
The text was updated successfully, but these errors were encountered:
Hi @spodskubka, you are absolute right. As I read issue title I get same idea: initial size create pages with no encryption... and this can b viewed here:
There is not big difference between encrypted vs. unencrypted performance (~10%). I made a test (in v3) using different operations with/without encryption. You can see times here:
This may be by design, but i haven't found it documented anywhere, so I am reporting this as an issue.
The following code uses LiteDB 4.1.1 and demonstrates the issue:
This is the exception that is happening in the call to
EnsureIndex()
:My guess is
The text was updated successfully, but these errors were encountered: