[This is preliminary documentation and subject to change.]
Since abnormal termination can occur during a data file update, the possibility exists that the RSM database data file and index file will become inconsistent. The database uses a rolling incarnation number in each of these files to verify that they are consistent. When the update begins, the incarnation number in the data file rolls forward and the data file is flushed to disk. When the update is complete, the data file and index file are flushed to disk and the index file incarnation number rolls forward and is subsequently flushed to disk. If the service is terminated for any reason during the update, the incarnation numbers are mismatched, indicating that they are inconsistent. The RSM database is designed to rebuild the index file from the data file and does so on startup if an inconsistency is detected.
In addition to using the normal mechanism for verifying the integrity of the index and data files, RSM also sets a registry value to force a recovery when a disk full or disk I/O error has occurred.