keith-turner commented on code in PR #4821:
URL: https://github.com/apache/accumulo/pull/4821#discussion_r1727737104
##########
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:
Could optimize the case by adding a `Timer.hasElapsed(Timer timer)` method.
Wouid look like the following, just makes it shorter to write. Or could just
have the longer code inlined here to avoid creating the Duration object.
```java
class Timer {
public boolean hasElapsed(Timer timer){
return hasElapsed(timer.elapsed(NANOSECONDS), NANOSECONDS);
}
```
--
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]