[JBoss JIRA] (ISPN-5712) Remove buckets from JdbcBinaryStore
by Dan Berindei (JIRA)
Dan Berindei created ISPN-5712:
----------------------------------
Summary: Remove buckets from JdbcBinaryStore
Key: ISPN-5712
URL: https://issues.jboss.org/browse/ISPN-5712
Project: Infinispan
Issue Type: Enhancement
Components: Core, Loaders and Stores
Affects Versions: 8.0.0.CR1, 7.2.4.Final
Reporter: Dan Berindei
Fix For: 8.1.0.Final
Unlike a file system, relational databases can easily deal with millions of entries in the same table, so there's no reason to group entries into buckets.
Some databases may not be able to index on a binary column, in which case the serialized key will need encoding (e.g. BASE64), but grouping entries by hash code should not be necessary.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5710) Unknown entity name when indexing entities defined in inner classes
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5710?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-5710:
--------------------------------
Git Pull Request: https://github.com/infinispan/infinispan/pull/3678, https://github.com/infinispan/infinispan/pull/3681, https://github.com/infinispan/infinispan/pull/3682 (was: https://github.com/infinispan/infinispan/pull/3678, https://github.com/infinispan/infinispan/pull/3681)
> Unknown entity name when indexing entities defined in inner classes
> -------------------------------------------------------------------
>
> Key: ISPN-5710
> URL: https://issues.jboss.org/browse/ISPN-5710
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 7.2.4.Final, 8.0.0.CR1
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Fix For: 8.0.0.Final, 7.2.5.Final
>
>
> Reproducer:
> {code}
> import java.util.List;
> import org.hibernate.search.annotations.Analyze;
> import org.hibernate.search.annotations.Field;
> import org.hibernate.search.annotations.Indexed;
> import org.hibernate.search.annotations.Store;
> import org.infinispan.Cache;
> import org.infinispan.configuration.cache.ConfigurationBuilder;
> import org.infinispan.configuration.cache.Index;
> import org.infinispan.manager.DefaultCacheManager;
> import org.infinispan.query.Search;
> import org.infinispan.query.dsl.Query;
> import org.infinispan.query.dsl.QueryFactory;
> public class Test {
> public static void main(String[] args) {
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.indexing().index(Index.ALL)
> .addProperty("default.directory_provider", "ram")
> .addProperty("lucene_version", "LUCENE_CURRENT");
> // Construct a simple local cache manager with default configuration
> DefaultCacheManager cacheManager = new DefaultCacheManager(builder.build());
> // Obtain the default cache
> Cache<String, Person> cache = cacheManager.getCache();
> // Store some entries
> cache.put("person1", new Person("William", "Shakespeare"));
> cache.put("person2", new Person("William", "Wordsworth"));
> cache.put("person3", new Person("John", "Milton"));
> // Obtain a query factory for the cache
> QueryFactory<?> queryFactory = Search.getQueryFactory(cache);
> // Construct a query
> Query query = queryFactory.from(Person.class).having("name").eq("William").toBuilder().build();
> // Execute the query
> List<Person> matches = query.list();
> matches.forEach(person -> System.out.printf("Match: %s", person));
> // Stop the cache manager and release all resources
> cacheManager.stop();
> }
> @Indexed
> static class Person {
> @Field(store = Store.YES, analyze = Analyze.NO)
> String name;
> @Field(store = Store.YES, analyze = Analyze.NO, indexNullAs = Field.DEFAULT_NULL_TOKEN)
> String surname;
> public Person(String name, String surname) {
> this.name = name;
> this.surname = surname;
> }
> @Override
> public String toString() {
> return "Person2 [name=" + name + ", surname=" + surname + "]";
> }
> }
> }
> {code}
> Stack Trace:
> {code}
> Exception in thread "main" java.lang.IllegalStateException: Unknown entity name com.gustavonalle.infinispan.perf.config.Test.Person
> at org.infinispan.objectfilter.impl.hql.FilterQueryResolverDelegate.registerPersisterSpace(FilterQueryResolverDelegate.java:52)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.entityName(GeneratedHQLResolver.java:12784)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaceRoot(GeneratedHQLResolver.java:3064)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpace(GeneratedHQLResolver.java:2956)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaces(GeneratedHQLResolver.java:2893)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.fromClause(GeneratedHQLResolver.java:2803)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.selectFrom(GeneratedHQLResolver.java:2704)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.querySpec(GeneratedHQLResolver.java:2182)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryExpression(GeneratedHQLResolver.java:2106)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatement(GeneratedHQLResolver.java:1745)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatementSet(GeneratedHQLResolver.java:1658)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.statement(GeneratedHQLResolver.java:654)
> at org.hibernate.hql.ast.spi.QueryResolverProcessor.process(QueryResolverProcessor.java:52)
> at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:82)
> at org.infinispan.objectfilter.impl.BaseMatcher.parse(BaseMatcher.java:115)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:377)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:81)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedQueryBuilder.build(EmbeddedQueryBuilder.java:30)
> at com.gustavonalle.infinispan.perf.config.Test.main(Test.java:35)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5710) Unknown entity name when indexing entities defined in inner classes
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5710?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-5710:
--------------------------------
Fix Version/s: 7.2.5.Final
> Unknown entity name when indexing entities defined in inner classes
> -------------------------------------------------------------------
>
> Key: ISPN-5710
> URL: https://issues.jboss.org/browse/ISPN-5710
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 7.2.4.Final, 8.0.0.CR1
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Fix For: 8.0.0.Final, 7.2.5.Final
>
>
> Reproducer:
> {code}
> import java.util.List;
> import org.hibernate.search.annotations.Analyze;
> import org.hibernate.search.annotations.Field;
> import org.hibernate.search.annotations.Indexed;
> import org.hibernate.search.annotations.Store;
> import org.infinispan.Cache;
> import org.infinispan.configuration.cache.ConfigurationBuilder;
> import org.infinispan.configuration.cache.Index;
> import org.infinispan.manager.DefaultCacheManager;
> import org.infinispan.query.Search;
> import org.infinispan.query.dsl.Query;
> import org.infinispan.query.dsl.QueryFactory;
> public class Test {
> public static void main(String[] args) {
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.indexing().index(Index.ALL)
> .addProperty("default.directory_provider", "ram")
> .addProperty("lucene_version", "LUCENE_CURRENT");
> // Construct a simple local cache manager with default configuration
> DefaultCacheManager cacheManager = new DefaultCacheManager(builder.build());
> // Obtain the default cache
> Cache<String, Person> cache = cacheManager.getCache();
> // Store some entries
> cache.put("person1", new Person("William", "Shakespeare"));
> cache.put("person2", new Person("William", "Wordsworth"));
> cache.put("person3", new Person("John", "Milton"));
> // Obtain a query factory for the cache
> QueryFactory<?> queryFactory = Search.getQueryFactory(cache);
> // Construct a query
> Query query = queryFactory.from(Person.class).having("name").eq("William").toBuilder().build();
> // Execute the query
> List<Person> matches = query.list();
> matches.forEach(person -> System.out.printf("Match: %s", person));
> // Stop the cache manager and release all resources
> cacheManager.stop();
> }
> @Indexed
> static class Person {
> @Field(store = Store.YES, analyze = Analyze.NO)
> String name;
> @Field(store = Store.YES, analyze = Analyze.NO, indexNullAs = Field.DEFAULT_NULL_TOKEN)
> String surname;
> public Person(String name, String surname) {
> this.name = name;
> this.surname = surname;
> }
> @Override
> public String toString() {
> return "Person2 [name=" + name + ", surname=" + surname + "]";
> }
> }
> }
> {code}
> Stack Trace:
> {code}
> Exception in thread "main" java.lang.IllegalStateException: Unknown entity name com.gustavonalle.infinispan.perf.config.Test.Person
> at org.infinispan.objectfilter.impl.hql.FilterQueryResolverDelegate.registerPersisterSpace(FilterQueryResolverDelegate.java:52)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.entityName(GeneratedHQLResolver.java:12784)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaceRoot(GeneratedHQLResolver.java:3064)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpace(GeneratedHQLResolver.java:2956)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaces(GeneratedHQLResolver.java:2893)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.fromClause(GeneratedHQLResolver.java:2803)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.selectFrom(GeneratedHQLResolver.java:2704)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.querySpec(GeneratedHQLResolver.java:2182)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryExpression(GeneratedHQLResolver.java:2106)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatement(GeneratedHQLResolver.java:1745)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatementSet(GeneratedHQLResolver.java:1658)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.statement(GeneratedHQLResolver.java:654)
> at org.hibernate.hql.ast.spi.QueryResolverProcessor.process(QueryResolverProcessor.java:52)
> at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:82)
> at org.infinispan.objectfilter.impl.BaseMatcher.parse(BaseMatcher.java:115)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:377)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:81)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedQueryBuilder.build(EmbeddedQueryBuilder.java:30)
> at com.gustavonalle.infinispan.perf.config.Test.main(Test.java:35)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5710) Unknown entity name when indexing entities defined in inner classes
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5710?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-5710:
--------------------------------
Affects Version/s: 7.2.4.Final
> Unknown entity name when indexing entities defined in inner classes
> -------------------------------------------------------------------
>
> Key: ISPN-5710
> URL: https://issues.jboss.org/browse/ISPN-5710
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 7.2.4.Final, 8.0.0.CR1
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Fix For: 8.0.0.Final
>
>
> Reproducer:
> {code}
> import java.util.List;
> import org.hibernate.search.annotations.Analyze;
> import org.hibernate.search.annotations.Field;
> import org.hibernate.search.annotations.Indexed;
> import org.hibernate.search.annotations.Store;
> import org.infinispan.Cache;
> import org.infinispan.configuration.cache.ConfigurationBuilder;
> import org.infinispan.configuration.cache.Index;
> import org.infinispan.manager.DefaultCacheManager;
> import org.infinispan.query.Search;
> import org.infinispan.query.dsl.Query;
> import org.infinispan.query.dsl.QueryFactory;
> public class Test {
> public static void main(String[] args) {
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.indexing().index(Index.ALL)
> .addProperty("default.directory_provider", "ram")
> .addProperty("lucene_version", "LUCENE_CURRENT");
> // Construct a simple local cache manager with default configuration
> DefaultCacheManager cacheManager = new DefaultCacheManager(builder.build());
> // Obtain the default cache
> Cache<String, Person> cache = cacheManager.getCache();
> // Store some entries
> cache.put("person1", new Person("William", "Shakespeare"));
> cache.put("person2", new Person("William", "Wordsworth"));
> cache.put("person3", new Person("John", "Milton"));
> // Obtain a query factory for the cache
> QueryFactory<?> queryFactory = Search.getQueryFactory(cache);
> // Construct a query
> Query query = queryFactory.from(Person.class).having("name").eq("William").toBuilder().build();
> // Execute the query
> List<Person> matches = query.list();
> matches.forEach(person -> System.out.printf("Match: %s", person));
> // Stop the cache manager and release all resources
> cacheManager.stop();
> }
> @Indexed
> static class Person {
> @Field(store = Store.YES, analyze = Analyze.NO)
> String name;
> @Field(store = Store.YES, analyze = Analyze.NO, indexNullAs = Field.DEFAULT_NULL_TOKEN)
> String surname;
> public Person(String name, String surname) {
> this.name = name;
> this.surname = surname;
> }
> @Override
> public String toString() {
> return "Person2 [name=" + name + ", surname=" + surname + "]";
> }
> }
> }
> {code}
> Stack Trace:
> {code}
> Exception in thread "main" java.lang.IllegalStateException: Unknown entity name com.gustavonalle.infinispan.perf.config.Test.Person
> at org.infinispan.objectfilter.impl.hql.FilterQueryResolverDelegate.registerPersisterSpace(FilterQueryResolverDelegate.java:52)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.entityName(GeneratedHQLResolver.java:12784)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaceRoot(GeneratedHQLResolver.java:3064)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpace(GeneratedHQLResolver.java:2956)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaces(GeneratedHQLResolver.java:2893)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.fromClause(GeneratedHQLResolver.java:2803)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.selectFrom(GeneratedHQLResolver.java:2704)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.querySpec(GeneratedHQLResolver.java:2182)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryExpression(GeneratedHQLResolver.java:2106)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatement(GeneratedHQLResolver.java:1745)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatementSet(GeneratedHQLResolver.java:1658)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.statement(GeneratedHQLResolver.java:654)
> at org.hibernate.hql.ast.spi.QueryResolverProcessor.process(QueryResolverProcessor.java:52)
> at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:82)
> at org.infinispan.objectfilter.impl.BaseMatcher.parse(BaseMatcher.java:115)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:377)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:81)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedQueryBuilder.build(EmbeddedQueryBuilder.java:30)
> at com.gustavonalle.infinispan.perf.config.Test.main(Test.java:35)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5710) Unknown entity name when indexing entities defined in inner classes
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-5710?page=com.atlassian.jira.plugin.... ]
Adrian Nistor updated ISPN-5710:
--------------------------------
Git Pull Request: https://github.com/infinispan/infinispan/pull/3678, https://github.com/infinispan/infinispan/pull/3681 (was: https://github.com/infinispan/infinispan/pull/3678)
> Unknown entity name when indexing entities defined in inner classes
> -------------------------------------------------------------------
>
> Key: ISPN-5710
> URL: https://issues.jboss.org/browse/ISPN-5710
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 7.2.4.Final, 8.0.0.CR1
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Fix For: 8.0.0.Final
>
>
> Reproducer:
> {code}
> import java.util.List;
> import org.hibernate.search.annotations.Analyze;
> import org.hibernate.search.annotations.Field;
> import org.hibernate.search.annotations.Indexed;
> import org.hibernate.search.annotations.Store;
> import org.infinispan.Cache;
> import org.infinispan.configuration.cache.ConfigurationBuilder;
> import org.infinispan.configuration.cache.Index;
> import org.infinispan.manager.DefaultCacheManager;
> import org.infinispan.query.Search;
> import org.infinispan.query.dsl.Query;
> import org.infinispan.query.dsl.QueryFactory;
> public class Test {
> public static void main(String[] args) {
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.indexing().index(Index.ALL)
> .addProperty("default.directory_provider", "ram")
> .addProperty("lucene_version", "LUCENE_CURRENT");
> // Construct a simple local cache manager with default configuration
> DefaultCacheManager cacheManager = new DefaultCacheManager(builder.build());
> // Obtain the default cache
> Cache<String, Person> cache = cacheManager.getCache();
> // Store some entries
> cache.put("person1", new Person("William", "Shakespeare"));
> cache.put("person2", new Person("William", "Wordsworth"));
> cache.put("person3", new Person("John", "Milton"));
> // Obtain a query factory for the cache
> QueryFactory<?> queryFactory = Search.getQueryFactory(cache);
> // Construct a query
> Query query = queryFactory.from(Person.class).having("name").eq("William").toBuilder().build();
> // Execute the query
> List<Person> matches = query.list();
> matches.forEach(person -> System.out.printf("Match: %s", person));
> // Stop the cache manager and release all resources
> cacheManager.stop();
> }
> @Indexed
> static class Person {
> @Field(store = Store.YES, analyze = Analyze.NO)
> String name;
> @Field(store = Store.YES, analyze = Analyze.NO, indexNullAs = Field.DEFAULT_NULL_TOKEN)
> String surname;
> public Person(String name, String surname) {
> this.name = name;
> this.surname = surname;
> }
> @Override
> public String toString() {
> return "Person2 [name=" + name + ", surname=" + surname + "]";
> }
> }
> }
> {code}
> Stack Trace:
> {code}
> Exception in thread "main" java.lang.IllegalStateException: Unknown entity name com.gustavonalle.infinispan.perf.config.Test.Person
> at org.infinispan.objectfilter.impl.hql.FilterQueryResolverDelegate.registerPersisterSpace(FilterQueryResolverDelegate.java:52)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.entityName(GeneratedHQLResolver.java:12784)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaceRoot(GeneratedHQLResolver.java:3064)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpace(GeneratedHQLResolver.java:2956)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaces(GeneratedHQLResolver.java:2893)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.fromClause(GeneratedHQLResolver.java:2803)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.selectFrom(GeneratedHQLResolver.java:2704)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.querySpec(GeneratedHQLResolver.java:2182)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryExpression(GeneratedHQLResolver.java:2106)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatement(GeneratedHQLResolver.java:1745)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatementSet(GeneratedHQLResolver.java:1658)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.statement(GeneratedHQLResolver.java:654)
> at org.hibernate.hql.ast.spi.QueryResolverProcessor.process(QueryResolverProcessor.java:52)
> at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:82)
> at org.infinispan.objectfilter.impl.BaseMatcher.parse(BaseMatcher.java:115)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:377)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:81)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedQueryBuilder.build(EmbeddedQueryBuilder.java:30)
> at com.gustavonalle.infinispan.perf.config.Test.main(Test.java:35)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-4777) Replace command not atomic in REPL_SYNC cache mode
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-4777?page=com.atlassian.jira.plugin.... ]
Gustavo Fernandes commented on ISPN-4777:
-----------------------------------------
Anuj,
the amended test always passes, even after leaving it running for a long time (a day or so). Are you able to reproduce it in your environment?
> Replace command not atomic in REPL_SYNC cache mode
> --------------------------------------------------
>
> Key: ISPN-4777
> URL: https://issues.jboss.org/browse/ISPN-4777
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 7.2.4.Final
> Reporter: Anuj Shah
> Assignee: Gustavo Fernandes
> Attachments: ReaderLockerTest.java
>
>
> This problem was discovered using the Lucene InfinispanDirectory with DistributedSegmentReadLocker. We found after a while of production usage that some Lucene files were randomly removed from the caches, but remained in the file listing entry, which resulted in an unusable index.
> We managed to replicate the problem in a test that acquires and releases read lock concurrently and checks for file deletion. We found this fails quickly when using REPL_SYNC mode, but runs for a while with DIST_SYNC.
> Some extra logging indicated that the replace command used to increment the lock counter across multiple cluster members, results in an single increment when called concurrently, with both calls reporting success. This eventually causes the file deletion, as we have now mis-counted the number of readers. We also observed the opposite effect of the counter only decrementing by one when releasing.
> Our conclusion is that the replace command fails atomicity when in REPL_SYNC mode, but works in other modes, we tried DIST_SYNC, DIST_ASYNC and REPL_ASYNC.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5710) Unknown entity name when indexing entities defined in inner classes
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5710?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5710:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Unknown entity name when indexing entities defined in inner classes
> -------------------------------------------------------------------
>
> Key: ISPN-5710
> URL: https://issues.jboss.org/browse/ISPN-5710
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.0.0.CR1
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Fix For: 8.0.0.Final
>
>
> Reproducer:
> {code}
> import java.util.List;
> import org.hibernate.search.annotations.Analyze;
> import org.hibernate.search.annotations.Field;
> import org.hibernate.search.annotations.Indexed;
> import org.hibernate.search.annotations.Store;
> import org.infinispan.Cache;
> import org.infinispan.configuration.cache.ConfigurationBuilder;
> import org.infinispan.configuration.cache.Index;
> import org.infinispan.manager.DefaultCacheManager;
> import org.infinispan.query.Search;
> import org.infinispan.query.dsl.Query;
> import org.infinispan.query.dsl.QueryFactory;
> public class Test {
> public static void main(String[] args) {
> ConfigurationBuilder builder = new ConfigurationBuilder();
> builder.indexing().index(Index.ALL)
> .addProperty("default.directory_provider", "ram")
> .addProperty("lucene_version", "LUCENE_CURRENT");
> // Construct a simple local cache manager with default configuration
> DefaultCacheManager cacheManager = new DefaultCacheManager(builder.build());
> // Obtain the default cache
> Cache<String, Person> cache = cacheManager.getCache();
> // Store some entries
> cache.put("person1", new Person("William", "Shakespeare"));
> cache.put("person2", new Person("William", "Wordsworth"));
> cache.put("person3", new Person("John", "Milton"));
> // Obtain a query factory for the cache
> QueryFactory<?> queryFactory = Search.getQueryFactory(cache);
> // Construct a query
> Query query = queryFactory.from(Person.class).having("name").eq("William").toBuilder().build();
> // Execute the query
> List<Person> matches = query.list();
> matches.forEach(person -> System.out.printf("Match: %s", person));
> // Stop the cache manager and release all resources
> cacheManager.stop();
> }
> @Indexed
> static class Person {
> @Field(store = Store.YES, analyze = Analyze.NO)
> String name;
> @Field(store = Store.YES, analyze = Analyze.NO, indexNullAs = Field.DEFAULT_NULL_TOKEN)
> String surname;
> public Person(String name, String surname) {
> this.name = name;
> this.surname = surname;
> }
> @Override
> public String toString() {
> return "Person2 [name=" + name + ", surname=" + surname + "]";
> }
> }
> }
> {code}
> Stack Trace:
> {code}
> Exception in thread "main" java.lang.IllegalStateException: Unknown entity name com.gustavonalle.infinispan.perf.config.Test.Person
> at org.infinispan.objectfilter.impl.hql.FilterQueryResolverDelegate.registerPersisterSpace(FilterQueryResolverDelegate.java:52)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.entityName(GeneratedHQLResolver.java:12784)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaceRoot(GeneratedHQLResolver.java:3064)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpace(GeneratedHQLResolver.java:2956)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.persisterSpaces(GeneratedHQLResolver.java:2893)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.fromClause(GeneratedHQLResolver.java:2803)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.selectFrom(GeneratedHQLResolver.java:2704)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.querySpec(GeneratedHQLResolver.java:2182)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryExpression(GeneratedHQLResolver.java:2106)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatement(GeneratedHQLResolver.java:1745)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.queryStatementSet(GeneratedHQLResolver.java:1658)
> at org.hibernate.hql.ast.origin.hql.resolve.GeneratedHQLResolver.statement(GeneratedHQLResolver.java:654)
> at org.hibernate.hql.ast.spi.QueryResolverProcessor.process(QueryResolverProcessor.java:52)
> at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:82)
> at org.infinispan.objectfilter.impl.BaseMatcher.parse(BaseMatcher.java:115)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:377)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:81)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedQueryBuilder.build(EmbeddedQueryBuilder.java:30)
> at com.gustavonalle.infinispan.perf.config.Test.main(Test.java:35)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5706) Execution of a Hibrid Query returns incorrect results, when the filter condition fails(match() returns false) for at least some of the results returned by the lucene query execution, before reaching any other successful results(which satisfies the filter)
by Prashanth Reddy (JIRA)
[ https://issues.jboss.org/browse/ISPN-5706?page=com.atlassian.jira.plugin.... ]
Prashanth Reddy commented on ISPN-5706:
---------------------------------------
Thank you, Adrian.
> Execution of a Hibrid Query returns incorrect results, when the filter condition fails(match() returns false) for at least some of the results returned by the lucene query execution, before reaching any other successful results(which satisfies the filter)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-5706
> URL: https://issues.jboss.org/browse/ISPN-5706
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.0.0.Beta3
> Reporter: Prashanth Reddy
> Assignee: Adrian Nistor
> Priority: Critical
> Fix For: 8.0.0.Final
>
> Attachments: HybridQuery.diff
>
>
> The hibrid query, mentioned below produces partial or zero results(depending on the data), upon execution.
> SELECT p.ID, p.NAME FROM com.testapp.Person p WHERE p.IS_ACTIVE=1 AND p.ID>1000 and p.ID<10000
> For the data,
> ID | NAME | CITY | IS_ACTIVE
> -------------------
> 2001 person1 city1 0
> 2002 person1 city1 1
> 2003 person1 city1 1
> 2004 person1 city1 0
> 2005 person1 city2 1
> 2006 person1 city2 1
> 2007 person1 city3 0
> 2008 person1 city3 1
> Indexed fields: ID, NAME, CITY
> Non-indexed fields: IS_ACTIVE
> Query execution returned 0 number of rows, whereas expected result count is 8.
> Root cause for the problem is very trivial, and the details are as follows,
> As we know, hibrid query execution involves,
> * Execution of lucene query that is constructed based on boole shannon expansion
> * Applying filter on the results obtained from above operation, in order to cover the conditions that deals with non-indexed fields
> In the second step, there is a mismatch between the representation of filter operation return status and the way end of the result list is detected at the outer layer.
> As per the current implementation, filter operation returns null, if the filter condition is not satisfied. But, the same is also used for determining whether there are any further results to be retrieved, which is causing the actual problem.
> Following changes can resolve the problem,
> file: infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java
> diff:
> Index: infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java
> ===================================================================
> --- infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java (revision -----)
> +++ infinispan-8.0.0.Beta3/query/src/main/java/org/infinispan/query/dsl/embedded/impl/HybridQuery.java (working copy)
> @@ -70,12 +70,15 @@
>
> private void update() {
> if (!isReady) {
> - if (it.hasNext()) {
> - Object next = it.next();
> - nextResult = objectFilter.filter(next);
> - } else {
> - nextResult = null;
> - }
> + do {
> + if (it.hasNext()) {
> + Object next = it.next();
> + nextResult = objectFilter.filter(next);
> + } else {
> + nextResult = null;
> + break;
> + }
> + } while (nextResult == null);
> isReady = true;
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5705) Execution of a Hibrid Query that involves certain specific 'OR' conditions returns incorrect results
by Prashanth Reddy (JIRA)
[ https://issues.jboss.org/browse/ISPN-5705?page=com.atlassian.jira.plugin.... ]
Prashanth Reddy commented on ISPN-5705:
---------------------------------------
Thank you, Adrian.
> Execution of a Hibrid Query that involves certain specific 'OR' conditions returns incorrect results
> ----------------------------------------------------------------------------------------------------
>
> Key: ISPN-5705
> URL: https://issues.jboss.org/browse/ISPN-5705
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying
> Affects Versions: 8.0.0.Beta3
> Environment: Hibrid Query that includes 'OR' condition fails in certain specific cases
> Reporter: Prashanth Reddy
> Assignee: Adrian Nistor
> Priority: Critical
> Fix For: 8.0.0.Final
>
> Attachments: BooleShannonExpansion.diff
>
>
> The hibrid query, mentioned below produces wrong results, upon execution.
> SELECT p.ID, p.NAME FROM com.testapp.Person p WHERE p.IS_ACTIVE=1 AND (p.CITY='city1' OR p.CITY='city2') AND p.ID>1000
> for the Data:
> ID | NAME | CITY | IS_ACTIVE
> -------------------
> 2001 person1 city1 1
> 2002 person1 city1 1
> 2003 person1 city1 1
> 2004 person1 city1 0
> 2005 person1 city2 1
> 2006 person1 city2 1
> 2007 person1 city3 0
> 2008 person1 city3 1
> Indexed fields: ID, NAME, CITY
> Non-indexed fields: IS_ACTIVE
> Query execution returned 0 number of rows, whereas expected result count is 5.
> After some analysis root cause for the problem has been found, and the details are as follows,
> As a part of separating the query that depends on indexed fields, using boole shannon algorithm, it has first extraced out the condition 'IS_ACTIVE=1' (as it deals with non-indexed fields).
> Assuming four boolean conditions as c1, c2, c3, c4, where c1 represents the condition 'IS_ACTIVE=1'
> f(c1,c2,c3,c4) = c1.f(1, c2, c3, c4) + c1`.f`(0, c2, c3, c4)
> consider
> e1=f(1, c2, c3, c4)
> e2=f`(0, c2, c3, c4)
> which have to be used for constructing the lucene query, for further transformation.
> After splitting as per the above logic, it is trying to optimize the resultant subconditions(e1, e2), so as to reduce the number of conditions to be evaluated. One such optimization that has been found is that when there is a conjuction operation between two comparison predicates dealing with same lvalues(here, same fields), but with the different rvalues(here, constants), it has been optimized to replace it with a contradiction(constant false boolean expression). As we know, this optimization is applicable only for conjuction. But, the same is applied even for the disjuction, which is causing the above mentioned problem.
> For example,
> condition p.CITY='city1' AND p.CITY='city2'
> can be replaced with CONTRADICTION(BooleanConst.FALSE)
> But, the same cannot be done, for
> condition p.CITY='city1' OR p.CITY='city2'
> Following change may correct the problem.
> File: infinispan-8.0.0.Beta3/object-filter/src/main/java/org/infinispan/objectfilter/impl/syntax/BooleShannonExpansion.java:155
> diff:
> @@ -152,7 +152,7 @@
> }
> }
> }
> - PredicateOptimisations.optimizePredicates(newChildren, true);
> + PredicateOptimisations.optimizePredicates(newChildren, false);
> if (newChildren.size() == 1) {
> return newChildren.get(0);
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months
[JBoss JIRA] (ISPN-5696) javax.transaction dependency should be compile
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-5696?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-5696:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> javax.transaction dependency should be compile
> ----------------------------------------------
>
> Key: ISPN-5696
> URL: https://issues.jboss.org/browse/ISPN-5696
> Project: Infinispan
> Issue Type: Feature Request
> Components: Build process
> Affects Versions: 8.0.0.CR1
> Reporter: Galder Zamarreño
> Assignee: Tristan Tarrant
> Priority: Blocker
> Fix For: 8.0.0.Final
>
>
> ISPN-5541 made all javax dependencies provided, including javax.transaction. This dependency though is needed for building transactional configuration, even if you're using no transactional configurations. E.g. constructing {{new DefaultCacheManager()}} without that dependency throws:
> {code}
> Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/TransactionManager
> at org.infinispan.configuration.cache.TransactionConfiguration.<clinit>(TransactionConfiguration.java:30)
> at org.infinispan.configuration.cache.TransactionConfigurationBuilder.<init>(TransactionConfigurationBuilder.java:37)
> at org.infinispan.configuration.cache.ConfigurationBuilder.<init>(ConfigurationBuilder.java:53)
> at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:213)
> at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:134)
> at org.infinispan.tutorial.simple.functional.InfinispanFunctional.main(InfinispanFunctional.java:22)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
> Caused by: java.lang.ClassNotFoundException: javax.transaction.TransactionManager
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 11 more
> {code}
> The quick fix is to reinstate not-provided for {{javax.transaction}}. Longer term, this dependency should not kick in unless you have a transactional cache configuration.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
8 years, 10 months