[ https://issues.apache.org/jira/browse/GEODE-2768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15966732#comment-15966732
]
ASF GitHub Bot commented on GEODE-2768:
---------------------------------------
Github user nabarunnag commented on a diff in the pull request:
https://github.com/apache/geode/pull/451#discussion_r111272945
--- Diff: geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/LuceneQueryFunction.java
---
@@ -132,6 +133,25 @@ private LuceneIndexImpl getLuceneIndex(final Region region,
try {
index =
(LuceneIndexImpl) service.getIndex(searchContext.getIndexName(), region.getFullPath());
+ if (index == null && service instanceof LuceneServiceImpl) {
+ if (((LuceneServiceImpl) service).getDefinedIndex(searchContext.getIndexName(),
+ region.getFullPath()) != null) {
+ // The node may be in the process of recovering, where we have the index defined
but yet
+ // to be recovered
+ // If we retry fast enough, we could get a stack overflow based on the way
function
+ // execution is currently written
+ // Instead we will add an artificial sleep to slow down the retry at this point
+ // Hopefully in the future, the function execution would retry without adding
to the stack
+ // and this can be removed
+ try {
--- End diff --
Can there be a possibility that this node never recovers but another node is ready to
execute the query and we are stuck here for 10 seconds?
> Lucene Queries executed before index is fully created should be retried
> -----------------------------------------------------------------------
>
> Key: GEODE-2768
> URL: https://issues.apache.org/jira/browse/GEODE-2768
> Project: Geode
> Issue Type: Bug
> Components: lucene
> Reporter: Jason Huynh
> Assignee: Jason Huynh
>
> With the feature to destroy a Lucene Index, parts of the querying function were changed
to handle the event where we execute a query on an index that is no longer present. However,
the scenario where we execute a query on an index that is defined but has not been created
can also arise.
> We want to handle the case where we have defined the index, but have yet to create it
due to a brief window in restart.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
|