Closed nonfreegithub closed 6 months ago
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.
I suspect this is because the database (pgsql mod storage) is corrupt
somehow i doubt that :thinking: can you extract the relevant data from the database and post it here if possible?
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
Maybe I could spend some time studying my database and separating what information could be relevant or not
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
sqlite3 mod_storage.sqlite "select value from entries where modname = 'mail' and key = cast('mail/BuckarooBanzai' as blob);"
nice! how can I do for postgresql?
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