Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-10334

XAException not causing a rollback exception to propagate to application server

    XMLWordPrintableJSON

Details

    • 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); }

      }

      Attachments

        1. log.txt
          17 kB
          Dionysis Stavropoulos
        2. ignite-config.xml
          6 kB
          Dionysis Stavropoulos

        Activity

          People

            Unassigned Unassigned
            stavropd Dionysis Stavropoulos
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: