Don't send `CLIENT SETINFO` commands when connecting to Redis instances
This commit is contained in:
parent
8c984cbf42
commit
d8f53954d0
|
@ -59,6 +59,17 @@ public class FaultTolerantRedisClient {
|
||||||
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
||||||
|
// Lettuce will issue a CLIENT SETINFO command unconditionally if these fields are set (and they are by default),
|
||||||
|
// which can generate a bunch of spurious warnings in versions of Redis before 7.2.0.
|
||||||
|
//
|
||||||
|
// See:
|
||||||
|
//
|
||||||
|
// - https://github.com/redis/lettuce/pull/2823
|
||||||
|
// - https://github.com/redis/lettuce/issues/2817
|
||||||
|
redisUri.setClientName(null);
|
||||||
|
redisUri.setLibraryName(null);
|
||||||
|
redisUri.setLibraryVersion(null);
|
||||||
|
|
||||||
final LettuceShardCircuitBreaker lettuceShardCircuitBreaker = new LettuceShardCircuitBreaker(name,
|
final LettuceShardCircuitBreaker lettuceShardCircuitBreaker = new LettuceShardCircuitBreaker(name,
|
||||||
circuitBreakerConfiguration.toCircuitBreakerConfig(), Schedulers.newSingle("topology-changed-" + name, true));
|
circuitBreakerConfiguration.toCircuitBreakerConfig(), Schedulers.newSingle("topology-changed-" + name, true));
|
||||||
this.redisClient = RedisClient.create(clientResourcesBuilder.build(), redisUri);
|
this.redisClient = RedisClient.create(clientResourcesBuilder.build(), redisUri);
|
||||||
|
|
|
@ -75,6 +75,19 @@ public class FaultTolerantRedisClusterClient {
|
||||||
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
|
||||||
|
// Lettuce will issue a CLIENT SETINFO command unconditionally if these fields are set (and they are by default),
|
||||||
|
// which can generate a bunch of spurious warnings in versions of Redis before 7.2.0.
|
||||||
|
//
|
||||||
|
// See:
|
||||||
|
//
|
||||||
|
// - https://github.com/redis/lettuce/pull/2823
|
||||||
|
// - https://github.com/redis/lettuce/issues/2817
|
||||||
|
redisUris.forEach(redisUri -> {
|
||||||
|
redisUri.setClientName(null);
|
||||||
|
redisUri.setLibraryName(null);
|
||||||
|
redisUri.setLibraryVersion(null);
|
||||||
|
});
|
||||||
|
|
||||||
final LettuceShardCircuitBreaker lettuceShardCircuitBreaker = new LettuceShardCircuitBreaker(name,
|
final LettuceShardCircuitBreaker lettuceShardCircuitBreaker = new LettuceShardCircuitBreaker(name,
|
||||||
circuitBreakerConfig.toCircuitBreakerConfig(), Schedulers.newSingle("topology-changed-" + name, true));
|
circuitBreakerConfig.toCircuitBreakerConfig(), Schedulers.newSingle("topology-changed-" + name, true));
|
||||||
this.clusterClient = RedisClusterClient.create(
|
this.clusterClient = RedisClusterClient.create(
|
||||||
|
|
Loading…
Reference in New Issue