From a204f47bdcaf5d8df84180a0964cf695aadff226 Mon Sep 17 00:00:00 2001 From: Matt Nichols Date: Fri, 17 Mar 2023 15:54:23 -0600 Subject: [PATCH] refactor!: rename store redis connectionTimeout to timeout --- .../com/mx/path/service/facility/store/redis/RedisStore.java | 2 +- .../service/facility/store/redis/RedisStoreConfiguration.java | 4 ++-- upgrades/v3.0.0/facilities-3.0.0-upgrade.sh | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStore.java b/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStore.java index 01cd11b..f603d10 100644 --- a/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStore.java +++ b/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStore.java @@ -127,7 +127,7 @@ final synchronized StatefulRedisConnection buildConnection() { .computationThreadPoolSize(configuration.getComputationThreadPoolSize()) .build(); - RedisClient redisClient = RedisClient.create(resources, new RedisURI(configuration.getHost(), configuration.getPort(), configuration.getConnectionTimeout())); + RedisClient redisClient = RedisClient.create(resources, new RedisURI(configuration.getHost(), configuration.getPort(), configuration.getTimeout())); // RESP3 executes a HELLO command to discover the protocol before executing any commands made by the client. // This can cause issues if we are communicating over a proxy and the proxy doesn't speak RESP3. For now, it is safer diff --git a/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStoreConfiguration.java b/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStoreConfiguration.java index 13473d3..77840a3 100644 --- a/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStoreConfiguration.java +++ b/store-redis/src/main/java/com/mx/path/service/facility/store/redis/RedisStoreConfiguration.java @@ -11,7 +11,7 @@ public class RedisStoreConfiguration { private static final String DEFAULT_HOST = "localhost"; private static final int DEFAULT_COMPUTATION_THREAD_POOL_SIZE = 5; - private static final Duration DEFAULT_CONNECTION_TIMEOUT = Duration.ofSeconds(10); + private static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(10); private static final int DEFAULT_PORT = 6379; private static final int DEFAULT_THREAD_POOL_SIZE = 5; @@ -22,7 +22,7 @@ public class RedisStoreConfiguration { private int computationThreadPoolSize = DEFAULT_COMPUTATION_THREAD_POOL_SIZE; @ConfigurationField - private Duration connectionTimeout = DEFAULT_CONNECTION_TIMEOUT; + private Duration timeout = DEFAULT_TIMEOUT; @ConfigurationField private int ioThreadPoolSize = DEFAULT_THREAD_POOL_SIZE; diff --git a/upgrades/v3.0.0/facilities-3.0.0-upgrade.sh b/upgrades/v3.0.0/facilities-3.0.0-upgrade.sh index 0677e42..26deffe 100755 --- a/upgrades/v3.0.0/facilities-3.0.0-upgrade.sh +++ b/upgrades/v3.0.0/facilities-3.0.0-upgrade.sh @@ -66,6 +66,7 @@ function process_file { "com.mx.path.service.facility.fault_tolerant_executor([^a-zA-Z])=com.mx.path.service.facility.fault_tolerant_executor.resilience4j\1" "com.mx.path.facility.exception_reporter.honeybadger([^a-zA-Z])=com.mx.path.service.facility.exception_reporter.honeybadger\1" "com.mx.path.facility.security.vault([^a-zA-Z])=com.mx.path.service.facility.security.vault\1" + "connectionTimeout([^a-zA-Z])=timeout\1" ) local reported_file=false