提交 e8156419 编写于 作者: N Nikita Koksharov

Fixed - empty array passed to RKeys.delete() method causes thread blocking. #3783

上级 c8a9b8cd
......@@ -317,6 +317,10 @@ public class RedissonKeys implements RKeys {
@Override
public RFuture<Long> unlinkAsync(String... keys) {
if (keys.length == 0) {
return RedissonPromise.newSucceededFuture(0L);
}
return commandExecutor.writeBatchedAsync(null, RedisCommands.UNLINK, new SlotCallback<Long, Long>() {
AtomicLong results = new AtomicLong();
......@@ -334,6 +338,10 @@ public class RedissonKeys implements RKeys {
@Override
public RFuture<Long> deleteAsync(String... keys) {
if (keys.length == 0) {
return RedissonPromise.newSucceededFuture(0L);
}
return commandExecutor.writeBatchedAsync(null, RedisCommands.DEL, new SlotCallback<Long, Long>() {
AtomicLong results = new AtomicLong();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册