ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Valentin Kulichenko (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-1151) Cache operations can throw ClusterTopologyException without wrapping it into CacheException
Date Thu, 23 Jul 2015 18:05:04 GMT
Valentin Kulichenko created IGNITE-1151:
-------------------------------------------

             Summary: 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


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)

Mime
View raw message