Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-12611

There are in doubt transactions that should be rolled back after communication failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • 7.0.0.GA, 7.1.0.ER3
    • Transactions
    • None
    • Hide

      git clone git@gitlab.mw.lab.eng.bos.redhat.com:istraka/tests-transactions-propagation.git -b 7.1.0.ER3-fail-at-exit-of-prepare

      set JAVA_HOME to jdk 1.8

      mvn clean test -fn -DfailIfNoTests=false -Dtest=FirstCallSecondTestcases#communicationFailPrepareTest -Dts.tx.impl=jta -Dts.eap1.version=7.1.0.ER3 -Dts.eap2.version=7.1.0.ER3 -Dts.eap3.version=7.1.0.ER3

      if you need to enable use -Dts.eap1.enable.debug (port 8787) or -Dts.eap2.enable.debug (port 8887)
      if you need to prevent testsuite from releasing resources such as DB use -Dts.release.resources=false

      Show
      git clone git@gitlab.mw.lab.eng.bos.redhat.com:istraka/tests-transactions-propagation.git -b 7.1.0.ER3-fail-at-exit-of-prepare set JAVA_HOME to jdk 1.8 mvn clean test -fn -DfailIfNoTests=false -Dtest=FirstCallSecondTestcases#communicationFailPrepareTest -Dts.tx.impl=jta -Dts.eap1.version=7.1.0.ER3 -Dts.eap2.version=7.1.0.ER3 -Dts.eap3.version=7.1.0.ER3 if you need to enable use -Dts.eap1.enable.debug (port 8787) or -Dts.eap2.enable.debug (port 8887) if you need to prevent testsuite from releasing resources such as DB use -Dts.release.resources=false

      We have two servers, one deployment on each.

      TX impl: jta

      there is remote outbound connection on the EAP 1 for EJB call from EAP1 to EAP2
      outbound connection points to socket proxy which is managable (communication can be stopped) and forward communication to EAP2 (location that should be used in remote outbound connection without socket proxy)

      Scenario:

      1. call servlet on EAP 1 which trigger EJB on the EAP 1
      2. EJB enlists dummy xa resource and writes to DB
      3. EJB call EJB on the EAP 2 via remote outbound connection
      4. EJB on the server 2 enlists dummy xa resource and writes to DB and return
      5. at the exit of the prepare phase in dummy xa resource on EAP 2 communication (socket proxy) is killed
      6. Transaction is supposed to be rolled back.

      However, we can see that there are prepared resources on the EAP 2 that have not been rolled back

      [INFO] Transaction
      		Xid:< formatId=131077, gtrid_length=29, bqual_length=37, tx_uid=0:ffff0a280499:6a6c4aa6:59885e66:12, node_name=0, branch_uid=0:ffff0a280499:6a6c4aa6:59885e66:27, subordinatenodename=1, eis_name=0 > 
      		Type:StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction/SubordinateAtomicAction/JCA 
      		ParentNodeName:0 
      		Participant:false 
      		CreationTime:Mon, 07 Aug 2017 14:35:11 +0200 
      		AgeInSeconds:128 
      		Id:0:ffff0a280499:-166fadbf:59885e75:10 
      		Participant
      			HeuristicValue:-1 
      			Status:PREPARED 
      			JndiName:java:/TestXAResource 
      			GlobalTransactionId:[B@4e1b1193 
      			HeuristicStatus:UNKNOWN 
      			NodeName:null 
      			Timeout:0 
      			FormatId:-1 
      			BranchQualifier:[B@39a95e4c 
      			Type:/StateManager/AbstractRecord/XAResourceRecord 
      			Participant:true 
      			EisProductVersion:EAP Test 
      			ClassName:com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord 
      			EisProductName:Crash Recovery Test 
      			Id:0:ffff0a280499:-166fadbf:59885e75:1a 
      		Participant
      			HeuristicValue:-1 
      			Status:PREPARED 
      			JndiName:java:jboss/eap2-ds-jndi 
      			GlobalTransactionId:[B@5c4ce097 
      			HeuristicStatus:UNKNOWN 
      			NodeName:null 
      			Timeout:0 
      			FormatId:-1 
      			BranchQualifier:[B@6945cfc7 
      			Type:/StateManager/AbstractRecord/XAResourceRecord 
      			Participant:true 
      			EisProductVersion:9.3.15 
      			ClassName:com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord 
      			EisProductName:PostgreSQL 
      			Id:0:ffff0a280499:-166fadbf:59885e75:22 
      [INFO] ..........................................................................................
      

      There is no evidence (eap1.server.log) that periodic recovery process is looking for in doubt transactions on the other server that could be rolled back.

        1. eap1.server.log
          205 kB
          Ivan Straka
        2. eap2.server.log
          208 kB
          Ivan Straka

              flaviarnn Flavia Rainone
              istraka@redhat.com Ivan Straka
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: