You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Dionysis Stavropoulos (JIRA)" <ji...@apache.org> on 2018/11/19 16:11:00 UTC
[jira] [Created] (IGNITE-10334) XAException not causing a rollback
exception to propagate to application server
Dionysis Stavropoulos created IGNITE-10334:
----------------------------------------------
Summary: XAException not causing a rollback exception to propagate to application server
Key: IGNITE-10334
URL: https://issues.apache.org/jira/browse/IGNITE-10334
Project: Ignite
Issue Type: Bug
Components: cache, cassandra
Affects Versions: 2.6, 2.5, 2.4, 2.3
Environment: Thorntail: 2.2.0.Final
Apache Ignite 2.6
Cassandra driver 3.0.0
Reporter: Dionysis Stavropoulos
Attachments: ignite-config.xml, log.txt
When trying to put a null value in the POJO key of a cached object, although the error that is in the attached log occurs the exception is not propagated to the application server (thorntail) and transaction's state is marked as committed.
We can see that in org.apache.ignite.internal.processors.cache.jta.CacheJtaResource.java - line 164, if an error occur in the commit() method an XAException is thrown(correctly) but with errorCode=0 (which as we understand means that the transaction was committed and that's why no rollback is propagated to the transaction manager).
See commit method below:
@Override public void commit(Xid xid, boolean onePhase) throws XAException {
assert this.xid.equals(xid);
if (log.isDebugEnabled())
log.debug("XA resource commit(...) [xid=" + xid + ", onePhase=" + onePhase + "]");
try {
ctx.cache().context().commitTxAsync(cacheTx).get();<<< if error occur
}
catch (IgniteCheckedException e) {
throwException("Failed to commit cache transaction: " + e.getMessage(), e);
}
}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)