Log a warning if remote-store configuration exists when the REMOTE_CACHE Feature is enabled
Closes #31775 Signed-off-by: Ryan Emerson <remerson@redhat.com>
This commit is contained in:
parent
8d7e18ec29
commit
349ff51116
1 changed files with 12 additions and 1 deletions
|
@ -223,7 +223,18 @@ public class CacheManagerFactory {
|
||||||
var builders = builder.getNamedConfigurationBuilders();
|
var builders = builder.getNamedConfigurationBuilders();
|
||||||
// remove all distributed caches
|
// remove all distributed caches
|
||||||
logger.debug("Removing all distributed caches.");
|
logger.debug("Removing all distributed caches.");
|
||||||
Arrays.stream(CLUSTERED_CACHE_NAMES).forEach(builders::remove);
|
for (String cacheName : CLUSTERED_CACHE_NAMES) {
|
||||||
|
var remoteStore = builders.get(cacheName)
|
||||||
|
.persistence()
|
||||||
|
.stores()
|
||||||
|
.stream()
|
||||||
|
.filter(RemoteStoreConfigurationBuilder.class::isInstance)
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if (remoteStore.isPresent())
|
||||||
|
logger.warnf("remote-store configuration detected for cache '%s'. Explicit cache configuration ignored when using '%s' Feature", cacheName, Profile.Feature.REMOTE_CACHE.getKey());
|
||||||
|
builders.remove(cacheName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var start = isStartEagerly();
|
var start = isStartEagerly();
|
||||||
|
|
Loading…
Reference in a new issue