Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-417

Incorrect jberet batch status is shown when using JDBCRepository and multiple nodes

    Details

    • Steps to Reproduce:
      Hide

      1. Run locally two WildFly 10 standalone server instances with the batch subsystem pointing to the same db. You can use standalone.xml_1 and standalone.xml_2 from attachment.
      2. Build and Deploy an batch-processing application from attachment and start batch on the 1st JBoss instance.

      [GET] http://localhost:18080/batch-processing/start

      In console you can see output like as:
      ~~~~
      15:24:16,023 ERROR [stderr] (default task-6) Seconds = 5
      15:24:16,032 ERROR [stderr] (default task-6) Execution ID = 1
      15:24:16,040 ERROR [stderr] (Batch Thread - 4) Start.
      15:24:21,041 ERROR [stderr] (Batch Thread - 4) End.
      ~~~

      3. Query job execution status on the second instance using below URL. It should report "STARTED".

      [GET] http://localhost:28080/batch-processing/status

      In the console you should be able to see logging like as:
      ~~~~
      INFO [stdout] (default task-7) Id=1
      INFO [stdout] (default task-7) BatchStatus=STARTED
      INFO [stdout] (default task-7) ExitStatus=null
      INFO [stdout] (default task-7) JobParameters.seconds=5
      ~~~~

      4. Batch execution will be completed after 5 seconds. Now check the batch status on 1st node, it will be 'COMPLETED'.

      [GET] http://localhost:18080/batch-processing/status

      5. Check batch status on 2nd node using below REST endpoint:

      [GET] http://localhost:28080/batch-processing/status

      It will still showing batch status as 'STARTED'.

      Show
      1. Run locally two WildFly 10 standalone server instances with the batch subsystem pointing to the same db. You can use standalone.xml_1 and standalone.xml_2 from attachment. 2. Build and Deploy an batch-processing application from attachment and start batch on the 1st JBoss instance. [GET] http://localhost:18080/batch-processing/start In console you can see output like as: ~~~~ 15:24:16,023 ERROR [stderr] (default task-6) Seconds = 5 15:24:16,032 ERROR [stderr] (default task-6) Execution ID = 1 15:24:16,040 ERROR [stderr] (Batch Thread - 4) Start. 15:24:21,041 ERROR [stderr] (Batch Thread - 4) End. ~~~ 3. Query job execution status on the second instance using below URL. It should report "STARTED". [GET] http://localhost:28080/batch-processing/status In the console you should be able to see logging like as: ~~~~ INFO [stdout] (default task-7) Id=1 INFO [stdout] (default task-7) BatchStatus=STARTED INFO [stdout] (default task-7) ExitStatus=null INFO [stdout] (default task-7) JobParameters.seconds=5 ~~~~ 4. Batch execution will be completed after 5 seconds. Now check the batch status on 1st node, it will be 'COMPLETED'. [GET] http://localhost:18080/batch-processing/status 5. Check batch status on 2nd node using below REST endpoint: [GET] http://localhost:28080/batch-processing/status It will still showing batch status as 'STARTED'.

      Description

      Customer is using JEE batch (JSR 352) feature in there application, which is deployed on two standalone nodes. Multiple standalone server instances(WildFly 10) sharing the same batch datasource. The jdbc module name used in jberet is same for both servers,standalone_1 and standalone_2,both are referring to the same datasource.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  iweiss Ingo Weiss
                  Reporter:
                  iweiss Ingo Weiss
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: