[
https://issues.apache.org/jira/browse/GEODE-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16095078#comment-16095078
]
ASF GitHub Bot commented on GEODE-2886:
---------------------------------------
Github user jhuynh1 commented on a diff in the pull request:
https://github.com/apache/geode/pull/609#discussion_r128584677
--- Diff:
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
---
@@ -472,12 +478,20 @@ public boolean waitUntilFlushed(String indexName,
String regionPath, long timeou
new WaitUntilFlushedFunctionContext(indexName, timeout, unit);
Execution execution = FunctionService.onRegion(dataRegion);
ResultCollector rs =
execution.setArguments(context).execute(WaitUntilFlushedFunction.ID);
- List<Boolean> results = (List<Boolean>) rs.getResult();
- for (Boolean oneResult : results) {
- if (oneResult == false) {
+ List<Object> results = (List<Object>) rs.getResult();
+ if (results != null) {
+ if (results.get(0) instanceof IllegalStateException) {
--- End diff --
Instead of checking types and silently handling this exception, it's
probably better to just throw it and not have to modify this portion of code.
> The WaitUntilFlushedFunction throws an IllegalArgumentException instead of an
> IllegalStateException
> ---------------------------------------------------------------------------------------------------
>
> Key: GEODE-2886
> URL: https://issues.apache.org/jira/browse/GEODE-2886
> Project: Geode
> Issue Type: Bug
> Components: lucene
> Reporter: Barry Oglesby
> Assignee: Amey Barve
>
> When the AEQ doesn't exist, the WaitUntilFlushedFunction throws an
> IllegalArgumentException like:
> {noformat}
> Caused by: java.lang.IllegalArgumentException: The AEQ does not exist for the
> index xxx region /yyy
> at
> org.apache.geode.cache.lucene.internal.distributed.WaitUntilFlushedFunction.execute(WaitUntilFlushedFunction.java:89)
> at
> org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:333)
> {noformat}
> The arguments are actually fine so should it instead throw an
> IllegalStateException?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)