I don't know who change the following code in UpdateTimestampsCache.java. but this change was wrong!
The commented code was right. they aren't equivalent.
Code:
return lastUpdate.longValue() < timestamp.longValue();
// if ( lastUpdate.longValue() >= timestamp.longValue() ) return false;
Code:
UpdateTimestampsCache
public synchronized boolean isUpToDate(Set spaces, Long timestamp) throws HibernateException {
Iterator iter = spaces.iterator();
while ( iter.hasNext() ) {
Serializable space = (Serializable) iter.next();
Long lastUpdate = (Long) updateTimestamps.get(space);
if ( lastUpdate==null ) {
//the last update timestamp was lost from the cache
//(or there were no updates since startup!)
//updateTimestamps.put( space, new Long( updateTimestamps.nextTimestamp() ) );
//result = false; // safer
}
else {
if ( log.isDebugEnabled() ) {
log.debug("[" + space + "] last update timestamp: " + lastUpdate + ", result set timestamp: " + timestamp );
}
return lastUpdate.longValue() < timestamp.longValue();
// if ( lastUpdate.longValue() >= timestamp.longValue() ) return false;
}
}