Uploaded image for project: 'mod-data-export-spring'
  1. mod-data-export-spring
  2. MODEXPS-75

Prevents execution of the same scheduled EDIFACT export task from another node (or thread).

    XMLWordPrintable

Details

    • ACQ Sprint 134, ACQ Sprint 135, ACQ Sprint 136, ACQ Sprint 166
    • 0
    • Thunderjet
    • Poppy (R2 2023)
    • Implementation coding issue

    Description

      Overview:
      When EDIFACT orders export job is scheduled to run every one hour(no matter which type of scheduling is used) if it is deployed in multi nodes(multi instances of mod-data-export-spring), the scheduler triggers on both the nodes. This is expected as each node is a separate service altogether.

      Open question : Is deploying multiple mod-data-export-spring instances per tenant a default setting?
      If only one instance is deployed, then there is no problem. But if many instances, then issue must be fixed.
      Also make sense to include information about unexpected behavior of scheduling in case more then one instances deployed.

      Steps to Reproduce:
      Use cases:

      1. Prepare EDIFACT scheduled configuration
      2. Deploy 2 instances of the mod-data-export-spring for tenant

      Expected Results:
      At triggered time the export Job is ran only once and orders exported once.

      Actual Results:
      At triggered time the export Job is ran twice and orders exported twice.

      Approach:
      Looks like can be fixed as proposed : https://dzone.com/articles/implementing-scheduler-lock
      Implementation : https://github.com/lukas-krecan/ShedLock

      WBS
      1. Add dependencies
      <dependency>
      <groupId>net.javacrumbs.shedlock</groupId>
      <artifactId>shedlock-provider-jdbc-template</artifactId>
      <version>4.33.0</version>
      </dependency>
      2. Create ShedLock table
      https://github.com/lukas-krecan/ShedLock/blob/master/micronaut/test/micronaut-jdbc/src/main/resources/db/liquibase-changelog.xml
      3.

      URL:
      Interested parties:

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                tatsiana.tarhonskaya Tatsiana Tarhonskaya
                Andrei_Makaranka Andrei Makaranka
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases