[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 updated ISPN-5787:
-------------------------------
Description:
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.
was:
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.
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.
> 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)
8 years, 7 months
[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 updated ISPN-5787:
-------------------------------
Description:
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.
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.
was:
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.
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 numeric 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.
> 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.
> 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)
8 years, 7 months
[JBoss JIRA] (ISPN-4810) Local Transactional Cache loses data when eviction is enabled and there are multiple readers and one writer
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-4810?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-4810:
-----------------------------------------------
Richard Janík <rjanik(a)redhat.com> changed the Status of [bug 1202354|https://bugzilla.redhat.com/show_bug.cgi?id=1202354] from ON_QA to VERIFIED
> Local Transactional Cache loses data when eviction is enabled and there are multiple readers and one writer
> -----------------------------------------------------------------------------------------------------------
>
> Key: ISPN-4810
> URL: https://issues.jboss.org/browse/ISPN-4810
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 6.0.2.Final
> Environment: Windows 7 x64 (NTFS)
> Oracle JDK1.7.0_40
> Apache Maven 3.0.5
> Reporter: Horia Chiorean
> Assignee: William Burns
> Labels: modeshape
> Fix For: 7.2.0.Beta1, 5.2.12.Final, 5.2.13.Final
>
> Attachments: ispn_concurrent.zip
>
>
> Using Infinispan 6.0.2 and a local, transactional cache backed by a <singleFile> store, with eviction enabled and a small {{max-entries}} setting, we have the following scenario:
> * the main thread (i.e. the "writer") starts a transaction, adds a batch of strings into the cache and also appends the same strings into a List cache entry and then commits the transaction
> * after the above has finished (i.e. after tx.commit) it fires a number of reader threads where each reader thread
> ** checks that the string entries were added into the cache and
> ** checks that the entries were correctly appended to the List entry
> * the above steps are repeated a number of times
> On any given run, based on timing, we're seeing that at some point (after some time) some of the reader threads will not see the latest version of the List entry (i.e. will not see the latest elements that were added into the list) but rather an old, stale List (sort of a "lost update" scenario).
> If we either:
> * disable eviction or
> * set the {{max-entries}} to a large enough value (which I suspect has the same effect - not evicting anything) the problem doesn't show up.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (ISPN-3797) DataContainer should interact atomically with Persistence
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-3797?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-3797:
-----------------------------------------------
Richard Janík <rjanik(a)redhat.com> changed the Status of [bug 1202354|https://bugzilla.redhat.com/show_bug.cgi?id=1202354] from ON_QA to VERIFIED
> DataContainer should interact atomically with Persistence
> ---------------------------------------------------------
>
> Key: ISPN-3797
> URL: https://issues.jboss.org/browse/ISPN-3797
> Project: Infinispan
> Issue Type: Enhancement
> Components: Eviction, Loaders and Stores
> Affects Versions: 6.0.0.Final, 5.2.10.Final
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Fix For: 7.0.0.Alpha3, 7.0.0.Final, 5.2.11.Final
>
>
> DataContainer should handle atomically all the interactions with the Persistence. This includes all the eviction/passivation.
> Main points:
> * In DataContainer load/store will avoid any lose of data during concurrent operations
> * Take advantage of CHMv8
> * CacheLoader and Writer Interceptors are no longer needed.
> Check the mailling list for more info.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (ISPN-5756) Improve EmbeddedCacheManager.removeCache() method
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-5756?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-5756:
----------------------------------
Fix Version/s: 8.1.0.Alpha2
(was: 8.1.0.Alpha1)
> Improve EmbeddedCacheManager.removeCache() method
> -------------------------------------------------
>
> Key: ISPN-5756
> URL: https://issues.jboss.org/browse/ISPN-5756
> Project: Infinispan
> Issue Type: Enhancement
> Components: Core
> Affects Versions: 8.0.1.Final
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Fix For: 8.1.0.Alpha2
>
>
> We have the following issues with the method
> 1) It is not consistent in all the nodes
> 2) Removing the cache remotely and locally can be done in parallel
> 3) When passivation is enabled, it passivates the entries and then clear the cache store.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (ISPN-5752) PutMapCommand notifies the modification listener for created entries
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-5752?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-5752:
----------------------------------
Fix Version/s: 8.1.0.Alpha2
(was: 8.1.0.Alpha1)
> PutMapCommand notifies the modification listener for created entries
> --------------------------------------------------------------------
>
> Key: ISPN-5752
> URL: https://issues.jboss.org/browse/ISPN-5752
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 8.0.1.Final
> Reporter: Dan Berindei
> Fix For: 8.1.0.Alpha2
>
>
> When a {{PutMapCommand}} creates an entry, it notifies both the {{@CacheEntryCreated}} and the {{@CacheEntryModified}} listeners. The same happens if the entry is modified, but it was evicted from the data container.
> Ideally, {{CacheLoaderInterceptor}} should know whether there are creation/modification listeners attached, and read the previous value when necessary to invoke the proper listener.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months