[ 
https://issues.apache.org/jira/browse/GEODE-9591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17427709#comment-17427709
 ] 

ASF subversion and git services commented on GEODE-9591:
--------------------------------------------------------

Commit fafa3be8f361bf696b0804f569b890826e242c7f in geode-native's branch 
refs/heads/develop from Jakov Varenina
[ https://gitbox.apache.org/repos/asf?p=geode-native.git;h=fafa3be ]

GEODE-9591: Don't retry function when Function.isHA=false (#866)

* GEODE-9591: Don't retry function when Function.isHA=false

Fault:
Client clears result by calling ResultCollector::clearResult and
re-executes the function even thought Function.isHa() is set to false.

Fix:
Client will not clear result and retry the function, but it will fail with the
received exception from server.

Added integration test:
1.FunctionExecutionTest.testThatFunctionExecutionThrowsExceptionNonHAWithFilter
2.FunctionExecutionTest.testThatFunctionExecutionThrowsExceptionNonHA

The integration test reproduces the problem in a following way:

1. Populate region so that all buckets are created
2. Shutdown one of the three available servers
3. Peforme rebalance operation, so that buckets are recovered on running
servers
4. Execute the function. Function execution will fail with the
InternalFunctionInvocationTargetException exception, because client will
try to execute single hop function with old PR meatada information (PR
metadata received before the rebalance operation).

* ASSERT_THROW used instead of try-catch

* Check whether isHA==false before clearing results

It is possible that function exeuction fail on multiple servers, and in
that case only first exception will be thrown, and any subsequent
exeception will be ignored. Additionally result should not be cleared in
any case when isHa==false.

* Rebalance cmd was not executed

Test cases are changed to do rebalance operation
after new server is introduced in cluster.

* Client metadata wasn't complete when function is executed

Since client metadata was not complete the function was not exectued in
a single hop manner, and therfore exeption is not reproduced.

This commit is fixed in a way that now client is connected to only
one server. This way client metadata will be updated more frequently,
and client metadata will be complete when function is executed.

> Native client re-execute function even Function.isHA() is set to false and 
> redundancy in not used on partition region
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-9591
>                 URL: https://issues.apache.org/jira/browse/GEODE-9591
>             Project: Geode
>          Issue Type: Bug
>          Components: native client
>            Reporter: Jakov Varenina
>            Assignee: Jakov Varenina
>            Priority: Major
>              Labels: pull-request-available
>
> This behavior of native client should be aligned with java client. Java 
> client in this case doesn't re-execute the function, but it trows the 
> exception that received 
> from the server.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to