Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.0.1
-
5
-
Description
The problem:
- DefaultUserPropertyManager caches User->JiraCachingPropertySet and expires entries after 30 minutes of inactivity.
- DefaultUserPreferencesManager caches User->JiraUserPreferences and expires only to make more room after hitting 1000 entries. JiraUserPreferences holds a reference to the JiraCachingPropertySet returned by the DefaultUserPropertyManager at the time of construction.
- These two interfaces are supposed to be backed by the same data, but since the DefaultUserPreferencesManager can hold onto JCPS references after DefaultUserPropertyManager has discarded them, the system can get into an inconsistent state.
To reproduce:
- Log in as a user
- Navigate to the user's profile page
- Wait (a little over) 30 minutes
- Change the user's locale
Expected results:
- Provided the session has not timed out completely, the user's preferences should update normally and be applied immediately (the UI language should change).
Actual results:
- The results seem to update, but do not take effect
- The locale's value will be displayed correctly, but the translations are still in the previous language selection.
- This inconsistent state persists indefinitely
Workaround:
- Nothing simple. It is not fixed by logging out and back in.
Technical note:
- You can reproduce this without the 30 minute wait by calling DefaultUserPropertyManager's psCache.invalidateAll() after the user has logged in.