Details
-
Story
-
Status: Closed (View Workflow)
-
P2
-
Resolution: Done
-
None
-
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
- blocks
-
MODORDERS-93 po_line_number isn't set when creating a new po_line
-
- Closed
-
- relates to
-
MODORDSTOR-45 Build API for PO line numbers
-
- Closed
-
-
MODORDSTOR-46 Create RAML/modDescriptor for po_line_number
-
- Closed
-