节点文献

达梦嵌入式数据库恢复机制研究

Research on Recovery Mechanisms in DM Embedded DBMS

【作者】 胡进

【导师】 冯玉才;

【作者基本信息】 华中科技大学 , 计算机软件与理论, 2012, 硕士

【摘要】 随着嵌入式技术的不断发展,嵌入式数据库应用得越来越广泛。嵌入式环境有许多特点和限制,如移动性、网络不稳定性以及电源能力等,对嵌入式数据库可靠性和性能提出了更高的要求和挑战,一个强健的恢复子系统是嵌入式数据库必不可少的组成部分。通过系统深入地研究数据库恢复技术,对达梦(DM)嵌入式数据库恢复子系统进行了改进,以提升系统可靠性和可用性。为适应嵌入式环境,使系统设计遵循简约性和微内核特性,对数据库回滚段进行了设计与改进,将回滚段集成到数据文件中,进行系统恢复时仅搜索预留回滚段,节省了恢复时间;同时将日志文件设计成单日志形式,并采用事务一致性检查点缩短恢复时需要扫描的日志量。在系统故障恢复时,为避免对所有Redo日志进行重做,设计并实现了选择性重做方案。对于那些已经写入到数据库文件中的记录,根据页面的日志序列号(LogSequence Number, LSN)和日志记录的LSN进行判断后再决定是否进行重做,而不是盲目地重做,分析并给出了使用该方法的前提条件。该方法节省了系统缓冲区资源,减少磁盘I/O,体现了嵌入式数据库微内核的要求。为充分利用操作系统多道程序设计思想以及达梦嵌入式数据库特殊的事务模型,系统恢复时采用多线程方式重做日志加速恢复。使用一个日志分发线程、多个重做线程的模型,线程间同步协作完成重现历史操作,达到快速重建系统崩溃时系统状态的目的。经过实验测试表明,改进后的恢复子系统能正确处理系统遇到的事务故障、系统故障和介质故障,且能缩短系统故障恢复使用的时间。

【Abstract】 With the development of embedded technology, embedded database has been used moreand more widely. Embedded environment has many characteristics and limitations, suchas mobility, network instability and power supply ability, reliability and performance ofthe embedded database has put forward higher requirements and challenges, a strongrecovery subsystem is an important part of the embedded database’s component. Throughthe systematic research on the database recovery technology, we study and improve therecovery subsystem in DM embedded Database Management System, to improve thesystem reliability and availability.In order to adapt to the embedded environment, system design follows the simple rules.The rollback segment is designed and improved, it is integrated into the data file. Whensystem restoring, only searches the reserved rollback segment, it saves the recovery time;at the same time the log file is designed into a single log file form, using transactionconsistency checkpoint to shorten the recovery process when needs to scan the log volumeduring system startup.When system needs restore, we design and put the selective-redo into implementation toavoid to redo all the Redo logs. For those records which have written to the database file,according to page LSN(Log Sequence Number) and log LSN’s judgment, decides whetherto redo the log record, rather than blindly. Then, we analyze the premise condition whenusing the selective-redo method. The method saves system buffer, reduces the I/Ooverloads and embodies the micro kernel requirements of embedded database.In order to make full use of the operating system’s multiprogramming design thoughtand the special transaction model that the system uses, system restore uses multiplethreads to redo log records. The use of a log distribution thread multiple redo thread model,synchronization between thread to complete cooperation historical operation, achievesrapid reconstruction of the system state when system crashes.Tests show that, the improved recovery subsystem not only can handle transaction failure, system failure and media failure, which may occurs during system processing, butalso can shorten the time of recovery.

  • 【分类号】TP368.1;TP311.52
  • 【被引频次】1
  • 【下载频次】93
节点文献中: 

本文链接的文献网络图示:

本文的引文网络