KEYCLOAK-14302 Fix the setting of the lifespan for cache entries. This bug caused that jobs were no longer executed after temporary network partition in multinode setup, because the cluster based locks used for the coordination were never released.
This commit is contained in:
parent
eac3341241
commit
66dfa32cd5
1 changed files with 2 additions and 2 deletions
|
@ -150,9 +150,9 @@ public class InfinispanClusterProviderFactory implements ClusterProviderFactory
|
||||||
try {
|
try {
|
||||||
V result;
|
V result;
|
||||||
if (taskTimeoutInSeconds > 0) {
|
if (taskTimeoutInSeconds > 0) {
|
||||||
result = (V) crossDCAwareCacheFactory.getCache().putIfAbsent(key, value);
|
|
||||||
} else {
|
|
||||||
result = (V) crossDCAwareCacheFactory.getCache().putIfAbsent(key, value, taskTimeoutInSeconds, TimeUnit.SECONDS);
|
result = (V) crossDCAwareCacheFactory.getCache().putIfAbsent(key, value, taskTimeoutInSeconds, TimeUnit.SECONDS);
|
||||||
|
} else {
|
||||||
|
result = (V) crossDCAwareCacheFactory.getCache().putIfAbsent(key, value);
|
||||||
}
|
}
|
||||||
resultRef.set(result);
|
resultRef.set(result);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue