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

indexing properties defined for <namedCache/> in xml are ignored therefore indexes are always persistent

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Hide
      <?xml version="1.0" encoding="UTF-8"?>
      
      <infinispan
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="urn:infinispan:config:5.0 http://www.infinispan.org/schemas/infinispan-config-5.0.xsd"
              xmlns="urn:infinispan:config:5.0">
      
          <namedCache name="simple">
          </namedCache>
      
          <namedCache name="simple-searchable">
              <indexing enabled="true" indexLocalOnly="true">
                  <properties>
                      <property name="hibernate.search.default.directory_provider" value="ram" />
                  </properties>
              </indexing>
          </namedCache>
      
      </infinispan>
      
      import org.infinispan.Cache;
      import org.infinispan.manager.DefaultCacheManager;
      import org.infinispan.manager.EmbeddedCacheManager;
      import org.testng.annotations.BeforeMethod;
      import org.testng.annotations.Test;
      import static org.testng.Assert.assertFalse;
      
      @Test
      public class IndexingConfigurationIgnored {
      
          Cache simpleSearchableCache;
      
          @BeforeMethod
          public void init() throws Exception {
              EmbeddedCacheManager manager = new DefaultCacheManager("simple_caches.xml", true);
              simpleSearchableCache = manager.getCache("simple-searchable");
              simpleSearchableCache.start();
          }
      
          @Test
          public void testIndexingParametersForNamedCache() {
              assertFalse(simpleSearchableCache.getConfiguration().getIndexingProperties().isEmpty(), "should contain definition from xml");
          }
      }
      
      Show
      <?xml version= "1.0" encoding= "UTF-8" ?> <infinispan xmlns:xsi= "http: //www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "urn:infinispan:config:5.0 http: //www.infinispan.org/schemas/infinispan-config-5.0.xsd" xmlns= "urn:infinispan:config:5.0" > <namedCache name= "simple" > </namedCache> <namedCache name= "simple-searchable" > <indexing enabled= " true " indexLocalOnly= " true " > <properties> <property name= "hibernate.search. default .directory_provider" value= "ram" /> </properties> </indexing> </namedCache> </infinispan> import org.infinispan.Cache; import org.infinispan.manager.DefaultCacheManager; import org.infinispan.manager.EmbeddedCacheManager; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import static org.testng.Assert.assertFalse; @Test public class IndexingConfigurationIgnored { Cache simpleSearchableCache; @BeforeMethod public void init() throws Exception { EmbeddedCacheManager manager = new DefaultCacheManager( "simple_caches.xml" , true ); simpleSearchableCache = manager.getCache( "simple-searchable" ); simpleSearchableCache.start(); } @Test public void testIndexingParametersForNamedCache() { assertFalse(simpleSearchableCache.getConfiguration().getIndexingProperties().isEmpty(), "should contain definition from xml" ); } }

      indexing properties defined for <namedCache/> in xml are ignored therefore indexes are always persistent; see reproduction steps for xml / UT

              sgrinove Sanne Grinovero (Inactive)
              jsl_jira Jan Slezak (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: