From ead926078161be02f650934bbf84e76e066e8d09 Mon Sep 17 00:00:00 2001 From: Lavkesh Lahngir Date: Fri, 28 Feb 2020 07:50:40 +0800 Subject: [PATCH] [Bug] Clear all the futures when sync is called. (#501) * Replacing Jedis With Lettuce in ingestion and serving * Removing extra lines * Abstacting redis connection based on store * Check the connection before connecting as lettuce does the retry automatically * Running spotless * Throw Exception if the job store config is null * Handle No enum constant RuntimeException * Future should be cleared everytime sync is called --- .../serving/redis/RedisStandaloneIngestionClient.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ingestion/src/main/java/feast/store/serving/redis/RedisStandaloneIngestionClient.java b/ingestion/src/main/java/feast/store/serving/redis/RedisStandaloneIngestionClient.java index de1f74151a..d95ebbbf64 100644 --- a/ingestion/src/main/java/feast/store/serving/redis/RedisStandaloneIngestionClient.java +++ b/ingestion/src/main/java/feast/store/serving/redis/RedisStandaloneIngestionClient.java @@ -78,8 +78,11 @@ public boolean isConnected() { public void sync() { // Wait for some time for futures to complete // TODO: should this be configurable? - LettuceFutures.awaitAll(60, TimeUnit.SECONDS, futures.toArray(new RedisFuture[0])); - futures.clear(); + try { + LettuceFutures.awaitAll(60, TimeUnit.SECONDS, futures.toArray(new RedisFuture[0])); + } finally { + futures.clear(); + } } @Override