geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gesterzhou <>
Subject [GitHub] geode pull request #451: GEODE-2768: Lucene Queries executed before index is...
Date Wed, 12 Apr 2017 21:09:41 GMT
Github user gesterzhou commented on a diff in the pull request:
    --- Diff: geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/
    @@ -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
    +          // 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 --
    Is sleep 100 ms enough? How about using a 10 seconds timeout, but check if it's ready
every 100ms?

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 or file a JIRA ticket
with INFRA.

View raw message