You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ud...@apache.org on 2018/03/30 23:51:40 UTC

[geode] 03/05: Cosmetic

This is an automated email from the ASF dual-hosted git repository.

udo pushed a commit to branch feature/GEODE-3926_3
in repository https://gitbox.apache.org/repos/asf/geode.git

commit b9d36b18341621e08c9b3fb6e675a39592c313eb
Author: Udo Kohlmeyer <uk...@pivotal.io>
AuthorDate: Thu Mar 29 15:32:04 2018 -0700

    Cosmetic
---
 .../internal/PartitionedRepositoryManager.java     | 29 +++++++++++-----------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManager.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManager.java
index 92b4c08..092b332 100755
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManager.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/PartitionedRepositoryManager.java
@@ -88,20 +88,21 @@ public class PartitionedRepositoryManager implements RepositoryManager {
         throw new BucketNotFoundException(
             "User bucket was not found for region " + region + "bucket id " + bucketId);
       } else {
-        if (index.isIndexAvailable(userBucket.getId())) {
-          repos.add(getRepository(userBucket.getId()));
-        } else {
-          waitingThreadPoolFromDM.execute(() -> {
-            try {
-              IndexRepository repository = getRepository(userBucket.getId());
-              repos.add(repository);
-            } catch (BucketNotFoundException e) {
-              logger.debug(
-                  "Lucene Index creation in progress. Catching BucketNotFoundException");
-            }
-          });
-          throw new LuceneIndexCreationInProgressException(
-              "Lucene Index creation in progress for bucket: " + userBucket.getId());
+        if (LuceneServiceImpl.LUCENE_REINDEX) {
+          if (index.isIndexAvailable(userBucket.getId())) {
+            repos.add(getRepository(userBucket.getId()));
+          } else {
+            waitingThreadPoolFromDM.execute(() -> {
+              try {
+                IndexRepository repository = getRepository(userBucket.getId());
+                repos.add(repository);
+              } catch (BucketNotFoundException e) {
+                logger.debug("Lucene Index creation in progress. Catching BucketNotFoundException");
+              }
+            });
+            throw new LuceneIndexCreationInProgressException(
+                "Lucene Index creation in progress for bucket: " + userBucket.getId());
+          }
         }
       }
     }

-- 
To stop receiving notification emails like this one, please contact
udo@apache.org.