Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-20026

Delayed transaction visibility in LRA coordinator after server restart

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 35.0.0.Final
    • 34.0.1.Final
    • Transactions
    • None
    • Hide

      Steps to reproduce:

      Start the server by:

      sh standalone.sh -c standalone-microprofile.xml
      

      Connect throught jboss-cli.sh and enable MP LRA:

      /extension=org.wildfly.extension.microprofile.lra-coordinator:add
      /extension=org.wildfly.extension.microprofile.lra-participant:add
      /subsystem=microprofile-lra-coordinator:add
      /subsystem=microprofile-lra-participant:add
      reload
      

      Unzip, build project in attached microprofile-lra.zip and deploy to server:

      unzip microprofile-lra.zip
      cd microprofile-lra
      mvn clean install 
      cp target/microprofile-lra.war $JBOSS_HOME/standalone/deployments/
      

      in another console start LRA which does not finish by (it will leave unfinished TX):

      curl -X GET -v http://localhost:8080/microprofile-lra/FlightService/bookFlightWithRetry?failLRA=false
      

      Run following command to check LRA transactions:

      while true; do
        {
          date
          echo "$(curl -s http://localhost:8080/lra-coordinator/lra-coordinator)"
          sleep 1
        }
      done
      

      Restart the server and check above output. You will see that after restart there are no TXs and after 2-3 min it shows up again.

      Show
      Steps to reproduce: Start the server by: sh standalone.sh -c standalone-microprofile.xml Connect throught jboss-cli.sh and enable MP LRA: /extension=org.wildfly.extension.microprofile.lra-coordinator:add /extension=org.wildfly.extension.microprofile.lra-participant:add /subsystem=microprofile-lra-coordinator:add /subsystem=microprofile-lra-participant:add reload Unzip, build project in attached microprofile-lra.zip and deploy to server: unzip microprofile-lra.zip cd microprofile-lra mvn clean install  cp target/microprofile-lra.war $JBOSS_HOME/standalone/deployments/ in another console start LRA which does not finish by (it will leave unfinished TX): curl -X GET -v http: //localhost:8080/microprofile-lra/FlightService/bookFlightWithRetry?failLRA= false Run following command to check LRA transactions: while true ; do { date echo "$(curl -s http: //localhost:8080/lra-coordinator/lra-coordinator)" sleep 1 } done Restart the server and check above output. You will see that after restart there are no TXs and after 2-3 min it shows up again.
    • ---
    • ---

      MP LRA coordinator does not show any unfinished TXs after server restart and it takes 2-3 minutes to show them again. 

      Checking LRA coordinator endpoint after server restart:

      curl -s  http://localhost:8080/lra-coordinator/lra-coordinator
      

      there is 2-3 minutes delay until TXs are showed:

      Wed Nov 27 12:51:02 PM CET 2024
      []
      Wed Nov 27 12:51:04 PM CET 2024
      []
      ...
      Wed Nov 27 12:53:22 PM CET 2024
      [{"lraId":"http://localhost:8080/lra-coordinator/lra-coordinator/0_ffff0a280522_399d44cf_6747068c_1c","clientId":"org.wildfly.quickstarts.microprofile.lra.LRAParticipant1#work","status":"Active","startTime":1732708021256,"finishTime":0,"httpStatus":204,"topLevel":true,"lraIdAsString":"http://localhost:8080/lra-coordinator/lra-coordinator/0_ffff0a280522_399d44cf_6747068c_1c","recovering":false}]
      ...
       

      When checking tx-object-store directory the files tx files are present:

      standalone/data/tx-object-store/ShadowNoFileLockStore/defaultStore/StateManager/BasicAction/LongRunningAction/0_ffff0a280522_399d44cf_6747068c_1c
      

      Problem is that during this time none of the unfinished TXs cannot be manipulated. For example call to cancel the transaction fails on:

      $ curl -s http://localhost:8080/lra-coordinator/lra-coordinator/0_ffff0a280522_399d44cf_6747068c_1c/cancel  
      Invalid transaction id: http://localhost:8080/lra-coordinator/lra-coordinator/0_ffff0a280522_737ae5d0_67470a72_12
      

              rhn-engineering-mmusgrov Michael Musgrove
              mnovak1@redhat.com Miroslav Novak
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: