|
@@ -111,7 +111,7 @@ public class ShortCircuitCache implements Closeable {
|
|
Long evictionTimeNs = Long.valueOf(0);
|
|
Long evictionTimeNs = Long.valueOf(0);
|
|
while (true) {
|
|
while (true) {
|
|
Entry<Long, ShortCircuitReplica> entry =
|
|
Entry<Long, ShortCircuitReplica> entry =
|
|
- evictableMmapped.ceilingEntry(evictionTimeNs);
|
|
|
|
|
|
+ evictable.ceilingEntry(evictionTimeNs);
|
|
if (entry == null) break;
|
|
if (entry == null) break;
|
|
evictionTimeNs = entry.getKey();
|
|
evictionTimeNs = entry.getKey();
|
|
long evictionTimeMs =
|
|
long evictionTimeMs =
|
|
@@ -384,10 +384,6 @@ public class ShortCircuitCache implements Closeable {
|
|
this.shmManager = shmManager;
|
|
this.shmManager = shmManager;
|
|
}
|
|
}
|
|
|
|
|
|
- public long getMmapRetryTimeoutMs() {
|
|
|
|
- return mmapRetryTimeoutMs;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public long getStaleThresholdMs() {
|
|
public long getStaleThresholdMs() {
|
|
return staleThresholdMs;
|
|
return staleThresholdMs;
|
|
}
|
|
}
|
|
@@ -847,7 +843,7 @@ public class ShortCircuitCache implements Closeable {
|
|
} else if (replica.mmapData instanceof Long) {
|
|
} else if (replica.mmapData instanceof Long) {
|
|
long lastAttemptTimeMs = (Long)replica.mmapData;
|
|
long lastAttemptTimeMs = (Long)replica.mmapData;
|
|
long delta = Time.monotonicNow() - lastAttemptTimeMs;
|
|
long delta = Time.monotonicNow() - lastAttemptTimeMs;
|
|
- if (delta < staleThresholdMs) {
|
|
|
|
|
|
+ if (delta < mmapRetryTimeoutMs) {
|
|
if (LOG.isTraceEnabled()) {
|
|
if (LOG.isTraceEnabled()) {
|
|
LOG.trace(this + ": can't create client mmap for " +
|
|
LOG.trace(this + ": can't create client mmap for " +
|
|
replica + " because we failed to " +
|
|
replica + " because we failed to " +
|