You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Valentin Kulichenko (JIRA)" <ji...@apache.org> on 2016/08/10 22:01:20 UTC
[jira] [Closed] (IGNITE-1151) Cache operations can throw
ClusterTopologyException without wrapping it into CacheException
[ https://issues.apache.org/jira/browse/IGNITE-1151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Valentin Kulichenko closed IGNITE-1151.
---------------------------------------
> Cache operations can throw ClusterTopologyException without wrapping it into CacheException
> -------------------------------------------------------------------------------------------
>
> Key: IGNITE-1151
> URL: https://issues.apache.org/jira/browse/IGNITE-1151
> Project: Ignite
> Issue Type: Bug
> Components: cache
> Affects Versions: 1.1.4
> Reporter: Valentin Kulichenko
> Assignee: Valentin Kulichenko
> Labels: Usability
>
> This was reported by one of our users who was testing cache transactions and other operation with changing topology. He claims that he had to catch {{ClusterTopologyException}} directly in some cases, so he had to write the code like this:
> {code}
> try (final Transaction tx = txn.txStart()) {
> ...
> }
> catch (final CacheException e) {
> if (!(e.getCause() instanceof ClusterTopologyException)) {
> throw e;
> }
> // retry
> failure = e;
> }
> catch (final ClusterTopologyException e) {
> // retry
> failure = e;
> }
> {code}
> Cache operations should throw only {{CacheException}}. Need to revisit exception handling logic.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)