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

fix: clear translation cache if no translation data was found #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liske
Copy link
Contributor

@liske liske commented Jan 22, 2025

We observed missing translations after upgrades/reboots. It seems that the content of the lookup variable (($memid, 0)) was an empty array. Grommunio-web did not recover from this situation as it never clears the cache if the lookup table is empty, automatically. A workaround is to clear the cache using ipcrm -M 0x950412de, manually

This change clears the cache when the lookup variable is empty or the translation is not found. This allows to recover from a broken cache, automatically.

We observed missing translations after upgrades/reboots. It seems that
the content of the lookup variable (`($memid, 0)`) was an empty array.
Grommunio-web did not recover from this situation as it never clears the
cache if the lookup table is empty, automatically. A workaround is to
clear the cache using `ipcrm -M 0x950412de`, manually

This change clears the cache when the lookup variable is empty or the
translation is not found. This allows to recover from a broken cache,
automatically.
@jengelh
Copy link
Member

jengelh commented Jan 22, 2025

In the rpm/deb packages, there is an ipcrm call. But of course, that only applies when upgrading exactly through rpm/deb, so yeah… :-/

@liske
Copy link
Contributor Author

liske commented Jan 23, 2025

In the rpm/deb packages, there is an ipcrm call. But of course, that only applies when upgrading exactly through rpm/deb, so yeah… :-/

We observed it twice since the last month and it also seems to happen after rebooting. I'd debugged one of them and the lookup var was just an empty array. I did not find any obvious race condition yet (we have several users who have grommunio-web open all the time, even during maintenance windows), but the change should help to recover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants