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

    https://github.com/apache/geode/pull/609#discussion_r131433628
  
    --- 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 --
    
    I think it would be better here to just throw the IllegalStateException. 
That makes it clear that we intend the exception to propagate back to the 
caller.
    
    Based on what I've seen from my testing, calling 
resultSender.lastResult(new IllegalStateException()) will behave the same as 
throwing the exception: on the remote side ResultCollector.getResult throws an 
exception. However, I think that is kind of weird, whereas it makes sense that 
if you throw an exception in the function it will propagate back as an 
exception on the remote side. 


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

Reply via email to