You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UnifiedJedis and possibly other type constructors that accept a URI and a JedisClientConfig instantiate themselves with a mix of elements from both. This isn't unreasonable given that the URI can contain more than just host and port, but it isn't documented.
Options to fix it:
Document the current behavior
Update the constructors to let, for example, any config options win if both are specified, and document the behavior.
For example:
// worksUnifiedJedisjedis = newUnifiedJedis(newHostAndPort("localhost", 6379), DefaultJedisClientConfig.builder().user("username").password("password").build());
// also worksUnifiedJedisjedis2 = newUnifiedJedis(URI.create("redis://username:password@localhost:6379"));
// doesn't set auth correctlyUnifiedJedisohNo = newUnifiedJedis(URI.create("redis://localhost:6379"), DefaultJedisClientConfig.builder().user("username").password("password").build());
@joshrotenberg Thank you for sharing. Our URI support is not so dynamic yet. In the current design, when you're using URI you should put all parameters that our URI processor supports.
I agree that stronger documentation would be helpful.
UnifiedJedis and possibly other type constructors that accept a
URI
and aJedisClientConfig
instantiate themselves with a mix of elements from both. This isn't unreasonable given that the URI can contain more than just host and port, but it isn't documented.Options to fix it:
For example:
See
jedis/src/main/java/redis/clients/jedis/UnifiedJedis.java
Line 90 in 5442642
The text was updated successfully, but these errors were encountered: