- - CPS-898Getting issue details... STATUS
- 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
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 the 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
|1||Only anchor table row is locked|
|2||anchor and every fragment associated with the anchor is locked|
Issues and decisions
|1||Scenario #2 is chosen as the method for locking anchor|
|2||To implement a lock we must do it inside a transaction|
|3||Locking of anchor on multiple namespaces|