Inventory (UXPROD-785)

[UXPROD-3089] Inventory. Implementing Optimistic Locking Created: 26/May/21  Updated: 18/Apr/22  Resolved: 18/Apr/22

Status: Closed
Project: UX Product
Components: None
Affects versions: None
Fix versions: Lotus (R1 2022)
Parent: Inventory

Type: New Feature Priority: P2
Reporter: Charlotte Whitt Assignee: Jakub Skoczen
Resolution: Done Votes: 0
Labels: metadatamanagement
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Defines
defines UXPROD-2994 Optimistic Locking: coordinate rollou... Open
defines UXPROD-3058 Optimistic Locking In Progress
is defined by CIRC-1154 align dependency versions affected by... Closed
is defined by FOLIO-3179 ui-inventory-es: align dependency ver... Closed
is defined by MDEXP-403 align dependency versions affected by... Closed
is defined by MODAUD-81 align dependency versions affected by... Closed
is defined by MODCR-59 align dependency versions affected by... Closed
is defined by MODCXINV-58 align dependency versions affected by... Closed
is defined by MODFEE-192 align dependency versions affected by... Closed
is defined by MODINV-398 Optimistic locking (_version field, 4... Closed
is defined by MODINVSTOR-656 enable "detection-only" OL for instan... Closed
is defined by MODINVSTOR-708 enable 'failOnConflict' for instances... Closed
is defined by MODINVSTOR-713 Enable support for optimistic locking... Closed
is defined by MODINVSTOR-726 Enable support for optimistic locking... Closed
is defined by MODNCIP-23 align dependency versions affected by... Closed
is defined by MODOAIPMH-328 align dependency versions affected b... Closed
is defined by MODORDERS-517 align dependency versions affected by... Closed
is defined by MODPATRON-56 align dependency versions affected by... Closed
is defined by MODRS-64 align dependency versions affected by... Closed
is defined by MODRTAC-59 align dependency versions affected by... Closed
is defined by MSEARCH-130 align dependency versions affected by... Closed
is defined by RMB-727 Implement support for optimistic locking Closed
is defined by UICHKIN-258 align dependency versions affected by... Closed
is defined by UICHKOUT-718 align dependency versions affected by... Closed
is defined by UICR-138 align dependency versions affected by... Closed
is defined by UIIN-1568 align dependency versions affected by... Closed
is defined by UIIN-1624 Updating item with _version always fa... Closed
is defined by UIOR-807 Add interface version for inventory o... Closed
is defined by UIPCIR-26 Align dependency versions affected by... Closed
is defined by UIPFPOL-29 Add interface version for inventory o... Closed
is defined by UIQM-150 Add interface version for inventory o... Closed
is defined by UIREC-139 align dependency versions affected by... Closed
is defined by UIREQ-646 Add interface version for inventory o... Closed
is defined by UIIN-1245 Implement optimistic locking in Inven... Closed
is defined by FOLIO-3241 Test inventory optimistic locking in ... Closed
Relates
relates to UXPROD-2994 Optimistic Locking: coordinate rollou... Open
relates to MODINVUP-10 Update with necessary Optimistic Lock... Closed
relates to SIP2-97 Verify impact of Optimistic Locking o... Closed
relates to UIIN-1527 Error popup on HTTP error status code... Closed
relates to UXPROD-2796 Prevent update conflicts when doing m... Closed
relates to UXPROD-2797 Prevent update conflicts (1 user and ... Closed
relates to UXPROD-2798 Prevent update conflicts (two automat... Closed
relates to UXPROD-3173 Folijet support work for Inventory Op... Closed
relates to MODINVUP-2 Adapt to optimistic locking behavior ... Closed
Requires
requires RMB-727 Implement support for optimistic locking Closed
Epic Link: Inventory
Development Team: Core: Platform
PO Rank: 0
Rank: Cornell (Full Sum 2021): R1
Rank: Duke (Full Sum 2021): R1
Rank: GBV (MVP Sum 2020): R1
Rank: U of AL (MVP Oct 2020): 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 Blocked )
  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 Closed ). This particular item is being addressed via RMB-388 Closed .
  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://folio-org.atlassian.net/wiki/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",



 Comments   
Comment by Ann-Marie Breaux (Inactive) [ 16/Sep/21 ]

Acq apps tested; issues with receiving, but that may just be the environment configuration. Will discuss with Dennis Bridges when he's back tomorrow

Comment by Ann-Marie Breaux (Inactive) [ 24/Sep/21 ]

Hi Khalilah Gambrell Oleksiy_Lemeshko Jakub Skoczen Julian Ladisch

I tested Daa Import on https://core-platform.ci.folio.org/. Data Import is not working at all. I doublechecked my permissions and the diku_admin permissions. I tried a default profile and a customized profile. I tried Inventory Single Record Import. They all fail almost immediately. 

 

I have a Folijet planning mtg at the same time as the go/no-go meeting, so will not be able to attend. Is there any other environment you would like me to test in? At one point, it sounded like we might be able to test on the hosted ref envs (where Data Import is working), but then we were told that the Core Platform env was working, so I used it. 

Generated at Fri Feb 09 00:29:16 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.