Files
alfresco-community-repo/amps/ags/rm-community/documentation/PatchService.md
2021-05-05 19:41:33 +01:00

15 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# RM Patch Service
The RM Patch service operates independently of the Core Patch service & behaves differently.
Schema numbering is sequential, its a 4 digit number, prefixed with the major/minor version number, e.g. schema from a 2.4 version will be 24xx. This is a different policy to the core numbering (which bumps the schema number by 10 for each release).
Patches run in a single transaction. They may process data in batches, but its all wrapped in a single transaction, which is rolled back if the patch fails or is interrupted. AbstractModulePatch#245. When we implement applyInternal within a patch, that whole method runs inside a transaction.
DB Schema numbers update only after every patch runs. This means if a patch fails, earlier patches will re run. (see: ModulePatchExecuterImpl.executeInternal#140). This behaviour is different than cores behaviour, which updates the schema number after each successful patch.
DB Schema number is stored in the attribute service (key: “module-schema”) against the RMs module ID. This is not exposed in the UI. Nor in a REST API. The attribute service stores it directly in the DB, so isnt even accessible via the node browser.
If a customer wants to determine the schema number for a running system, theyll need to execute a DB query.
It's possible to configure a patch not to run if being upgraded from a earlier schema version by setting `fixesFromSchema` in the patch config xml.