Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.3, 2.4, 2.5, 2.6
-
None
-
Thorntail: 2.2.0.Final
Apache Ignite 2.6
Cassandra driver 3.0.0
-
Docs Required
Description
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); }}