[JBoss JIRA] (ISPN-5561) Problem in dealing with the HQL queries that contain string comparison operations, when it involves empty string as an operand
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/ISPN-5561?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on ISPN-5561:
-----------------------------------------------
Matej Čimbora <mcimbora(a)redhat.com> changed the Status of [bug 1238866|https://bugzilla.redhat.com/show_bug.cgi?id=1238866] from ON_QA to ASSIGNED
> Problem in dealing with the HQL queries that contain string comparison operations, when it involves empty string as an operand
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-5561
> URL: https://issues.jboss.org/browse/ISPN-5561
> Project: Infinispan
> Issue Type: Bug
> Components: Embedded Querying, Remote Querying
> Affects Versions: 7.2.0.Final
> Environment: Infinispan version: Infinispan 7.2.0-Final
> Operating System: Linux
> Compatibility mode is enabled.
> Indexing is enabled and 'autoconfig' parameter is set to true.
> Reporter: Pavan Kundgol
> Assignee: Adrian Nistor
> Fix For: 8.0.0.Beta2, 7.2.4.Final, 8.0.0.Final
>
>
> When a HQL query that involves string comparison operation with the empty string matching is executed through hot rod client(java), it is resulting in the following error,
> org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for message id[7] returned server error (status=0x85): org.hibernate.search.exception.EmptyQueryException: HSEARCH000146: The query string '' applied on field 'CITY' has no meaningful tokens to be matched. Validate the query input against the Analyzer applied on this field.
> The same problem may also occur when the string matching operation involves a string containing certain special keywords(hibernate search stop words), as operands.
> The problem seems to be assosiated with the the 'hibernate-hql-lucene' parser used by the 'infinispan-remote-query-server' module. The problem here is that the hibernate-hql-lucene parser is translating comparison operations directly into lucene keyword matching operations, irrespective of the field type, though the phrase matching is more appropriate for string fields. This leads to invalid query formation when the field in concern is of type string, and is matched against an empty string(or a string containing one or more hibernate search stop words).
> For example,
> the where condition city='' present in the following HQL query
> select name from com.test.User where city=''
> is tralated to lucene query, the hql-lucene parser is currently translating to
> queryBuilder.keyword().onField("city").matching("").createQuery()
> whereas recommended one is
> queryBuilder.phrase().onField("city").sentence("").createQuery()
> In the former way of translation, Hibernate Search query execution fails due to its usage of standard analyzer while executing the query. Hence, the problem can also be avoided by disabling the standard analyzer while executing the query.
> queryBuilder.keyword().onField("city").ignoreAnalyzer().matching("").createQuery()
> Preferred solution may be to enhance the 'hibernate-hql-lucene' library to do type specific translations, and to specifically translate the string comparison operations of hql query into phrase matching operations of lucene query(instead of keyword matching operations).
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5601) Merge ExtendedModuleCommandFactory into ModuleCommandFactory
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5601?page=com.atlassian.jira.plugin.... ]
William Burns reopened ISPN-5601:
---------------------------------
Have to revert part of this to keep binary backwards compatibility with ISPN 7.
> Merge ExtendedModuleCommandFactory into ModuleCommandFactory
> ------------------------------------------------------------
>
> Key: ISPN-5601
> URL: https://issues.jboss.org/browse/ISPN-5601
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 8.0.0.Alpha2
> Reporter: Radim Vansa
> Assignee: Ryan Emerson
> Fix For: 8.0.0.Beta3
>
>
> These are the docs for ExtendedModuleCommandFactory:
> {quote}
> Temporary workaround to avoid modifying ModuleCommandFactory interface. This interface should be merged with ModuleCommandFactory in 6.0.
> {quote}
> Seems that was forgotten in 6.0, 8.0 can fix that.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5605) Implement getAffectedKeys() in InvalidateCommand
by Pedro Ruivo (JIRA)
[ https://issues.jboss.org/browse/ISPN-5605?page=com.atlassian.jira.plugin.... ]
Pedro Ruivo updated ISPN-5605:
------------------------------
Status: Resolved (was: Pull Request Sent)
Assignee: Radim Vansa
Fix Version/s: 8.0.0.Beta3
8.0.0.Final
Resolution: Done
> Implement getAffectedKeys() in InvalidateCommand
> ------------------------------------------------
>
> Key: ISPN-5605
> URL: https://issues.jboss.org/browse/ISPN-5605
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 8.0.0.Alpha2
> Reporter: Radim Vansa
> Assignee: Radim Vansa
> Priority: Minor
> Fix For: 8.0.0.Beta3, 8.0.0.Final
>
>
> InvalidateCommand overloads {{getKey()}} throwing {{UnsupportedOperationException}}, but {{getAffectedKeys()}} returns collection with {{null}} or one of the invalidated keys.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5379) Persistence with stringKeyedJdbcStore throwing ConcurrentModificationException while adding data to cache
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5379?page=com.atlassian.jira.plugin.... ]
William Burns commented on ISPN-5379:
-------------------------------------
[~dan.berindei] posted https://github.com/infinispan/infinispan/pull/3625#issuecomment-128294561 In that case we might as well just close this and wait for another bug report :)
> Persistence with stringKeyedJdbcStore throwing ConcurrentModificationException while adding data to cache
> ----------------------------------------------------------------------------------------------------------
>
> Key: ISPN-5379
> URL: https://issues.jboss.org/browse/ISPN-5379
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Loaders and Stores
> Affects Versions: 6.0.2.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 8.0.0.Beta3
>
>
> From Dennis Reed:
> A ConcurrentModificationException in the CacheWriter interceptor during a commit.
> java.util.ConcurrentModificationException
> at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
> at java.util.LinkedList$ListItr.next(LinkedList.java:886)
> at org.infinispan.interceptors.CacheWriterInterceptor.store(CacheWriterInterceptor.java:210)
> at org.infinispan.interceptors.CacheWriterInterceptor.commitCommand(CacheWriterInterceptor.java:115)
> The code is looping through the modifications associated with the transaction:
> List<WriteCommand> modifications = ctx.getCacheTransaction().getAllModifications();
> ...
> 210: for (WriteCommand cacheCommand : modifications) {
> The transaction's modification list is stored as a synchronized list with a comment "we need to synchronize this collection to be able to get a valid snapshot from another thread during state transfer".
> But this thread is not doing state transfer, and I'd assume "get a valid snapshot" wouldn't include modification?
> Is it valid for this list to be modified from another thread (in which case all iterations should be synchronized), or is something modifying it incorrectly?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months
[JBoss JIRA] (ISPN-5379) Persistence with stringKeyedJdbcStore throwing ConcurrentModificationException while adding data to cache
by William Burns (JIRA)
[ https://issues.jboss.org/browse/ISPN-5379?page=com.atlassian.jira.plugin.... ]
William Burns resolved ISPN-5379.
---------------------------------
Fix Version/s: 8.0.0.Beta3
(was: 8.0.0.Final)
Resolution: Done
> Persistence with stringKeyedJdbcStore throwing ConcurrentModificationException while adding data to cache
> ----------------------------------------------------------------------------------------------------------
>
> Key: ISPN-5379
> URL: https://issues.jboss.org/browse/ISPN-5379
> Project: Infinispan
> Issue Type: Bug
> Components: Core, Loaders and Stores
> Affects Versions: 6.0.2.Final
> Reporter: Dan Berindei
> Assignee: Dan Berindei
> Fix For: 8.0.0.Beta3
>
>
> From Dennis Reed:
> A ConcurrentModificationException in the CacheWriter interceptor during a commit.
> java.util.ConcurrentModificationException
> at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
> at java.util.LinkedList$ListItr.next(LinkedList.java:886)
> at org.infinispan.interceptors.CacheWriterInterceptor.store(CacheWriterInterceptor.java:210)
> at org.infinispan.interceptors.CacheWriterInterceptor.commitCommand(CacheWriterInterceptor.java:115)
> The code is looping through the modifications associated with the transaction:
> List<WriteCommand> modifications = ctx.getCacheTransaction().getAllModifications();
> ...
> 210: for (WriteCommand cacheCommand : modifications) {
> The transaction's modification list is stored as a synchronized list with a comment "we need to synchronize this collection to be able to get a valid snapshot from another thread during state transfer".
> But this thread is not doing state transfer, and I'd assume "get a valid snapshot" wouldn't include modification?
> Is it valid for this list to be modified from another thread (in which case all iterations should be synchronized), or is something modifying it incorrectly?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 8 months