Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-5521

After an exception is received from a remote server function execution, local threads should not send back result to client later

    XMLWordPrintableJSON

Details

    Description

      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.

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

      Attachments

        Issue Links

          Activity

            People

              nnag Nabarun Nag
              nnag Nabarun Nag
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m