Details
-
Bug
-
Resolution: Done
-
Major
-
13.0.0.Dev03
-
None
Description
It's possible for caches that are created and stored in org.infinispan.CONFIG to be temporarily unavailable after a server has been restarted and ISPN080001: Infinispan Server 13.0.0-SNAPSHOT started logged. This can result in clients receiving CacheNotFoundException.
The root cause of the issue is the use of the GlobalConfigurationStateListener. When a server starts up the GlobalConfigurationManagerImpl reads the cache definitions stored in caches.xml and then calls getOrCreateCache in order to add the definition to the org.infinispan.CONFIG cache. Startup is blocked until the getOrCreateCache operation completes. However, the cache definition is not added to the local EmbeddedCacheManager until the listener receives the CacheEntryCreated event. This event is executed in parallel to the getOrCreateCache call, hence the sever can proceed to startup before the cache definition is added to the local EmbeddedCacheManager via the event.