geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Smith (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GEODE-1776) ExecuteRegionFunctionOp fails to read all data off the wire when an exception is sent with sendResult
Date Wed, 17 Aug 2016 21:40:22 GMT

     [ https://issues.apache.org/jira/browse/GEODE-1776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dan Smith resolved GEODE-1776.
------------------------------
       Resolution: Fixed
    Fix Version/s: 1.0.0-incubating

> 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
>             Fix For: 1.0.0-incubating
>
>
> 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)

Mime
View raw message