[
https://issues.apache.org/jira/browse/GEODE-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shelley Lynn Hughes-Godfrey updated GEODE-2943:
-----------------------------------------------
Affects Version/s: 1.2.0
> Invalid queryStrings cause lucene searches to hang in in PR with multiple
> nodes
> -------------------------------------------------------------------------------
>
> Key: GEODE-2943
> URL: https://issues.apache.org/jira/browse/GEODE-2943
> Project: Geode
> Issue Type: Bug
> Components: lucene
> Affects Versions: 1.2.0
> Reporter: Shelley Lynn Hughes-Godfrey
>
> Some invalid query strings might be "`*`" or " ".
> When used with a single node dataStore, we see the correct Exception returned:
> ```
> gfsh>search lucene --name=testIndex --region=/testRegion --queryStrings="*"
> --defaultField=__REGION_VALUE_FIELD
> Could not process command due to GemFire error. An error occurred while
> searching lucene index across the Geode cluster: Leading wildcard is not
> allowed: __REGION_VALUE_FIELD:*
> ```
> However, with multiple nodes, the query hangs.
> Jason debugged this a bit and found:
> ```
> the remote nodes fail in the function with this stack trace (where we will
> probably need to try/catch any lucene exception)
> [warning 2017/05/18 13:50:34.105 PDT server2 <Function Execution Processor1>
> tid=0x3c]
> org.apache.geode.cache.lucene.LuceneQueryException: Malformed lucene query:
> *asdf*
> at
> org.apache.geode.cache.lucene.internal.StringQueryProvider.getQuery(StringQueryProvider.java:79)
> at
> org.apache.geode.cache.lucene.internal.distributed.LuceneQueryFunction.getQuery(LuceneQueryFunction.java:160)
> at
> org.apache.geode.cache.lucene.internal.distributed.LuceneQueryFunction.execute(LuceneQueryFunction.java:87)
> at
> org.apache.geode.internal.cache.PartitionedRegionDataStore.executeOnDataStore(PartitionedRegionDataStore.java:2956)
> at
> org.apache.geode.internal.cache.partitioned.PartitionedRegionFunctionStreamingMessage.operateOnPartitionedRegion(PartitionedRegionFunctionStreamingMessage.java:98)
> at
> org.apache.geode.internal.cache.partitioned.PartitionMessage.process(PartitionMessage.java:339)
> at
> org.apache.geode.distributed.internal.DistributionMessage.scheduleAction(DistributionMessage.java:376)
> at
> org.apache.geode.distributed.internal.DistributionMessage$1.run(DistributionMessage.java:442)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at
> org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:625)
> at
> org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1071)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: LEADING_WILDCARD_NOT_ALLOWED: Leading wildcard is not allowed:
> field1:*asdf*
> at
> org.apache.lucene.queryparser.flexible.standard.processors.AllowLeadingWildcardProcessor.postProcessNode(AllowLeadingWildcardProcessor.java:79)
> at
> org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl.processIteration(QueryNodeProcessorImpl.java:98)
> at
> org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorImpl.process(QueryNodeProcessorImpl.java:89)
> at
> org.apache.lucene.queryparser.flexible.standard.processors.AllowLeadingWildcardProcessor.process(AllowLeadingWildcardProcessor.java:54)
> at
> org.apache.lucene.queryparser.flexible.core.processors.QueryNodeProcessorPipeline.process(QueryNodeProcessorPipeline.java:89)
> at
> org.apache.lucene.queryparser.flexible.core.QueryParserHelper.parse(QueryParserHelper.java:250)
> at
> org.apache.lucene.queryparser.flexible.standard.StandardQueryParser.parse(StandardQueryParser.java:159)
> at
> org.apache.geode.cache.lucene.internal.StringQueryProvider.getQuery(StringQueryProvider.java:73)
> ... 12 more
> ```
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)