Caching and Data Integrity Recommendations

Previous Topic

Next Topic

Data Recovery

Although the caching technique described above can be an efficient method for storing data to disk with minimal impact on performance, it has implications regarding data recovery. The program's logic may assume the data is safely stored on disk (permanent storage) when, in fact, it is still in the cache memory (temporary storage) waiting to be written to disk. If the system encounters a catastrophic failure, such as a power failure, before the cache can be flushed, the program may not be able to recover that data.

FairCom DB provides its own caching that is integrated with the program's logic. When data is written to disk, it is stored in a temporary cache that will be flushed to disk during idle time. Although the program can continue with certain operations while the data is still in the cache, it does not consider the write to be completed until the cache buffer is flushed to disk. If the file is under transaction control, system recovery can use the transaction log to restore the data in case of a failure.