Status: Closed (View Workflow)
The Inventory Storage Batch Sync APIs upsert functionality is used extensively at initial data migration from legacy systems and is an important lifeline for fixing wide mistakes or corrections that needs to happen to records on a larger scale (millions of records)
With the introduction of the optimistic locking functionality in Inventory, the upsert functionality of the batch APIs is no longer functioning without supplying the correct _version property of the individual objects.
Since these APIs - to my knowledge - are mainly used at migration time (migration from the legacy system) in order to overlay data and correct large batches of data, this new constraint makes the upsert part of these APIs more or less useless.
My proposal is that a new parameter is added, "ignoreOptimisticLocking" or similar, that allows you to sidestep the optimistic locking when using these APIs.
Steps to Reproduce:
- Post a batch of instances (with no _version property) to FOLIO using /instance-storage/batch/synchronous
- Alter something in the records.
- Post the same batch (still, with no _version property) with some updated records to /instance-storage/batch/synchronous?upsert=true
The records are received by FOLIO and successfully updated
The batches fail with a HTTP 409
JSON schemas do not require the _version property.