[This is preliminary documentation and subject to change.]
The RSM database uses write transactions to perform updates using the journal file. To begin an update, the application (RSM system code transactions are not externalized) begins a transaction. All database records that are updated, inserted, or deleted are written into a journal file. When database updates are complete, the application issues a commit or a rollback command.
The commit command flushes the journal file, then sets a commit state in the journal file indicating that this journal has been committed. The commit command then flushes the commit state and begins the in-place update of the database data file (NTMSDATA). The journal file is removed when the update of NTMSDATA and its replica is complete. If RSM is terminated during the commit operation, the journal file is replayed when the service is restarted and all database consistency reconstruction is complete. This occurs only if the commit state is indicated in the journal file. If the journal has not been committed, it is discarded, since it is part of an incomplete transaction.
The rollback command deletes the journal file. The NTMSDATA file remains unchanged.