You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand what's going on correctly, the issue is that in between the steps
Check that the entry is eligible for refresh, according to its last write time.
Acquire the segment lock.
Check that the entry isn't still loading.
Schedule a refresh.
can interleave badly with the end of a refresh:
A. Finish the refresh future.
B. Acquire the segment lock.
C. Set the value, using a StrongValueReference instead of a LoadingValueReference.
D. Update the write time.
E. Release the lock.
In particular, what can happen is that if a get happens just as the entry is done refreshing, the steps can interleave
A, B, 1, C, D, E, 2, 3, 4
in which case a refresh will get inappropriately scheduled: it will see that the write time was long enough ago that a refresh is appropriate, and then it will see that the entry has a StrongValueReference and is not currently loading, so it will start a refresh immediately after the previous refresh completed.
The text was updated successfully, but these errors were encountered:
Sorry, I didn't notice this issue was listed in the v14 release (I was just looking at its status here, which I see has now been changed to Fixed). No, I'm using 13.0.1. I'm evaluating Guava Cache as a replacement for Ehcache in a particular application. It's high profile (relatively speaking, for me) so I'm sticking with stable releases for now.
Original issue created by lowasser@google.com on 2012-11-23 at 01:37 AM
http://stackoverflow.com/q/13521523/869736
If I understand what's going on correctly, the issue is that in between the steps
can interleave badly with the end of a refresh:
A. Finish the refresh future.
B. Acquire the segment lock.
C. Set the value, using a StrongValueReference instead of a LoadingValueReference.
D. Update the write time.
E. Release the lock.
In particular, what can happen is that if a get happens just as the entry is done refreshing, the steps can interleave
A, B, 1, C, D, E, 2, 3, 4
in which case a refresh will get inappropriately scheduled: it will see that the write time was long enough ago that a refresh is appropriate, and then it will see that the entry has a StrongValueReference and is not currently loading, so it will start a refresh immediately after the previous refresh completed.
The text was updated successfully, but these errors were encountered: