Uploaded image for project: 'mod-finance-storage'
  1. mod-finance-storage
  2. MODFISTO-259

Releasing 2 transactions at the same time can fail to update budgets

    XMLWordPrintable

Details

    • Bug
    • Status: Blocked (View Workflow)
    • P3
    • Resolution: Unresolved
    • 8.1.0
    • None
    • Thunderjet
    • Quesnelia (R1 2024)

    Description

      Overview:

      When the mod-finance-storage API is used to update 2 transactions at the same time, budget updates can run in parallel and result in incorrect budget values.

      Steps to Reproduce:

      1. Revert MODORDERS-582
      2. Run the integration test delete-opened-order-and-lines

      Expected Results:
      Success

      Actual Results:
      Most of the time this results in a failure. Either the budget is wrong or a separate issue, "All expected transactions already processed", occurs (see MODFISTO-260).

      Additional Information:
      MODORDERS-539's implementation for mod-orders deletes 2 transactions of the deleted order line at the same time. mod-finance releases an encumbrance before deleting it. To release and delete, mod-finance calls mod-finance-storage. mod-finance-storage's budget update (EncumbranceService#updateBudgetsTotals) is not checking if another update is taking place in parallel.

      A workaround for this issue was implemented in MODORDERS-582.

      The budget conflicts will be resolved by MODFISTO-304. After that, MODFISTO-260 and related stories will fix processing transactions for the same order/invoice. Then, in the scope of this ticket, we can try to revert MODORDERS-582. If it works then this issue is resolved.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                damieng Damien Guillaume
                Damien Guillaume Damien Guillaume
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:

                  TestRail: Runs

                    TestRail: Cases