keith-turner commented on code in PR #4821:
URL: https://github.com/apache/accumulo/pull/4821#discussion_r1727730986
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/ClientTabletCacheImpl.java:
##########
@@ -889,7 +889,8 @@ protected CachedTablet _findTablet(ClientContext context,
Text row, boolean skip
}
if (tl == null || (locationNeed == LocationNeed.REQUIRED &&
tl.getTserverLocation().isEmpty()
- && tl.getCreationTime().compareTo(cacheCutoff) < 0)) {
+ && tl.getCreationTimestamp() - cacheCutoffTimestamp < 0)) {
Review Comment:
This code is trying to determine if a cache entry was created after an
operation on the cache started. This could be done w/ two Timer object and
comparing their elapsed times. If a cache entry has a smaller elapsed time
than the elapsed time since the operation started then the cache entry was
created after the operation stated. If `cacheCutoff` were a Timer could do the
following.
```suggestion
&& cacheCutoff.hasElapsed(tl.getCreationTimer().elapsed()))) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]