Skip to content

Commit 50916d5

Browse files
authored
[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
1 parent d785b60 commit 50916d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ingestion/src/main/java/feast/store/serving/redis/RedisStandaloneIngestionClient.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ public boolean isConnected() {
7878
public void sync() {
7979
// Wait for some time for futures to complete
8080
// TODO: should this be configurable?
81-
LettuceFutures.awaitAll(60, TimeUnit.SECONDS, futures.toArray(new RedisFuture[0]));
82-
futures.clear();
81+
try {
82+
LettuceFutures.awaitAll(60, TimeUnit.SECONDS, futures.toArray(new RedisFuture[0]));
83+
} finally {
84+
futures.clear();
85+
}
8386
}
8487

8588
@Override

0 commit comments

Comments
 (0)