[JBoss JIRA] (ISPN-5705) Execution of a Hibrid Query that involves certain specific 'OR' conditions returns incorrect results
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-5705?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-5705:
-----------------------------------------------
Dave Stahl <dstahl(a)redhat.com> changed the Status of [bug 1258800|https://bugzilla.redhat.com/show_bug.cgi?id=1258800] from MODIFIED to ON_QA
> 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.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPN-5691) Server should enable writeSkew for some configurations by default
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-5691?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-5691:
-----------------------------------------------
Dave Stahl <dstahl(a)redhat.com> changed the Status of [bug 1259355|https://bugzilla.redhat.com/show_bug.cgi?id=1259355] from MODIFIED to ON_QA
> Server should enable writeSkew for some configurations by default
> -----------------------------------------------------------------
>
> Key: ISPN-5691
> URL: https://issues.jboss.org/browse/ISPN-5691
> Project: Infinispan
> Issue Type: Enhancement
> Components: Server
> Reporter: Galder Zamarreño
> Assignee: Tristan Tarrant
> Fix For: 8.1.0.Final, 7.2.6.Final
>
>
> By default, optimistic locking caches do not enable write skew. This was already spotted in ISPN-3655.
> In an embedded environment, the user can always enable write skew in its configuration, but this cannot be enabled in server mode.
> Widlfly does enable write skew programmatically depending on the configuration:
> {quote}
> > hey, quick q: can you configure writeSkew on infinispan wildfly
> config?
> <pferraro> we always enable write skew for synchronous, optimistic,
> repeatable-read caches, and disable otherwise
> > pferraro: ah, you do it in the integration code?
> <pferraro> yes
> {quote}
> We need to be doing the same in server configuration, otherwise we run the risk of having issues with conditional operations under failure situations (see ISPN-2956)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPRK-2) Management of cache lifecycles
by RJ Nowling (JIRA)
[ https://issues.jboss.org/browse/ISPRK-2?page=com.atlassian.jira.plugin.sy... ]
RJ Nowling updated ISPRK-2:
---------------------------
Summary: Management of cache lifecycles (was: Remote checking for existence of, creation, deletion, and clearing of caches)
> Management of cache lifecycles
> ------------------------------
>
> Key: ISPRK-2
> URL: https://issues.jboss.org/browse/ISPRK-2
> Project: Infinispan Spark
> Issue Type: Feature Request
> Reporter: RJ Nowling
>
> For analytics use cases, the caches will rarely be known ahead of time -- they are dependent on the particular jobs being run. As such, jobs should have the ability to manage the lifecycle of caches, in particular:
> * Checking if a cache exists
> * Creating a cache
> * Deleting a cache
> * Clearing a cache
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPRK-2) Remote checking for existence of, creation, deletion, and clearing of caches
by RJ Nowling (JIRA)
RJ Nowling created ISPRK-2:
------------------------------
Summary: Remote checking for existence of, creation, deletion, and clearing of caches
Key: ISPRK-2
URL: https://issues.jboss.org/browse/ISPRK-2
Project: Infinispan Spark
Issue Type: Feature Request
Reporter: RJ Nowling
For analytics use cases, the caches will rarely be known ahead of time -- they are dependent on the particular jobs being run. As such, jobs should have the ability to manage the lifecycle of caches, in particular:
* Checking if a cache exists
* Creating a cache
* Deleting a cache
* Clearing a cache
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (ISPN-5787) Issues with aggregation queries using Date objects
by Jakub Markos (JIRA)
[ https://issues.jboss.org/browse/ISPN-5787?page=com.atlassian.jira.plugin.... ]
Jakub Markos commented on ISPN-5787:
------------------------------------
Tests for this are already included as a part of https://github.com/infinispan/infinispan/pull/3722.
> Issues with aggregation queries using Date objects
> --------------------------------------------------
>
> Key: ISPN-5787
> URL: https://issues.jboss.org/browse/ISPN-5787
> Project: Infinispan
> Issue Type: Bug
> Reporter: Jakub Markos
> Assignee: Adrian Nistor
>
> I found 2 problems, not sure if they have a common cause:
> 1.
> This query
> {code}
> Query q = qf.from(getModelFactory().getTransactionImplClass())
> .select("date")
> .having("date").between(makeDate("2013-02-15"), makeDate("2013-03-15")).toBuilder()
> .groupBy("date")
> .build();
> List<Object[]> list = q.list();
> {code}
> fails with
> {code}
> org.hibernate.hql.ParsingException: HQL000002: The query SELECT _gen0.date FROM org.infinispan.query.dsl.embedded.testdomain.hsearch.TransactionHS _gen0 WHERE (date >= Fri Feb 15 01:00:00 CET 2013) AND (date <= Fri Mar 15 01:00:00 CET 2013) is not valid; Parser error messages: [[statement, statementElement, selectStatement, queryExpression, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, concatenation, additiveExpression, multiplyExpression, unaryExpression, atom]: line 1:116 mismatched token: [@35,116:118='Feb',<75>,1:116]; expecting type RIGHT_PAREN].
> {code}
> The query works after removing the groupBy. It also partially works in remote mode (running in RemoteQueryDslConditionsTest) - the query is parsed, but still doesn't return the result as a Date object.
> 2.
> This query
> {code}
> Query q = qf.from(getModelFactory().getTransactionImplClass())
> .select(Expression.count("date"), Expression.min("date"))
> .having("description").eq("Hotel").toBuilder()
> .groupBy("id")
> .build();
> List<Object[]> list = q.list();
> {code}
> returns in the 2nd column the internal representation of the Date (i.e. 20130227000000000) instead of an object. Selecting only the minimum, select(Expression.min("date")), the query returns a Date object.
> Both queries are supposed to be run inside the QueryDslConditionsTest test class.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month