geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nabarun (JIRA)" <j...@apache.org>
Subject [jira] [Created] (GEODE-5521) After an exception is received from a remote server function execution, local threads should not send back result to client later
Date Fri, 03 Aug 2018 03:31:00 GMT
nabarun created GEODE-5521:
------------------------------

             Summary: After an exception is received from a remote server function execution,
local threads should not send back result to client later
                 Key: GEODE-5521
                 URL: https://issues.apache.org/jira/browse/GEODE-5521
             Project: Geode
          Issue Type: Bug
          Components: functions
            Reporter: nabarun


In the method cmdExecute()
if the local co-ordinator receives an FunctionException of type FunctionInvocationTargetException
or QueryInvocationTargetException from the remote server, setException is called which sets
the lastResultReceived flag. This flag prevents other results from other threads to be sent
to the client, as the client may have moved on. 
If there were any other function exception it will just send the exception but not set the
flag.


{code:java}
 if (cause instanceof FunctionInvocationTargetException
          || cause instanceof QueryInvocationTargetException) {
        if (cause instanceof InternalFunctionInvocationTargetException) {
          // Fix for #44709: User should not be aware of
          // InternalFunctionInvocationTargetException. No instance of
          // InternalFunctionInvocationTargetException is giving useful
          // information to user to take any corrective action hence logging
          // this at fine level logging
          // 1> When bucket is moved
          // 2> Incase of HA FucntionInvocationTargetException thrown. Since
          // it is HA, fucntion will be reexecuted on right node
          // 3> Multiple target nodes found for single hop operation
          // 4> in case of HA member departed
          if (logger.isDebugEnabled()) {
            logger.debug(LocalizedMessage.create(
                LocalizedStrings.ExecuteFunction_EXCEPTION_ON_SERVER_WHILE_EXECUTIONG_FUNCTION_0,
                new Object[] {function}), fe);
          }
        } else if (functionObject.isHA()) {
          logger.warn(LocalizedMessage.create(
              LocalizedStrings.ExecuteRegionFunction_EXCEPTION_ON_SERVER_WHILE_EXECUTIONG_FUNCTION_0,
              function + " :" + message));
        } else {
          logger.warn(LocalizedMessage.create(
              LocalizedStrings.ExecuteRegionFunction_EXCEPTION_ON_SERVER_WHILE_EXECUTIONG_FUNCTION_0,
              function), fe);
        }

        resultSender.setException(fe);
      } else {
        if(!resultSender.isLastResultReceived()){
          resultSender.setLastResultReceived(true);
          logger.warn(LocalizedMessage.create(
              LocalizedStrings.ExecuteRegionFunction_EXCEPTION_ON_SERVER_WHILE_EXECUTIONG_FUNCTION_0,
              function), fe);
          sendException(hasResult, clientMessage, message, serverConnection, fe);
        }
      }
{code}





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message