Uploaded image for project: 'UX Product'
  1. UX Product
  2. UXPROD-3089

Inventory. Implementing Optimistic Locking

    XMLWordPrintable

Details

    • Core: Platform
    • 0
    • R1
    • R1
    • R1
    • R1

    Description

      Purpose: Implementing Optimistic Locking in Inventory.

      Description:
      Implementation of Optimistic Locking FOLIO wide was ranked very high by the libraries. The implementation in Inventory will be the first stab doing so.

      Usecases: (Use cases collected by the community)

      Not frequent: 2 users editing the same record at the same time

      1. User A and User B editing the same record at the same time – instances, holdings, items, requests
      2. User A editing an item and User B creating a request for that item
      3. User A editing and item and User B putting that item on course reserve at the same time
      4. User A editing an item and User B deleting the item before User A's edits are saved (see UIIN-730)
      5. When attempting to update holdings and their items concurrently the holdings updates will ever so often interfere with the item updates, effectively nullifying the latter (see MODINVSTOR-516). This particular item is being addressed via RMB-388.
      6. User A and User B generating a new number using the number generator for call number or accession number (number generator runs separate queries for selecting and incrementing the number (GBV); not relevant if FOLIO combines select and increment into one query) (not a challenge in FOLIO because the functionality does not exist)

      More frequent: 1 user and system trying to act on the same record, either individual records or batch

      1. User A editing an instance/holding/item and data import updating the same record (consider the DI redesign that is taking place now)
      2. User A editing an item and checkout trying to update the item status
      3. User A editing an item and bulk renewal trying to update the item
      4. User A editing an instance/holdings/item after data import ran in Preview mode but before the data import changes were committed

      Two automated processes acting on the same record

      1. Checkout happening and updating status on an item record at the same time as import updating the item

      Technical documentation:
      GitHub: https://github.com/folio-org/raml-module-builder/blob/master/README.md#optimistic-locking

      Proposed UX mock-ups:
      https://wiki.folio.org/display/PO/Optimistic+Locking+-++Detecting+and+Resolving+Conflicts+Requirements

       

      Team Module Smoke
      UAT
      Problems (notes)
       Firebird mod-data-export   N/A   
       Thunderjet Orders     
       Thunderjet Finance    
       Thunderjet Organizations    
      Thunderjet  Acq Units    
      Thunderjet  Receiving    
      Thunderjet Invoices    
       n/a Tags     
       Folijet Data Import     
      Prokopovych  Checkout   
      Prokopovych  Checkin  
      Prokopovych  Requests     
      Spitfire  quickMARC   can't run module under env
      Thor Courses   
      Thor Inventory Single Record Import   
      Prokopovych  users  
      Prokopovych  fees/fines  
      Firebird  OAI-PMH N/A  
      Firebird SIP2 tbd tbd  Bill is setting up an environment to test it

      This module is NOT part of platform-complete and does NOT block the Kiwi release:

      Team Module Smoke
      UAT
      Thor Inventory Single Record Import CBS to FOLIO (mod-inventory-update)  

      Interface versions

      When mod-inventory-storage and mod-inventory enable optimistic locking they bump these interface version:
      item-storage 8.9 -> 9.0
      item-storage-batch-sync 0.6 -> 1.0
      holdings-storage 4.6 -> 5.0
      holdings-storage-batch-sync 0.3 -> 1.0
      instance-storage 7.8 -> 8.0
      instance-storage-batch 0.3 -> 1.0
      instance-storage-batch-sync 0.3 -> 1.0
      inventory 10.12 -> 11.0
      inventory-batch 0.5 -> 1.0

      Other modules have already added the optimistic locking interface version to their "requires" section in ModuleDescriptor or package.json. They allow both versions to support both enabled and disabled inventory optimistic locking. This makes it possible that mod-inventory-storage and mod-inventory can enable and disable optimistic locking without a need to change the other modules. This is the list of all modules that depend on optimistic locking interfaces:

      mod-inventory
      "id": "item-storage", "version": "8.9 9.0"
      "id": "instance-storage", "version": "7.8 8.0"
      "id": "instance-storage-batch", "version": "0.2 1.0"
      "id": "holdings-storage", "version": "2.0 3.0 4.0 5.0"

      mod-audit
      "id": "inventory", "version": "10.7 11.0"
      "id": "holdings-storage", "version": "4.4 5.0"

      mod-circulation
      "id": "item-storage", "version": "8.7 9.0"
      "id": "instance-storage", "version": "4.0 5.0 6.0 7.0 8.0"
      "id": "holdings-storage", "version": "1.3 2.0 3.0 4.0 5.0"

      mod-codex-inventory
      "id": "instance-storage", "version": "7.0 8.0"

      mod-courses
      "id" : "item-storage", "version": "7.0 8.0 9.0"
      "id" : "instance-storage", "version": "7.2 8.0"
      "id" : "holdings-storage", "version": "2.0 3.0 4.0 5.0"

      mod-data-export
      "id": "instance-storage", "version": "7.7 8.0"
      "id": "holdings-storage", "version": "4.5 5.0"
      "id": "item-storage", "version": "8.9 9.0"

      mod-feesfines
      "id": "holdings-storage", "version": "4.2 5.0"
      "id": "item-storage", "version": "8.4 9.0"
      "id": "instance-storage", "version": "7.4 8.0"

      mod-ncip
      "id":"holdings-storage", "version":"4.0 5.0"
      "id":"inventory", "version":"10.2 11.0"

      mod-oai-pmh
      "id": "instance-storage", "version": "7.6 8.0"

      mod-orders
      "id": "holdings-storage", "version": "4.2 5.0"
      "id": "inventory", "version": "10.5 11.0"
      "id": "item-storage", "version": "8.5 9.0"

      mod-patron
      "id": "holdings-storage", "version": "5.2 6.0 7.0 8.0 9.0 10.0 11.0"

      mod-remote-storage
      "id": "inventory", "version": "10.7 11.0"
      "id": "holdings-storage", "version": "4.6 5.0"
      "id": "item-storage", "version": "8.8 9.0"

      mod-search
      "id": "instance-storage", "version": "7.5 8.0"

      ui-checkout
      "inventory": "10.0 11.0",

      ui-checkin
      "inventory": "10.0 11.0",

      ui-courses
      "item-storage": "7.1 8.0 9.0",

      ui-inventory
      "inventory": "10.10 11.0",
      "instance-storage": "7.0 8.0",
      "holdings-storage": "3.0 4.4 5.0",
      "item-storage": "8.0 9.0",

      ui-inventory-es
      "instance-storage": "7.0 8.0",
      "holdings-storage": "3.0 4.4 5.0",
      "item-storage": "8.0 9.0",

      ui-orders
      "holdings-storage": "4.4 5.0",
      "inventory": "10.10 11.0",

      ui-plugin-create-inventory-records
      "inventory": "10.0 11.0",
      "instance-storage": "7.0 8.0",
      "holdings-storage": "3.0 4.0 5.0",
      "item-storage": "8.0 9.0",

      ui-receiving
      "holdings-storage": "4.2 5.0",
      "inventory": "10.0 11.0",

      ui-requests
      "inventory": "10.0 11.0",

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                jakub Jakub Skoczen
                charlotte Charlotte Whitt
                Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases