References:
- Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.
- CPS-875 CM Handle State: Watchdog-process that syncs 'ADVISED' CM Handles
- CPS-899 Start and stop sessions on Java API
- CPS Internal Relation DB Schema
Overview
This user story is related to CPS-875 CM Handle State: Watchdog-process that syncs 'ADVISED' CM Handles wherein locking the database is an essential step of the process.
Recap of watchdog process:
- Wake up on a specified schedule
- Identify node with state ‘ADVISED’
- Lock database, update timestamp, unlock the database
- Model sync
- Update state of the node to ‘READY’
In step 3 of the process, it is necessary to lock the database in order to avoid multiple instances of NCMP updating the records.
It is identified that a ‘lock’ can also be implemented in the DB plugin, CPS, and the client (NCMP) or combination of these.
Locking method scenarios
Scenario | Description | |
---|---|---|
1 | Only anchor table row is locked |
|
2 | anchor and every fragment associated with the anchor is locked |
|
Issues and decisions
Description | Issues | Notes | Decisions | |
---|---|---|---|---|
1 | Scenario #2 is chosen as the method for locking anchor |
|
|
|
2 | To implement a lock we must do it inside a transaction |
|
|