public static boolean needsRecalculation(long queryStartTime,long lastModifiedTime){
  return ENABLE_UPDATE_IN_PROGRESS_INDEX_CALCULATION && queryStartTime <= SAFE_QUERY_TIME.get() - queryStartTime + lastModifiedTime;
}

public static boolean needsRecalculation ( long queryStartTime , long lastModifiedTime ) { return ENABLE_UPDATE_IN_PROGRESS_INDEX_CALCULATION && queryStartTime <= SAFE_QUERY_TIME . get ( ) - queryStartTime + lastModifiedTime ; }
calculates whether we need to reevluate the key for the region entry we added a way to determine whether to reevaluate an entry for query execution the method is to keep track of the delta and current time in a single long value the value is then used by the query to determine if a region entry needs to be reevaluated , based on subtracting the value with the query execution time . this provides a delta + some false positive time ( dts ) if the dts + last modified time of the region entry is > query start time , we can assume that it needs to be reevaluated this is to fix bug 47475 , where references to region entries can be held by the executing query either directly or indirectly ( iterators can hold references for next ) but the values underneath could change . small amounts of false positives are ok as it will have a slight impact on performance
