Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-10719

JCache: CacheManager.destroyCache should not remove internal caches

    XMLWordPrintable

Details

    Description

      ___protobuf_metadata is an internal cache, but it is also exposed to users – including JCache users, who see it as a predefined cache.

      Some JCache TCK tests try to remove all caches between test methods using
      CacheManager.destroyCache(). By removing ___protobuf_metadata they break ProtobufMetadataManagerImpl and don't allow the following tests to create any new caches:

      [2019-10-01T07:11:13.651Z] [OK:   144, KO:     1, SKIP:     0] Test failed: CacheExpiryTest.testCacheStatisticsRemoveAllNoneExpired
      [2019-10-01T07:11:13.651Z] org.infinispan.commons.CacheConfigurationException: ISPN000436: Cache '___protobuf_metadata' has been requested, but no cache configuration exists with that name and no default cache has been set for this container
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.configuration.ConfigurationManager.getConfiguration(ConfigurationManager.java:65)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:637)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:626)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.internalGetCache(DefaultCacheManager.java:511)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:495)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:488)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.query.remote.impl.SecurityActions.lambda$getUnwrappedCache$0(SecurityActions.java:43)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.security.Security.doPrivileged(Security.java:47)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.query.remote.impl.SecurityActions.doPrivileged(SecurityActions.java:30)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.query.remote.impl.SecurityActions.getUnwrappedCache(SecurityActions.java:42)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.query.remote.impl.ProtobufMetadataManagerImpl.addCacheDependency(ProtobufMetadataManagerImpl.java:68)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.query.remote.impl.LifecycleManager.cacheStarting(LifecycleManager.java:215)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.factories.ComponentRegistry.notifyCacheStarting(ComponentRegistry.java:223)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.factories.ComponentRegistry.preStart(ComponentRegistry.java:213)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.factories.AbstractComponentRegistry.start(AbstractComponentRegistry.java:238)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.factories.ComponentRegistry.start(ComponentRegistry.java:203)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.cache.impl.CacheImpl.start(CacheImpl.java:1082)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.cache.impl.AbstractDelegatingCache.start(AbstractDelegatingCache.java:512)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:682)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:626)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.internalGetCache(DefaultCacheManager.java:511)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:495)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:488)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.jcache.embedded.JCacheManager.create(JCacheManager.java:149)
      [2019-10-01T07:11:13.651Z] 	at org.infinispan.jcache.AbstractJCacheManager.createCache(AbstractJCacheManager.java:93)
      [2019-10-01T07:11:13.651Z] 	at org.jsr107.tck.expiry.CacheExpiryTest.testCacheStatisticsRemoveAllNoneExpired(CacheExpiryTest.java:163)
      

      Attachments

        Issue Links

          Activity

            People

              dberinde@redhat.com Dan Berindei
              dberinde@redhat.com Dan Berindei
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: