Skip to content
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

Tags disappearing upon restart #4430

Closed
linuxuser332 opened this issue Feb 21, 2025 · 2 comments
Closed

Tags disappearing upon restart #4430

linuxuser332 opened this issue Feb 21, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@linuxuser332
Copy link

linuxuser332 commented Feb 21, 2025

Describe the bug

Hi there. I have imported records into the sqlite database and everything is working perfectly. All the tags are correctly showing in the UI. However, when I restart my docker container, they all disappear and are replaced by numbers. For example, after my import, a SQL query looks like this:

select id,uid,payload from memo where id = 17803 or id = 17804;
17803|1714658178890-3fe65666e0c54b52|{"property":{}, "tags":["birthday","flowers"]}
17804|1714818177556-3f86bd6bdc9c4240|{"property":{}, "tags":["brunch","home","interiors","snug"]}

This is all perfect. However, I restart the container and the same query will produce this:

select id,uid,payload from memo where id = 17803 or id = 17804;
17803|1714658178890-3fe65666e0c54b52|{"property":{}}
17804|1714818177556-3f86bd6bdc9c4240|{"property":{}}

So the tag information has been erased. Strangely, in some of the records, the query output has numbers in it, like this:

17817|1717686301781-3fe954707856cd01|{"property":{}, "tags":["1:", "2:"]}
17818|1718650466313-k9pwe3gbxisgt8xu|{"property":{}, "tags":["2:"]}
17819|1718650861813-j1usalwffbso5ert|{"property":{}, "tags":["3:"]}
17820|1718698821575-9znq02oussvwlyyu|{"property":{}, "tags":["3:"]}
17821|1718699220312-pgp10sw0yazdb1hu|{"property":{}, "tags":["2:"]}

I don't understand why the tags are being removed from the entries when the container is restarted. Any help appreciated. This is with the sqlite database. I have yet to try with an external MariaDB instance. Many thanks.

Steps to reproduce

  • Insert data into the sqlite database
  • Restart the container

The version of Memos you're using

0.24.0

Screenshots or additional context

No response

@linuxuser332 linuxuser332 added the bug Something isn't working label Feb 21, 2025
@linuxuser332
Copy link
Author

Is there some sort of process which runs upon startup and which does something to the tags? I have just observed that it is at startup that they are getting erased from the table.

@linuxuser332
Copy link
Author

I see that the Memos code seems to index the content and build the tags at startup. I have amended what I am doing to insert the tags into the content and let this process happen. All working okay now. Panic over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant