Fixed - semaphore used during local cache clearing process isn't deleted.

pull/2637/head
Nikita Koksharov 5 years ago
parent a67f62c154
commit 72198b6e46

@ -255,6 +255,7 @@ public abstract class LocalCacheListener {
}
RSemaphore semaphore = getClearSemaphore(id);
semaphore.expireAsync(60, TimeUnit.SECONDS);
semaphore.acquireAsync(res.intValue()).onComplete((r, ex) -> {
if (ex != null) {
result.tryFailure(ex);
@ -346,7 +347,7 @@ public abstract class LocalCacheListener {
});
}
protected RSemaphore getClearSemaphore(byte[] requestId) {
private RSemaphore getClearSemaphore(byte[] requestId) {
String id = ByteBufUtil.hexDump(requestId);
RSemaphore semaphore = new RedissonSemaphore(commandExecutor, name + ":clear:" + id);
return semaphore;

Loading…
Cancel
Save