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 2017/08/21 21:08:43 UTC
[26/51] [abbrv] geode git commit: GEODE-2886:Logged the
IllegalStateException inside WaitUntilFlushedFunction and returned the result
as false.
GEODE-2886:Logged the IllegalStateException inside
WaitUntilFlushedFunction and returned the result as false.
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/a1c3fc76
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/a1c3fc76
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/a1c3fc76
Branch: refs/heads/feature/GEODE-3416
Commit: a1c3fc7660af757e0efbb2fe4f9911e4c81dbffc
Parents: 40185e8
Author: Amey Barve <ab...@apache.org>
Authored: Wed Aug 2 18:29:47 2017 +0530
Committer: Amey Barve <ab...@apache.org>
Committed: Thu Aug 17 15:47:30 2017 +0530
----------------------------------------------------------------------
.../cache/lucene/internal/LuceneServiceImpl.java | 16 ++++------------
.../distributed/WaitUntilFlushedFunction.java | 6 ++++--
2 files changed, 8 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/a1c3fc76/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
index 7280d66..1b125ed 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
@@ -479,20 +479,12 @@ public class LuceneServiceImpl implements InternalLuceneService {
new WaitUntilFlushedFunctionContext(indexName, timeout, unit);
Execution execution = FunctionService.onRegion(dataRegion);
ResultCollector rs = execution.setArguments(context).execute(WaitUntilFlushedFunction.ID);
- List<Object> results = (List<Object>) rs.getResult();
- if (results != null) {
- if (results.get(0) instanceof IllegalStateException) {
+ List<Boolean> results = (List<Boolean>) rs.getResult();
+ for (Boolean oneResult : results) {
+ if (oneResult == false) {
return false;
- } else {
- for (Object oneResult : results) {
- if ((boolean) oneResult == false) {
- return false;
- }
- }
- return true;
}
- } else {
- return false;
}
+ return true;
}
}
http://git-wip-us.apache.org/repos/asf/geode/blob/a1c3fc76/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java
index 0fecc41..ca77873 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java
@@ -61,8 +61,10 @@ public class WaitUntilFlushedFunction implements Function, InternalEntity {
}
} else {
- resultSender.sendException(new IllegalStateException(
- "The AEQ does not exist for the index " + indexName + " region " + region.getFullPath()));
+ IllegalStateException illegalStateException = new IllegalStateException(
+ "The AEQ does not exist for the index " + indexName + " region " + region.getFullPath());
+ logger.error(illegalStateException.getMessage());
+ resultSender.lastResult(result);
}
resultSender.lastResult(result);
}