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

Stanislav Lukyanov commented on IGNITE-7904:
--------------------------------------------

Summary of the changes:

- Changed IgniteUtils::cast not to trim exception chains as it used to. 
GridClosureException is still unwrapped, but other exceptions aren't.
- Added test to check that IgniteCompute::execute and ::executeAsync always 
throw the same exception as was thrown by the original code.
- Changed existing code to accommodate the new ::cast and ::execute behavior
-- Certain APIs that relied on getting specialized exceptions, such as 
CacheException or IgfsException, from compute calls now attempt to find the 
required exception down the chain themselves (instead of relying on compute to 
unwrap it for them).
-- Certain tests that relied on getting a specific exception are changed to 
search the exception chain (e.g. by changing GridTestUtils::assertThrows to 
::assertThrowsAnyCause).
-- Certain exception messages now contain their cause' message; this is to 
reduce compatibility impact of the new behavior when a code expects an 
exception containing a specific message; e.g. it was observed that REST calls 
return the top exception's message as an error description, so a REST client 
might be relying on having the old text; adding cause' message helps to smooth 
this a bit.

> ComputeTaskFuture.get() throws incorrect exception if ComputeTask.result() 
> throws IgniteException
> -------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-7904
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7904
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Stanislav Lukyanov
>            Assignee: Stanislav Lukyanov
>            Priority: Major
>
> ComputeTask.result() javadoc says: "Throws: IgniteException - If handling a 
> job result caused an error effectively rejecting a failover. This exception 
> will be thrown out of ComputeTaskFuture.get() method."
> However, GridFutureAdapter calls IgniteUtils.cast(Throwable) on the exception 
> before throwing it from get(), and the latter method trims the stack trace to 
> the first occurence of an IgniteCheckedException. Because of that, get() 
> throws not the IgniteException thrown from the ComputeTask.result() but one 
> of its causes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to