DATAREDIS-656 - Reduce default LettuceConnectionFactory shutdown timeout to 100ms.
Reducing the default to 100 milliseconds is a good compromise to retain a quiet time in for parallel execution and optimize for default, single-threaded execution (such as test execution or regular application shutdown). The shutdown timeout can be adjusted to fit specific application needs. Previously, LettuceConnectionFactory used different defaults: 2 seconds if used LettuceClientConfiguration and 60 seconds without LettuceClientConfiguration. In any case, defaults delay shutdown and cause severe delays in total. The driver default of two seconds provides enough time to complete long-running tasks before the actual thread pool shutdown. Original Pull Request: #251
This commit is contained in:
committed by
Christoph Strobl
parent
475d1bbf41
commit
3185173805
@@ -42,7 +42,7 @@ public class LettuceClientConfigurationUnitTests {
|
||||
assertThat(configuration.getClientOptions()).isEmpty();
|
||||
assertThat(configuration.getClientResources()).isEmpty();
|
||||
assertThat(configuration.getCommandTimeout()).isEqualTo(Duration.ofSeconds(60));
|
||||
assertThat(configuration.getShutdownTimeout()).isEqualTo(Duration.ofSeconds(2));
|
||||
assertThat(configuration.getShutdownTimeout()).isEqualTo(Duration.ofMillis(100));
|
||||
}
|
||||
|
||||
@Test // DATAREDIS-574
|
||||
|
||||
Reference in New Issue
Block a user