[FOLIO-2604] SPIKE: investigate upgrade/migrate strategy for reference data Created: 18/May/20 Updated: 22/Jun/20 Resolved: 22/Jun/20 |
|
| Status: | Closed |
| Project: | FOLIO |
| Components: | None |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Task | Priority: | P3 |
| Reporter: | Jakub Skoczen | Assignee: | Wayne Schneider |
| Resolution: | Done | Votes: | 0 |
| Labels: | devops-backlog | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||
| Sprint: | DevOps: sprint 90 | ||||||||
| Development Team: | FOLIO DevOps | ||||||||
| Description |
|
Module tenant initialization for both first-time init and for upgrades calls the _tenant interface, and tenant parameters included in the Okapi install API call are passed to the module, including loadSample and loadReference. As currently implemented in most modules, this will cause the module to attempt to load all reference data on module upgrade (not just new data). New records will be created if needed, and existing records (matched by UUID) will be overlaid. Due to this, issues arise if the tenant has altered or deleted any of the reference data loaded by the module when it was first enabled. Any changes will of course be overwritten with the system default, and deleted records will be re-created. More subtle problems arise if the record type in question has data constraints (for example, the requirement that a particular property be unique), and the tenant has created a new record of that type which causes a conflict with incoming reference data. As currently implemented, this kind of conflict causes the module upgrade to fail, potentially leaving the tenant data in an inconsistent state. These kinds of issues would very likely also arise if an operator specified loadSample=true in an upgrade, but that is currently untested, and seems like an unlikely use case, at least for production. |
| Comments |
| Comment by Wayne Schneider [ 18/May/20 ] |
|
Discussion paper for SysOps SIG has been posted: https://discuss.folio.org/t/reference-data-and-upgrades/2858. Will collect feedback from SIG and discuss at the meeting on 22 May. |
| Comment by Wayne Schneider [ 27/May/20 ] |
|
Proposal on Wiki: https://folio-org.atlassian.net/wiki/display/SYSOPS/Upgrades+with+Reference+data |
| Comment by Wayne Schneider [ 02/Jun/20 ] |
|
Proposal will be discussed in TC on 3 June. |
| Comment by Wayne Schneider [ 09/Jun/20 ] |
|
Discussion in the TC was wide-ranging, and the topic will be discussed again, to be sure. Jakub Skoczen asked for a description of the basic operational issue that needs to be solved. In a nutshell:
|
| Comment by Wayne Schneider [ 22/Jun/20 ] |
|
Created issue
|