Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page Properties


Submitted Date

  

Approved Date


Status

DRAFT

ImpactMEDIUM


 

Overrides/Supersedes 

This decision was migrated from the Tech Leads Decision Log as part of a consolidation process.  The original decision record can be found here.

RFC 

N/A

Stakeholders

  • Front-end and back-end devs who meet issues with data consistenc

Contributors

Raman Auramau 

Approvers

Background/Context

This is a solution design document aimed to provide details, alternatives and decision for FOLIO cross-module data consistency problem.

...

  • PRIORITY 1 eventual consistency for redundant / duplicated data when some data is duplicated in 2 storages and is to be synchronized,
  • PRIORITY 2 consistency for dangling / lost references when an item is deleted from one module leaving lost references to it in other modules, a problem that is succinctly, if frustratingly, captured in the PR discussion related to UITEN-128.
  • PRIORITY 3 data consistency during distributed business operations when data in several separate storages is to be modified (mod-finance-storage, mod-invoice-storage, mod-orders-storage),
  • updates collisions ... (check with Jacub? )

Eventual consistency for duplicated data

Brief context: a source module owns an entity; a particular entity field is duplicated into 1+ entities of another module (e.g., for search, or filtering, or sorting). If an original field value in source module is changed, the change is to be replicated everywhere.

Identified cases:

  1. Pair of RefNumber and RefType should be in consistence state between POL and invoice line Image AddedMODORDERS-421 - Spike : User should be able to edit Pair of "refNumber" and "refNumberType" in the POL and see that update on the Invoice line OPEN
    1. mod-orders → mod-invoice
    2. 1-to-1 relation - one pair of refNumber/refNumberType to one invoice record ( (question) - not sure, need to confirm)
  2. VendorCode should be in consistence state between Organization record and purchaseOrder.vendorCodeImage AddedMODORDERS-398 - Data consistency needed : Update "vendorCode" in related purchase orders BLOCKED
    1. mod-organizations → mod-orders
    2. 1-to-many relation - one vendor code can be used in many orders
  3. FundCode should be in consistence state between Fund record and pol.fundDistribution.code
    1. mod-finance → mod-orders
    2. 1-to-many relation - one fund code can be used in many orders

Assumptions

N/A

Constraints

N/A

Rationale


Decision


Implications

  • Pros
    • N/A
  • Cons
    • N/A


Other Related Resources

References

On distributed updates and eventual consistency

2021-05-12 Meeting notes - there was a lot of discussion on related issues

Meetings notes

Agenda

...