Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[che-dev] Preferences update synchronization issue

Hello,

 

I noticed there is a synchronization issue in the UserProfileService when updating and deleting preferences: the service itself performs the merge between the sent preferences (to either update or delete them) and the existing preferences by calling getPreferences and then setPreferences on the dao.

This is not synchronized, so if 2 requests arrive to one of these methods at the same time for the same user, the first request's changes could be overridden by the second request (even if a different attribute is updated in the preferences).

I made a pull request to fix this issue: https://github.com/codenvy/che-core/pull/220

I made sure to only synchronize according to the user name whose preferences are updated (since this is the parameter sent to the dao).

Please review.

 

By the way, the same issue seems to happen for profile updates as well according to the code. I did not fix it since we don't have a scenario in which we update the profile (at least currently).

 

Best regards,

Tal Sapan | T: +972 9 7779580 | www.sap.com

 

 


Back to the top