-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Corrupt database caused by server crash without saving data properly #126
Comments
That might be the 1 second storage update. @Bastrabun noticed an equivalent bug in #122 , with some different initial conditions. Thanks for giving a lot of information. I consider both issue as not the same, however my upcoming fix will probably fix both. |
somehow i doubt that 🤔 can you extract the relevant data from the database and post it here if possible? |
I could spend some time studying my database and separating what information could be relevant or not, I would have to learn to do that and how this mod stores the information in the database to know where and how to locate it. I think it would take a lot of time |
someone else did the work for you: # extract the json-value for the mail-entry in the modstorage
sqlite3 mod_storage.sqlite "select value from entries where modname = 'mail' and key = cast('mail/BuckarooBanzai' as blob);"
# (optional, but looks prettier) parse the output with `jq`
sqlite3 mod_storage.sqlite "select value from entries where modname = 'mail' and key = cast('mail/BuckarooBanzai' as blob);" | jq |
nice! how can I do for postgresql? |
right, i forgot this is possible now, here you go: select convert_from(value, 'utf-8') from mod_storage where modname = 'mail' and key = 'mail/BuckarooBanzai'; |
When I receive more than 1 email, all of these appear in my inbox, but I can only read one of them, when I try to read another, the email body of the first one that I opened appears as the email body of all the other emails
example:
I receive 3 different emails from 3 different people with different subjects:
If I open mail 1, in the formspec GUI I read the body of mail 1.
Now I open mail 2, and I see the body of mail 1.
If I restart the server, and check my inbox, I only see 1 email (mail 1), the others have disappeared!
I suspect this is because the database (pgsql mod storage) is corrupt, probably due to a forced restart of the server (for reasons unrelated to this mod) where the data was not saved correctly.
I assume there will be a lua table with some corrupted element:
This is an example that I don't know if it helps or confuses.
In summary, I think that my email database in the mod storage is corrupted for reasons unrelated to this mod, and I think it could be fixed by adding something to the mod code without needing to delete my corrupt database
The text was updated successfully, but these errors were encountered: