History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CACHE-167
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Andres March
Reporter: Andres March
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OSCache

removeEntry not synchronized

Created: 16/Apr/05 04:35 PM   Updated: 19/Apr/05 01:02 PM
Component/s: Base Classes
Affects Version/s: 2.1
Fix Version/s: 2.1.1


 Description  « Hide
I've just taken a very quick look at the changes that were made to make cache.removeEntry() public. It doesn't look like thread-safety has been taken into account! Take a look at line 390 of AbstractConcurrentReadCache - the internal calls that are made to remove() are taking care to synchronize as required. So just making removeEntry() public is definitely going to cause problems.

One thing we *definitely* don't want to do is sync on GeneralCacheAdministrator.getFromCache() - that will both kill performance and cause implementation problems for users. The fix needs to go with removeEntry(). Without looking into this in more detail my first guess is that synchronizing the removeEntry() call might be enough. This hopefully won't affect performance too much since:

a) removeEntry() wasn't exposed previously anyway
b) internal calls to it are synchronized already

I'm not sure it's ideal though since there will be some double-syncing going on internally. It's not clear to me what this will do to performance.


 All   Comments   Change History      Sort Order:
There are no comments yet on this issue.