Fix extra data in cache
Reverting the revert. The original CL(commit a666d74d) had a bug in it. It was calling accountExistsCacheLocked(), while holding accounts.cacheLock. The function accountExistsCacheLocked, was in turn calling into getUserAccounts, which acquires mUsers. And this causes trouble. mUsers is a a lock on all accounts, and hence calling it after holding accounts.cachelock is calling for trouble. Since the locks are acquired in other order, it causes a potential deadlock issue, which we discovered later on. That bug was fixed by commit 0e592733. We already have useraccount object and should reuse it. This reverts commit 27d0e1fd. This commit was unneeded as the bug had been fixed by that time. Change-Id: I5328c31fd485fd2c1c652cd0e7c2c4bded38a5fd
Loading
Please register or sign in to comment