Issue Details (XML | Word | Printable)

Key: CACHE-175
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Unassigned
Reporter: Peter Bridge
Votes: 0
Watchers: 1
Operations

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

Flush then add, then read, can result in NeedsRefreshException

Created: 10/May/05 09:20 AM   Updated: 10/May/05 09:20 AM
Component/s: None
Affects Version/s: 2.1.1
Fix Version/s: None

Environment:
single threaded test
JDK 1.4.2


 Description  « Hide
If I flush my cache, add a new item and then try to read that item straight away, then sometimes (70%?) I can get a NeedsRefreshException.

This is because in Cache.isFlushed(...) the flushDateTime is the same as the lastUpdate timestamp.
I guess with JDK50 you can use the high resolution timer to fix this? or for now maybe subtract 1ms from the flush time to ensure it is always seen as being in the past...

Kind Regards,

Peter

PS any chance that the NeedsRefreshException design approach will be dropped? I just started evaluating OSCache today and this approach looks pretty ugly IMO.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.