Compare Redis reads using Lettuce's synchronous path.

This commit is contained in:
Jon Chambers
2020-06-09 20:20:48 -04:00
committed by Jon Chambers
parent 0671f05c05
commit 4c623ca3c5
8 changed files with 12 additions and 12 deletions

View File

@@ -113,7 +113,7 @@ public class RateLimiter {
final String bucketName = getBucketName(key);
String serialized = jedis.get(bucketName);
redisClusterExperiment.compareFutureResult(serialized, cacheCluster.withReadCluster(connection -> connection.async().get(bucketName)));
redisClusterExperiment.compareSupplierResult(serialized, () -> cacheCluster.withReadCluster(connection -> connection.sync().get(bucketName)));
if (serialized != null) {
return LeakyBucket.fromSerialized(mapper, serialized);