Open MestreDosMagros opened 5 years ago
Hello @MestreDosMagros (kkkk, nick muito engraçado!!)
I will try to reproduce this steps to check this. v5 use lock FileOpen concepts to not allow 2 process open same database at same time (only if both are using Mode=Shared). Are you using Mode=Embeded?
kkkk Valeu!
I'm using shared mode, but the problem exists even when i got just my console app running after i open the db file externally.
For example, my service created a database an run ok, then i make a copy of that db file, and open one copy externally on the studio, with that file i get the error running the app, when i swap the file and use the one i dont opened externally it runs fine.
I'm having the same issue. I am using the latest 4.x version of LiteDB in my project, and the latest LiteDB Studio exe from github.
Same here
Same here, exact same.
+1
We get it without even using studio. In very rare cases Store seems to fail, and after few failures to insert data, it starts to receive the error.
+1
+1 Opening db file with LiteDB Studio, app that created data file cannot open it again even when disconnected.
+1
+1
+1
+1
I think i found one of the reasons for the error: LiteDB.LiteException: Datafile is not a LiteDB database.
As i saw on other issues referecing this problem, is the database file that become kinda corrupt, but only when the system tryes to read, on the studio everything goes fine.
Im implementing the LiteDB in a very small project (.net core 2.2 console app as a windows service) and im using it just to keep track of the e-mails that im sending.
I faced this exception a bunch of times, then delete the db file and start again, but i noticed now, that i only have this problem when i read the file on the LiteDB Studio.
If i create a new file, everything goes fine until i open the database on the studio(dont tried on the shell), after i open the database on the studio i get this problem. Maybe the error is caused by it.
I dont have the time yet to investigate the code by my own, but im trying to help.
Cheers