diff --git a/janusgraph-all/pom.xml b/janusgraph-all/pom.xml
index 10d1d8ee43..28920b847e 100644
--- a/janusgraph-all/pom.xml
+++ b/janusgraph-all/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-all
diff --git a/janusgraph-backend-testutils/pom.xml b/janusgraph-backend-testutils/pom.xml
index b71a8219b4..54542f35e5 100644
--- a/janusgraph-backend-testutils/pom.xml
+++ b/janusgraph-backend-testutils/pom.xml
@@ -4,7 +4,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-backend-testutils
diff --git a/janusgraph-berkeleyje/pom.xml b/janusgraph-berkeleyje/pom.xml
index 25434daf38..feb23b3128 100644
--- a/janusgraph-berkeleyje/pom.xml
+++ b/janusgraph-berkeleyje/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-berkeleyje
diff --git a/janusgraph-bigtable/pom.xml b/janusgraph-bigtable/pom.xml
index 60ca41a8fe..994cb449b4 100644
--- a/janusgraph-bigtable/pom.xml
+++ b/janusgraph-bigtable/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-bigtable
diff --git a/janusgraph-core/pom.xml b/janusgraph-core/pom.xml
index 89bbed14d7..5bf80e48c5 100644
--- a/janusgraph-core/pom.xml
+++ b/janusgraph-core/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-core
diff --git a/janusgraph-core/src/main/java/org/janusgraph/diskstorage/Backend.java b/janusgraph-core/src/main/java/org/janusgraph/diskstorage/Backend.java
index 10870a8f15..6dd203f8b4 100644
--- a/janusgraph-core/src/main/java/org/janusgraph/diskstorage/Backend.java
+++ b/janusgraph-core/src/main/java/org/janusgraph/diskstorage/Backend.java
@@ -44,7 +44,7 @@
import org.janusgraph.diskstorage.keycolumnvalue.StoreTransaction;
import org.janusgraph.diskstorage.keycolumnvalue.cache.CacheTransaction;
import org.janusgraph.diskstorage.keycolumnvalue.cache.ExpirationKCVSCache;
-import org.janusgraph.diskstorage.keycolumnvalue.cache.ExpirationKCVSRCache;
+import org.janusgraph.diskstorage.keycolumnvalue.cache.ExpirationKCVSRedisCache;
import org.janusgraph.diskstorage.keycolumnvalue.cache.KCVSCache;
import org.janusgraph.diskstorage.keycolumnvalue.cache.NoKCVSCache;
import org.janusgraph.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManager;
@@ -350,10 +350,10 @@ public void initialize(Configuration config) {
if(REDIS_TAG.equals(cacheType)){
log.info("======== Configuring redis cache ========");
- edgeStore = new ExpirationKCVSRCache(edgeStoreRaw,getMetricsCacheName(EDGESTORE_NAME)!=null?getMetricsCacheName(EDGESTORE_NAME)
+ edgeStore = new ExpirationKCVSRedisCache(edgeStoreRaw,getMetricsCacheName(EDGESTORE_NAME)!=null?getMetricsCacheName(EDGESTORE_NAME)
:"edgeStore",expirationTime,cleanWaitTime,
edgeStoreCacheSize, configuration);
- indexStore = new ExpirationKCVSRCache(indexStoreRaw,getMetricsCacheName(INDEXSTORE_NAME)!=null?
+ indexStore = new ExpirationKCVSRedisCache(indexStoreRaw,getMetricsCacheName(INDEXSTORE_NAME)!=null?
getMetricsCacheName(INDEXSTORE_NAME):"indexStore",expirationTime,cleanWaitTime,
indexStoreCacheSize, configuration);
}else{
diff --git a/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/ExpirationKCVSRCache.java b/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/ExpirationKCVSRCache.java
deleted file mode 100644
index a075b76617..0000000000
--- a/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/ExpirationKCVSRCache.java
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2017 JanusGraph Authors
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package org.janusgraph.diskstorage.keycolumnvalue.cache;
-
-import com.google.common.base.Preconditions;
-import com.google.common.cache.CacheLoader;
-import org.janusgraph.core.JanusGraphException;
-import org.janusgraph.diskstorage.BackendException;
-import org.janusgraph.diskstorage.EntryList;
-import org.janusgraph.diskstorage.StaticBuffer;
-import org.janusgraph.diskstorage.configuration.Configuration;
-import org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStore;
-import org.janusgraph.diskstorage.keycolumnvalue.KeySliceQuery;
-import org.janusgraph.diskstorage.keycolumnvalue.SliceQuery;
-import org.janusgraph.diskstorage.keycolumnvalue.StoreTransaction;
-import org.janusgraph.diskstorage.util.CacheMetricsAction;
-import org.nustaq.serialization.FSTConfiguration;
-import org.redisson.api.RLock;
-import org.redisson.api.RMapCache;
-import org.redisson.api.RedissonClient;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import static org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.CACHE_KEYSPACE_PREFIX;
-import static org.janusgraph.util.datastructures.ByteSize.*;
-
-/**
- * @author naveenaechan
- */
-public class ExpirationKCVSRCache extends KCVSCache {
-
- //Weight estimation
- public static final String REDIS_INDEX_CACHE_PREFIX = "index";
-
- private final long cacheTimeMS;
- private RedissonClient redissonClient;
- private RMapCache redisCache;
- private RMapCache> redisIndexKeys;
- private static Logger logger = Logger.getLogger("redis-logger");
- private static FSTConfiguration fastConf = FSTConfiguration.createDefaultConfiguration();
-
- public ExpirationKCVSRCache(final KeyColumnValueStore store, String metricsName, final long cacheTimeMS,
- final long invalidationGracePeriodMS, final long maximumByteSize, Configuration configuration) {
- super(store, metricsName);
- Preconditions.checkArgument(cacheTimeMS > 0, "Cache expiration must be positive: %s", cacheTimeMS);
- Preconditions.checkArgument(System.currentTimeMillis() + 1000L * 3600 * 24 * 365 * 100 + cacheTimeMS > 0, "Cache expiration time too large, overflow may occur: %s", cacheTimeMS);
- this.cacheTimeMS = cacheTimeMS;
- Preconditions.checkArgument(invalidationGracePeriodMS >= 0, "Invalid expiration grace period: %s", invalidationGracePeriodMS);
-
- redissonClient = RedissonCache.getRedissonClient(configuration);
- redisCache = redissonClient.getMapCache(String.join("-", configuration.get(CACHE_KEYSPACE_PREFIX), metricsName));
- redisIndexKeys = redissonClient.getMapCache(String.join("-", configuration.get(CACHE_KEYSPACE_PREFIX), REDIS_INDEX_CACHE_PREFIX, metricsName));
-
- logger.info("********************** Configurations are loaded **********************");
- }
-
- @Override
- public EntryList getSlice(final KeySliceQuery query, final StoreTransaction txh) throws BackendException {
- incActionBy(1, CacheMetricsAction.RETRIEVAL, txh);
- try {
- return get(query, () -> {
- incActionBy(1, CacheMetricsAction.MISS, txh);
- return store.getSlice(query, unwrapTx(txh));
- });
- } catch (Exception e) {
- if (e instanceof JanusGraphException) throw (JanusGraphException) e;
- else if (e.getCause() instanceof JanusGraphException) throw (JanusGraphException) e.getCause();
- else throw new JanusGraphException(e);
- }
- }
-
- private EntryList get(KeySliceQuery query, Callable valueLoader) {
- byte[] bytQuery = redisCache.get(query);
- EntryList entries = bytQuery != null ? (EntryList) fastConf.asObject(bytQuery) : null;
- if (entries == null) {
- logger.log(Level.INFO, "reading from the store.................");
- try {
- entries = valueLoader.call();
- if (entries == null) {
- throw new CacheLoader.InvalidCacheLoadException("valueLoader must not return null, key=" + query);
- } else {
- redisCache.fastPutAsync(query, fastConf.asByteArray(entries), this.cacheTimeMS,TimeUnit.MILLISECONDS);
- RLock lock = redisIndexKeys.getLock(query.getKey());
- try {
- lock.tryLock(1, 3, TimeUnit.SECONDS);
- ArrayList queryList = redisIndexKeys.get(query.getKey());
- if (queryList == null)
- queryList = new ArrayList<>();
- queryList.add(query);
- redisIndexKeys.fastPutAsync(query.getKey(), queryList, this.cacheTimeMS,TimeUnit.MILLISECONDS);
- } catch (InterruptedException e) {
- e.printStackTrace();
- } finally {
- lock.unlock();
- }
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- return entries;
- }
-
- @Override
- public Map getSlice(final List keys, final SliceQuery query, final StoreTransaction txh) throws BackendException {
- final Map results = new HashMap<>(keys.size());
- final List remainingKeys = new ArrayList<>(keys.size());
- KeySliceQuery[] ksqs = new KeySliceQuery[keys.size()];
- incActionBy(keys.size(), CacheMetricsAction.RETRIEVAL, txh);
- byte[] bytResult = null;
- //Find all cached queries
- for (int i = 0; i < keys.size(); i++) {
- final StaticBuffer key = keys.get(i);
- ksqs[i] = new KeySliceQuery(key, query);
- EntryList result = null;
- bytResult = redisCache.get(ksqs[i]);
- result = bytResult != null ? (EntryList) fastConf.asObject(bytResult) : null;
- if (result != null) results.put(key, result);
- else remainingKeys.add(key);
- }
- //Request remaining ones from backend
- if (!remainingKeys.isEmpty()) {
- incActionBy(remainingKeys.size(), CacheMetricsAction.MISS, txh);
- Map subresults = store.getSlice(remainingKeys, query, unwrapTx(txh));
-
- for (int i = 0; i < keys.size(); i++) {
- StaticBuffer key = keys.get(i);
- EntryList subresult = subresults.get(key);
- if (subresult != null) {
- results.put(key, subresult);
- if (ksqs[i] != null) {
- logger.info("adding to cache subresult " + subresult);
- redisCache.fastPutAsync(ksqs[i], fastConf.asByteArray(subresult), this.cacheTimeMS, TimeUnit.MILLISECONDS);
- RLock lock = redisIndexKeys.getLock(ksqs[i].getKey());
- try {
- lock.tryLock(3, 10, TimeUnit.SECONDS);
- ArrayList queryList = redisIndexKeys.get(ksqs[i].getKey());
- if (queryList == null)
- queryList = new ArrayList<>();
- queryList.add(ksqs[i]);
- redisIndexKeys.fastPutAsync(ksqs[i].getKey(), queryList, this.cacheTimeMS, TimeUnit.MILLISECONDS);
- } catch (InterruptedException e) {
- e.printStackTrace();
- } finally {
- lock.unlock();
- }
- }
- }
- }
- }
- return results;
- }
-
- @Override
- public void clearCache() {
- redisCache.clearExpire();
- redisIndexKeys.clearExpire();
- }
-
- @Override
- public void invalidate(StaticBuffer key, List entries) {
- List keySliceQueryList = redisIndexKeys.get(key);
- if (keySliceQueryList != null) {
- for (KeySliceQuery keySliceQuery : keySliceQueryList) {
- if (key.equals(keySliceQuery.getKey())) {
- redisCache.fastRemoveAsync(keySliceQuery);
- }
- }
- }
- }
-
- @Override
- public void close() throws BackendException {
- super.close();
- }
-}
diff --git a/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/ExpirationKCVSRedisCache.java b/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/ExpirationKCVSRedisCache.java
index f975e94eb8..d719de14ae 100644
--- a/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/ExpirationKCVSRedisCache.java
+++ b/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/ExpirationKCVSRedisCache.java
@@ -14,8 +14,6 @@
package org.janusgraph.diskstorage.keycolumnvalue.cache;
-import static org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.CACHE_KEYSPACE_PREFIX;
-
import com.google.common.base.Preconditions;
import com.google.common.cache.CacheLoader;
import org.janusgraph.core.JanusGraphException;
@@ -29,9 +27,8 @@
import org.janusgraph.diskstorage.keycolumnvalue.StoreTransaction;
import org.janusgraph.diskstorage.util.CacheMetricsAction;
import org.nustaq.serialization.FSTConfiguration;
-import org.redisson.api.LocalCachedMapOptions;
-import org.redisson.api.RLocalCachedMap;
import org.redisson.api.RLock;
+import org.redisson.api.RMapCache;
import org.redisson.api.RedissonClient;
import java.util.ArrayList;
@@ -39,39 +36,23 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
-import static org.janusgraph.util.datastructures.ByteSize.OBJECT_HEADER;
-import static org.janusgraph.util.datastructures.ByteSize.OBJECT_REFERENCE;
-import static org.janusgraph.util.datastructures.ByteSize.STATICARRAYBUFFER_RAW_SIZE;
+import static org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.CACHE_KEYSPACE_PREFIX;
+
/**
- * @author Matthias Broecheler (me@matthiasb.com)
+ * @author naveenaechan
*/
public class ExpirationKCVSRedisCache extends KCVSCache {
- //Weight estimation
- private static final int STATIC_ARRAY_BUFFER_SIZE = STATICARRAYBUFFER_RAW_SIZE + 10; // 10 = last number is average length
- private static final int KEY_QUERY_SIZE = OBJECT_HEADER + 4 + 1 + 3 * (OBJECT_REFERENCE + STATIC_ARRAY_BUFFER_SIZE); // object_size + int + boolean + 3 static buffers
-
- private static final int INVALIDATE_KEY_FRACTION_PENALTY = 1000;
- private static final int PENALTY_THRESHOLD = 5;
public static final String REDIS_INDEX_CACHE_PREFIX = "index";
-
- private volatile CountDownLatch penaltyCountdown;
-
- private final ConcurrentHashMap expiredKeys;
-
private final long cacheTimeMS;
- private final long invalidationGracePeriodMS;
- private final CleanupThread cleanupThread;
private RedissonClient redissonClient;
- private RLocalCachedMap redisCache;
- private RLocalCachedMap> redisIndexKeys;
- private static Logger logger = Logger.getLogger("redis-logger");
+ private RMapCache redisCache;
+ private RMapCache> redisIndexKeys;
+ private static Logger logger = Logger.getLogger("janusgraph-redis-logger");
private static FSTConfiguration fastConf = FSTConfiguration.createDefaultConfiguration();
public ExpirationKCVSRedisCache(final KeyColumnValueStore store, String metricsName, final long cacheTimeMS,
@@ -80,29 +61,18 @@ public ExpirationKCVSRedisCache(final KeyColumnValueStore store, String metricsN
Preconditions.checkArgument(cacheTimeMS > 0, "Cache expiration must be positive: %s", cacheTimeMS);
Preconditions.checkArgument(System.currentTimeMillis() + 1000L * 3600 * 24 * 365 * 100 + cacheTimeMS > 0, "Cache expiration time too large, overflow may occur: %s", cacheTimeMS);
this.cacheTimeMS = cacheTimeMS;
- final int concurrencyLevel = Runtime.getRuntime().availableProcessors();
Preconditions.checkArgument(invalidationGracePeriodMS >= 0, "Invalid expiration grace period: %s", invalidationGracePeriodMS);
- this.invalidationGracePeriodMS = invalidationGracePeriodMS;
redissonClient = RedissonCache.getRedissonClient(configuration);
- redisCache = redissonClient.getLocalCachedMap(String.join("-",configuration.get(CACHE_KEYSPACE_PREFIX), metricsName), LocalCachedMapOptions.defaults());
- redisIndexKeys = redissonClient.getLocalCachedMap(String.join("-", configuration.get(CACHE_KEYSPACE_PREFIX) , REDIS_INDEX_CACHE_PREFIX , metricsName), LocalCachedMapOptions.defaults());
- expiredKeys = new ConcurrentHashMap<>(50, 0.75f, concurrencyLevel);
- penaltyCountdown = new CountDownLatch(PENALTY_THRESHOLD);
+ redisCache = redissonClient.getMapCache(String.join("-", configuration.get(CACHE_KEYSPACE_PREFIX), metricsName));
+ redisIndexKeys = redissonClient.getMapCache(String.join("-", configuration.get(CACHE_KEYSPACE_PREFIX), REDIS_INDEX_CACHE_PREFIX, metricsName));
- cleanupThread = new CleanupThread();
- cleanupThread.start();
logger.info("********************** Configurations are loaded **********************");
}
@Override
public EntryList getSlice(final KeySliceQuery query, final StoreTransaction txh) throws BackendException {
incActionBy(1, CacheMetricsAction.RETRIEVAL, txh);
- if (isExpired(query)) {
- incActionBy(1, CacheMetricsAction.MISS, txh);
- return store.getSlice(query, unwrapTx(txh));
- }
-
try {
return get(query, () -> {
incActionBy(1, CacheMetricsAction.MISS, txh);
@@ -119,21 +89,21 @@ private EntryList get(KeySliceQuery query, Callable valueLoader) {
byte[] bytQuery = redisCache.get(query);
EntryList entries = bytQuery != null ? (EntryList) fastConf.asObject(bytQuery) : null;
if (entries == null) {
- logger.log(Level.INFO, "reading from the store.................");
+ logger.log(Level.INFO, "Reading from the store.................");
try {
entries = valueLoader.call();
if (entries == null) {
throw new CacheLoader.InvalidCacheLoadException("valueLoader must not return null, key=" + query);
} else {
- redisCache.fastPutAsync(query, fastConf.asByteArray(entries));
+ redisCache.fastPutAsync(query, fastConf.asByteArray(entries), this.cacheTimeMS,TimeUnit.MILLISECONDS);
RLock lock = redisIndexKeys.getLock(query.getKey());
try {
- lock.tryLock(3, 10, TimeUnit.SECONDS);
+ lock.tryLock(1, 3, TimeUnit.SECONDS);
ArrayList queryList = redisIndexKeys.get(query.getKey());
if (queryList == null)
queryList = new ArrayList<>();
queryList.add(query);
- redisIndexKeys.fastPutAsync(query.getKey(), queryList);
+ redisIndexKeys.fastPutAsync(query.getKey(), queryList, this.cacheTimeMS,TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
@@ -159,10 +129,8 @@ public Map getSlice(final List keys, fina
final StaticBuffer key = keys.get(i);
ksqs[i] = new KeySliceQuery(key, query);
EntryList result = null;
- if (!isExpired(ksqs[i])) {
- bytResult = redisCache.get(ksqs[i]);
- result = bytResult != null ? (EntryList) fastConf.asObject(bytResult) : null;
- } else ksqs[i] = null;
+ bytResult = redisCache.get(ksqs[i]);
+ result = bytResult != null ? (EntryList) fastConf.asObject(bytResult) : null;
if (result != null) results.put(key, result);
else remainingKeys.add(key);
}
@@ -178,7 +146,7 @@ public Map getSlice(final List keys, fina
results.put(key, subresult);
if (ksqs[i] != null) {
logger.info("adding to cache subresult " + subresult);
- redisCache.fastPutAsync(ksqs[i], fastConf.asByteArray(subresult));
+ redisCache.fastPutAsync(ksqs[i], fastConf.asByteArray(subresult), this.cacheTimeMS, TimeUnit.MILLISECONDS);
RLock lock = redisIndexKeys.getLock(ksqs[i].getKey());
try {
lock.tryLock(3, 10, TimeUnit.SECONDS);
@@ -186,7 +154,7 @@ public Map getSlice(final List keys, fina
if (queryList == null)
queryList = new ArrayList<>();
queryList.add(ksqs[i]);
- redisIndexKeys.fastPut(ksqs[i].getKey(), queryList);
+ redisIndexKeys.fastPutAsync(ksqs[i].getKey(), queryList, this.cacheTimeMS, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
@@ -202,8 +170,7 @@ public Map getSlice(final List keys, fina
@Override
public void clearCache() {
redisCache.clearExpire();
- expiredKeys.clear();
- penaltyCountdown = new CountDownLatch(PENALTY_THRESHOLD);
+ redisIndexKeys.clearExpire();
}
@Override
@@ -212,91 +179,14 @@ public void invalidate(StaticBuffer key, List entries) {
if (keySliceQueryList != null) {
for (KeySliceQuery keySliceQuery : keySliceQueryList) {
if (key.equals(keySliceQuery.getKey())) {
- redisCache.fastRemove(keySliceQuery);
+ redisCache.fastRemoveAsync(keySliceQuery);
}
}
-
- Preconditions.checkArgument(!hasValidateKeysOnly() || entries.isEmpty());
- expiredKeys.put(key, getExpirationTime());
- if (Math.random() < 1.0 / INVALIDATE_KEY_FRACTION_PENALTY) penaltyCountdown.countDown();
}
}
@Override
public void close() throws BackendException {
- cleanupThread.stopThread();
super.close();
}
-
- private boolean isExpired(final KeySliceQuery query) {
- Long until = expiredKeys.get(query.getKey());
- if (until == null) return false;
- if (isBeyondExpirationTime(until)) {
- expiredKeys.remove(query.getKey(), until);
- return false;
- }
- //We suffer a cache miss, hence decrease the count down
- penaltyCountdown.countDown();
- return true;
- }
-
- private long getExpirationTime() {
- return System.currentTimeMillis() + cacheTimeMS;
- }
-
- private boolean isBeyondExpirationTime(long until) {
- return until < System.currentTimeMillis();
- }
-
- private long getAge(long until) {
- long age = System.currentTimeMillis() - (until - cacheTimeMS);
- assert age >= 0;
- return age;
- }
-
- private class CleanupThread extends Thread {
-
- private boolean stop = false;
-
- public CleanupThread() {
- this.setDaemon(true);
- this.setName("ExpirationStoreCache-" + getId());
- }
-
- @Override
- public void run() {
- while (true) {
- if (stop) return;
- try {
-
- penaltyCountdown.await();
- } catch (InterruptedException e) {
- if (stop) return;
- else throw new RuntimeException("Cleanup thread got interrupted", e);
- }
- //Do clean up work by invalidating all entries for expired keys
- final Map expiredKeysCopy = new HashMap<>(expiredKeys.size());
- for (Map.Entry expKey : expiredKeys.entrySet()) {
- if (isBeyondExpirationTime(expKey.getValue()))
- expiredKeys.remove(expKey.getKey(), expKey.getValue());
- else if (getAge(expKey.getValue()) >= invalidationGracePeriodMS)
- expiredKeysCopy.put(expKey.getKey(), expKey.getValue());
- }
- for (KeySliceQuery ksq : redisCache.keySet()) {
- if (expiredKeysCopy.containsKey(ksq.getKey())) redisCache.remove(ksq);
- }
- penaltyCountdown = new CountDownLatch(PENALTY_THRESHOLD);
- for (Map.Entry expKey : expiredKeysCopy.entrySet()) {
- expiredKeys.remove(expKey.getKey(), expKey.getValue());
- }
- }
- }
-
- void stopThread() {
- stop = true;
- this.interrupt();
- }
- }
-
-
}
diff --git a/janusgraph-cql/pom.xml b/janusgraph-cql/pom.xml
index bec6a02015..8e38a49754 100644
--- a/janusgraph-cql/pom.xml
+++ b/janusgraph-cql/pom.xml
@@ -4,7 +4,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
janusgraph-cql
diff --git a/janusgraph-dist/pom.xml b/janusgraph-dist/pom.xml
index 8dbdf5a7b2..689d6cad45 100644
--- a/janusgraph-dist/pom.xml
+++ b/janusgraph-dist/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
pom
diff --git a/janusgraph-doc/pom.xml b/janusgraph-doc/pom.xml
index a9ee6dc5f3..e31b1c1c91 100644
--- a/janusgraph-doc/pom.xml
+++ b/janusgraph-doc/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
pom
diff --git a/janusgraph-driver/pom.xml b/janusgraph-driver/pom.xml
index 9889326026..e499a60fb2 100644
--- a/janusgraph-driver/pom.xml
+++ b/janusgraph-driver/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-driver
diff --git a/janusgraph-es/pom.xml b/janusgraph-es/pom.xml
index 8395931b77..b645ba58d0 100644
--- a/janusgraph-es/pom.xml
+++ b/janusgraph-es/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-es
diff --git a/janusgraph-examples/example-berkeleyje/pom.xml b/janusgraph-examples/example-berkeleyje/pom.xml
index 6b51b0caf6..a9f1238ba0 100644
--- a/janusgraph-examples/example-berkeleyje/pom.xml
+++ b/janusgraph-examples/example-berkeleyje/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph-examples
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
example-berkeleyje
diff --git a/janusgraph-examples/example-common/pom.xml b/janusgraph-examples/example-common/pom.xml
index cdba20715c..55c862789d 100644
--- a/janusgraph-examples/example-common/pom.xml
+++ b/janusgraph-examples/example-common/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph-examples
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
example-common
diff --git a/janusgraph-examples/example-cql/pom.xml b/janusgraph-examples/example-cql/pom.xml
index cc4a88de90..b741a106e2 100644
--- a/janusgraph-examples/example-cql/pom.xml
+++ b/janusgraph-examples/example-cql/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph-examples
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
example-cql
diff --git a/janusgraph-examples/example-hbase/pom.xml b/janusgraph-examples/example-hbase/pom.xml
index a0b9633490..7c2cceff45 100644
--- a/janusgraph-examples/example-hbase/pom.xml
+++ b/janusgraph-examples/example-hbase/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph-examples
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
example-hbase
diff --git a/janusgraph-examples/example-remotegraph/pom.xml b/janusgraph-examples/example-remotegraph/pom.xml
index c4f773c646..4643c0b215 100644
--- a/janusgraph-examples/example-remotegraph/pom.xml
+++ b/janusgraph-examples/example-remotegraph/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph-examples
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
example-remotegraph
diff --git a/janusgraph-examples/example-tinkergraph/pom.xml b/janusgraph-examples/example-tinkergraph/pom.xml
index 7a368f0e75..ecf995ff27 100644
--- a/janusgraph-examples/example-tinkergraph/pom.xml
+++ b/janusgraph-examples/example-tinkergraph/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph-examples
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
example-tinkergraph
diff --git a/janusgraph-examples/pom.xml b/janusgraph-examples/pom.xml
index b3ecf07783..0d9c148240 100644
--- a/janusgraph-examples/pom.xml
+++ b/janusgraph-examples/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-examples
diff --git a/janusgraph-grpc/pom.xml b/janusgraph-grpc/pom.xml
index f7adfc3e46..4f67cf2a42 100644
--- a/janusgraph-grpc/pom.xml
+++ b/janusgraph-grpc/pom.xml
@@ -4,7 +4,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
janusgraph-grpc
JanusGraph-gRPC: gRPC Components for JanusGraph
diff --git a/janusgraph-hadoop/pom.xml b/janusgraph-hadoop/pom.xml
index b34b032f84..b466e7f903 100644
--- a/janusgraph-hadoop/pom.xml
+++ b/janusgraph-hadoop/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-hadoop
diff --git a/janusgraph-hbase/pom.xml b/janusgraph-hbase/pom.xml
index 405942d99b..04dfe75046 100644
--- a/janusgraph-hbase/pom.xml
+++ b/janusgraph-hbase/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
janusgraph-hbase
JanusGraph-HBase: Distributed Graph Database
diff --git a/janusgraph-inmemory/pom.xml b/janusgraph-inmemory/pom.xml
index 8577afdfc2..97feab1023 100644
--- a/janusgraph-inmemory/pom.xml
+++ b/janusgraph-inmemory/pom.xml
@@ -4,7 +4,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-inmemory
diff --git a/janusgraph-lucene/pom.xml b/janusgraph-lucene/pom.xml
index b2e810f0f7..b9c189f514 100644
--- a/janusgraph-lucene/pom.xml
+++ b/janusgraph-lucene/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-lucene
diff --git a/janusgraph-server/pom.xml b/janusgraph-server/pom.xml
index 0aec3b3841..b43f16f05d 100644
--- a/janusgraph-server/pom.xml
+++ b/janusgraph-server/pom.xml
@@ -4,7 +4,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
janusgraph-server
JanusGraph-Server: Server Components for JanusGraph
diff --git a/janusgraph-solr/pom.xml b/janusgraph-solr/pom.xml
index 112f4d2929..43b12f16d0 100644
--- a/janusgraph-solr/pom.xml
+++ b/janusgraph-solr/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-solr
diff --git a/janusgraph-test/pom.xml b/janusgraph-test/pom.xml
index 17927e7c55..eb7c4c92ba 100644
--- a/janusgraph-test/pom.xml
+++ b/janusgraph-test/pom.xml
@@ -3,7 +3,7 @@
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
../pom.xml
janusgraph-test
diff --git a/pom.xml b/pom.xml
index 06359a1283..7ea3ea70eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.janusgraph
janusgraph
- 0.6.7-SNAPSHOT
+ 0.6.01-SNAPSHOT
pom
3.0.0