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 2016/08/17 21:36:20 UTC
[jira] [Commented] (GEODE-1776) ExecuteRegionFunctionOp fails to
read all data off the wire when an exception is sent with sendResult
[ https://issues.apache.org/jira/browse/GEODE-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15425429#comment-15425429 ]
ASF subversion and git services commented on GEODE-1776:
--------------------------------------------------------
Commit a5daa924a5921fbe6fac4bd5f5b88c9bd3678c8d in incubator-geode's branch refs/heads/develop from [~upthewaterspout]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=a5daa92 ]
GEODE-1776: Always read all of the results in ExecuteRegionFunctionOp
Read all of the results from the wire in
ExecuteRegionFunctionOp.processResponse, even if we read an exception as
one of the responses. This ensures that all data is read off the wire.
> ExecuteRegionFunctionOp fails to read all data off the wire when an exception is sent with sendResult
> -----------------------------------------------------------------------------------------------------
>
> Key: GEODE-1776
> URL: https://issues.apache.org/jira/browse/GEODE-1776
> Project: Geode
> Issue Type: Bug
> Components: functions
> Reporter: Dan Smith
> Assignee: Dan Smith
>
> Executing the below code on a client will result in the function service not reading all of the data off the wire. The next message sent will receive serialization errors.
> {code}
> ResultCollector rc = getExecution().execute((context) -> {
> context.getResultSender().sendResult(new FunctionException());
> context.getResultSender().lastResult("done");
> });
> final Object result = rc.getResult();
> {code}
> It looks like what is happening is that inside ExecuteRegionFunctionOp.processResponse, there is special handling to read multiple chunks until all of the results are received. Unfortunately, certain code paths like the one above with multiple results end up throwing an exception instead of reading all of the chunks.
> Here's the relevant bits of code:
> {code}
> // Read the chunk
> do {
> //...
> if (result instanceof FunctionException) {
> //...
> //This will end the loop without reading the remaining data
> throw ex;
> }
> //...
> } while (!executeFunctionResponseMsg.isLastChunk());
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)