From 98a41d4d1dc1f7d76f5c44c5997d08280755cf7d Mon Sep 17 00:00:00 2001 From: naveenaechan Date: Wed, 3 Jan 2024 20:34:27 +0530 Subject: [PATCH] PLT-541: make redis client singleton --- .../diskstorage/keycolumnvalue/cache/RedissonCache.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/RedissonCache.java b/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/RedissonCache.java index e5de6b23fb0..2851f78b7c9 100644 --- a/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/RedissonCache.java +++ b/janusgraph-core/src/main/java/org/janusgraph/diskstorage/keycolumnvalue/cache/RedissonCache.java @@ -71,6 +71,10 @@ public static RedissonClient getRedissonClient(Configuration configuration) { .setCheckSentinelsList(false) .setConnectTimeout(connectTimeout) .setIdleConnectionTimeout(5_000) + .setMasterConnectionMinimumIdleSize(10) + .setMasterConnectionPoolSize(20) + .setSlaveConnectionMinimumIdleSize(10) + .setSlaveConnectionPoolSize(20) .setKeepAlive(keepAlive) .setMasterName(configuration.get(REDIS_CACHE_MASTER_NAME)) .addSentinelAddress(formatUrls(configuration.get(REDIS_CACHE_SENTINEL_URLS).split(COMMA)))