This repository demonstrates a deadlock issue in the Lettuce Redis client when using a custom SocketAddressResolver that throws an exception. The issue occurs when attempting to connect to a Redis cluster with invalid node configuration.
- Java 8 or higher
Using Maven Wrapper:
./mvnw compile exec:java
The application will compile and then hang indefinitely due to a deadlock in the Lettuce client's connection initialization process. This occurs because:
- The application attempts to connect to a Redis cluster
- A custom SocketAddressResolver throws an exception due to invalid port configuration
- The connection's CompletableFuture is not properly completed in the error path
- The main thread becomes deadlocked waiting for cluster partitions
For more details about this issue, please refer to: redis/lettuce#3240