Fix putAll issues

Closes: #16287
This commit is contained in:
Hynek Mlnarik 2023-01-05 17:35:32 +01:00 committed by Michal Hajas
parent cc641cb72b
commit 7708e2cc5c

View file

@ -865,7 +865,9 @@ public class InfinispanUserSessionProvider implements UserSessionProvider {
offline ? SessionTimeouts::getOfflineSessionLifespanMs : SessionTimeouts::getUserSessionLifespanMs,
offline ? SessionTimeouts::getOfflineSessionMaxIdleMs : SessionTimeouts::getUserSessionMaxIdleMs);
} else {
Retry.executeWithBackoff((int iteration) -> {
cache.putAll(sessionsById);
}, 10, 10);
}
// put all entities to the remoteCache (if exists)
@ -899,15 +901,17 @@ public class InfinispanUserSessionProvider implements UserSessionProvider {
}
// Import client sessions
Cache<UUID, SessionEntityWrapper<AuthenticatedClientSessionEntity>> clientSessCache = offline ? offlineClientSessionCache : clientSessionCache;
clientSessCache = CacheDecorators.skipCacheLoaders(clientSessCache);
Cache<UUID, SessionEntityWrapper<AuthenticatedClientSessionEntity>> clientSessCache =
CacheDecorators.skipCacheLoaders(offline ? offlineClientSessionCache : clientSessionCache);
if (importWithExpiration) {
importSessionsWithExpiration(clientSessionsById, clientSessCache,
offline ? SessionTimeouts::getOfflineClientSessionLifespanMs : SessionTimeouts::getClientSessionLifespanMs,
offline ? SessionTimeouts::getOfflineClientSessionMaxIdleMs : SessionTimeouts::getClientSessionMaxIdleMs);
} else {
Retry.executeWithBackoff((int iteration) -> {
clientSessCache.putAll(clientSessionsById);
}, 10, 10);
}
// put all entities to the remoteCache (if exists)