geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nabarunnag <...@git.apache.org>
Subject [GitHub] geode pull request #451: GEODE-2768: Lucene Queries executed before index is...
Date Wed, 12 Apr 2017 22:14:36 GMT
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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message