You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/08/07 19:50:00 UTC
[jira] [Commented] (GEODE-5521) After an exception is received from
a remote server function execution, local threads should not send back
result to client later
[ https://issues.apache.org/jira/browse/GEODE-5521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16572222#comment-16572222 ]
ASF subversion and git services commented on GEODE-5521:
--------------------------------------------------------
Commit 82ac395f6c88adfc6e2f2c71ef396b154c9e08e6 in geode's branch refs/heads/develop from [~nabarunnag]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=82ac395 ]
GEODE-5521: lastResultReceived flag set (#2255)
* When an exception is received lastResultReceived flag is set.
* Previously this flag is only set if exception is of type QueryInvocationTargetException or FunctionInvocationTargetException
* Setting this flag will prevent other threads from sending results to the client after the exception is sent.
> 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
> Assignee: nabarun
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.7.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> 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)