Fix XREVRANGE using Lettuce to use the same connection.

XREVRANGE using Lettuce uses now the same connection instead of pinning execution to a dedicated connection.

Closes #2078
This commit is contained in:
Mark Paluch
2021-06-09 15:53:44 +02:00
parent 2711181ec8
commit 866010e71d

View File

@@ -366,7 +366,7 @@ class LettuceStreamCommands implements RedisStreamCommands {
io.lettuce.core.Range<String> lettuceRange = RangeConverter.toRange(range, Function.identity());
io.lettuce.core.Limit lettuceLimit = LettuceConverters.toLimit(limit);
return connection.invoke(getAsyncDedicatedConnection())
return connection.invoke()
.fromMany(RedisStreamAsyncCommands::xrevrange, key, lettuceRange, lettuceLimit)
.toList(StreamConverters.byteRecordConverter());
}