[FOLIO-2028] SPIKE: how to handle update conflicts? Created: 20/May/19 Updated: 12/Apr/21 Resolved: 12/Apr/21 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P3 |
| Reporter: | Jakub Skoczen | Assignee: | Jakub Skoczen |
| Resolution: | Done | Votes: | 0 |
| Labels: | platform-backlog | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||||||||||||||||||||||||||||||
| Sprint: | |||||||||||||||||||||||||||||||||||||
| Development Team: | Core: Platform | ||||||||||||||||||||||||||||||||||||
| Description |
|
Problem statement In FOLIO, most storage modules follow the "last writer wins" strategy for handling record updates. From the end-user perspective this may lead to a situation when a stale record (older version of a record) previously loaded into the UI overrides a more recent version of the record on the server. Hence relevant updates may get lost in the process. Possible solution Handling of updates in FOLIO should rely on more explicit semantics, both in the storage (backend) APIs and the way it is communicated to the user through the UI. From the storage and API perspective there are two major strategies for handling conflicting updates:
In general, optimistic locking is used when the risk of collisions (updates to the same record) is low and when the lock granularity is high ((ie duration of any given update is short). The opposite is true for the pessimistic locking strategy. Also, the impact on the user experience should be taken into account when selecting the appropriate strategy:
|
| Comments |
| Comment by Björn Muschall [ 24/May/19 ] |
|
Both technicians and librarians from Leipzig prefer the optimistic looking approach. Since we cannot use the system productively without a solution (end 2019), I would like to encourage the decision making process. Does it make sense to discuss this at the Product Council since it's an overarching issue? What do you think, Cate Boerema ? I know there is a lot of other things. |
| Comment by Cate Boerema (Inactive) [ 05/Jun/19 ] |
|
Hi Björn Muschall. In talking to Jakub Skoczen, it seems like OL is more commonly used, more user friendly and technically simpler. Given that, Jakub and I think we probably ought to just pursue the OL approach. If we pursue this, it could be phased as follows: Alternatively, we could consider implementing partial updates (PATCH) and record history. This is what JIRA seems to do. When there is a conflict, JIRA silently overrides (so it basically behaves like FOLIO does today) BUT the issue is mitigated by the fact that it retains update history so you can revert pretty easily (there's no revert button, but you can manually reapply). JIRA also has inline (field-based) editing which reduces the likelihood of conflicts. Thoughts? |
| Comment by Julian Ladisch [ 06/Jun/19 ] |
|
RMB supports updating only a specific field: |