[ 
https://issues.apache.org/jira/browse/GEODE-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16112214#comment-16112214
 ] 

ASF GitHub Bot commented on GEODE-2886:
---------------------------------------

Github user ameybarve15 commented on a diff in the pull request:

    https://github.com/apache/geode/pull/609#discussion_r131056489
  
    --- Diff: 
geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/distributed/WaitUntilFlushedFunction.java
 ---
    @@ -85,8 +72,10 @@ public void execute(FunctionContext context) {
           }
     
         } else {
    -      throw new IllegalArgumentException(
    +      IllegalStateException illegalStateException = new 
IllegalStateException(
               "The AEQ does not exist for the index " + indexName + " region " 
+ region.getFullPath());
    +      logger.error(illegalStateException.getMessage());
    --- End diff --
    
    @jhuynh1 
    If we throw exception from WaitUntilFlushedFunction then executing side 
will not get a true or false.
    Unless we send the result explicitly using resultSender.lastResult(result);
    or other alternative is to send this exception using sendException() Api 
and executing side needs to handle this exception to return a boolean result 
for waitUntilFlushed.
    
    @upthewaterspout @dschneider-pivotal @bschuchardt - please correct me if I 
am wrong.


> 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)

Reply via email to