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

Query on Invalidation cache fails in case of non-InfinispanDirectoryProvider

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • None
    • Embedded Querying
    • None

      Assume that node1 contains entries, node2 doesn't. And assume, that the cache on both nodes is configured as:

      ConfigurationBuilder cacheCfg = getDefaultClusteredCacheConfig(CacheMode.INVALIDATION_SYNC, false);
            cacheCfg.indexing()
                  .enable()
                  .indexLocalOnly(true)
                  .addProperty("default.directory_provider", "ram")
                  .addProperty("lucene_version", "LUCENE_CURRENT") ;
                  
       List<Cache<String, Person>> caches = createClusteredCaches(2, cacheCfg);
      

      If I'm running the query on node1, then the query proceeds properly.

      If I'm running the query on node2, then I'm getting the following exception:

      org.hibernate.search.SearchException: There are no mapped entities. Don't forget to add @Indexed to at least one class.
      	at org.hibernate.search.query.engine.impl.HSQueryImpl.buildSearcher(HSQueryImpl.java:534)
      	at org.hibernate.search.query.engine.impl.HSQueryImpl.buildSearcher(HSQueryImpl.java:511)
      	at org.hibernate.search.query.engine.impl.HSQueryImpl.queryEntityInfos(HSQueryImpl.java:249)
      	at org.infinispan.query.impl.CacheQueryImpl.list(CacheQueryImpl.java:170)
      	at org.infinispan.query.blackbox.ClusteredInvalidationCacheTest.testSimple(ClusteredInvalidationCacheTest.java:119)
      

      You can find the test attached.

            Unassigned Unassigned
            amanukya@redhat.com Anna Manukyan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: