[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2082) UpdateTimestampsCache.isUpToDate returns before checking all spaces
Anders Wallgren (JIRA)
noreply at atlassian.com
Mon Sep 18 01:11:24 EDT 2006
UpdateTimestampsCache.isUpToDate returns before checking all spaces
-------------------------------------------------------------------
Key: HHH-2082
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2082
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.cr4
Environment: 3.2.0.cr4, MySQL 5.0.24a
Reporter: Anders Wallgren
Priority: Blocker
Seems like a bug was recently (since cr1?) introduced in isUpToDate:
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 );
}
#
# This statement returns without checking the other spaces. The old (commented out) code seems correct to me.
#
return lastUpdate.longValue() < timestamp.longValue();
// if ( lastUpdate.longValue() >= timestamp.longValue() ) return false;
#
#
#
}
}
return true;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list