Uploaded image for project: 'mod-orders-storage'
  1. mod-orders-storage
  2. MODORDSTOR-34

Spike: unique po_line_number generation

    XMLWordPrintable

Details

    • Story
    • Status: Closed (View Workflow)
    • P2
    • Resolution: Done
    • None
    • 3.0.0
    • None
    • ACQ Sprint 54, ACQ Sprint 55
    • 3
    • EBSCO - FSE

    Description

      From pavelk-epam, regarding MODORDERS-93:

      In order to proceed with this story we need to come up with a solution on how to generate unique sequential numbers for PO Lines.
      Namely, PO lines might be added in parallel by several users and we may have several instances of the module running. So implementing it without a mechanism to guarantee uniqueness in these conditions, there is a risk to end up with duplicate numbers. The things are further complicated by the fact that we need to keep separate sequence per Order.

      I think we need a spike story for that until you know how to achieve it right away.

      One of the options could be:

      add auxiliary table with two columns | order id | sequence |
      read the next sequence by 'order id' and increment it within the transaction to guarantee uniqueness in concurrent environment
      The drawback is that the sequence number might be lost if someone read it and then fails.
      Anyway, it's just raw idea for now that can be re-thought and expanded.

      Acceptance Criteria:

      • suggested approach is documented in or referenced from MODORDERS-93
        • Include examples/POC sql statements if possible.
        • Additional user stories are created (if necessary)

      Timeboxed to 3 days

      Results documented in Confluence
      https://wiki.folio.org/display/FOLIJET/Postgres+SEQUENCEs+for+generating+po_line_number+suffixes

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                johnkomick John Komick (Inactive)
                cmcnally Craig McNally
                Craig McNally Craig McNally
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases