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

Dmitriy Pavlov commented on IGNITE-4767:
----------------------------------------

Hi, [~ein],

I've checked the change and it seems to be OK.
In the same time e.getSuppressed() is never called. Is it indended to be logged 
into apache log throught printStackTrace. Is suppressed exception logged 
automatically or any additional change is required?

One more question, could you please share the link to TC run? Was it in 
Ignite20Tests?


> rollback exception hides the origin exception (e.g. commit)
> -----------------------------------------------------------
>
>                 Key: IGNITE-4767
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4767
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache, general
>    Affects Versions: 1.8
>            Reporter: Alexandr Kuramshin
>            Assignee: Alexey Goncharuk
>             Fix For: 2.2
>
>
> There is too much code places like:
> {noformat}
> try {
>       return txFuture.get();
> }
> catch (IgniteCheckedException e) {
>       tx.rollbackAsync();
>       throw e;
> }
> {noformat}
> where an error upon rollback hides the actual exception {{e}}.
> This should be implemented in the way like try-with-resources does:
> {noformat}
> try {
>       return txFuture.get();
> }
> catch (IgniteCheckedException e1) {
>       try {
>               tx.rollbackAsync();
>       }
>       catch (Throwable inner) {
>               e.addSuppressed(inner);
>       }
>       throw e;
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to