ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandr Kuramshin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4767) rollback exception hides the origin exception (e.g. commit)
Date Wed, 26 Jul 2017 12:20:01 GMT

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

Alexandr Kuramshin commented on IGNITE-4767:
--------------------------------------------

Hi, [~dpavlov],

Suppressed exceptions will be automatically logged when stack trace is printed. Actually we
should not worry about it.

I've found only this TC run in history, related to the 1599 PR
http://195.239.208.174/viewType.html?buildTypeId=IgniteTests_IgniteCache3&tab=buildTypeStatusDiv&branch_IgniteTests=pull%2F1599%2Fhead

Testing was done 2 months ago after merging with the master, I think Ignite20Tests was not
present at that time.

> 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)

Mime
View raw message