欢迎来到天天文库
浏览记录
ID:37494901
大小:265.25 KB
页数:11页
时间:2019-05-12
《浙江大学数据库系统概念PPT第十七章》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Chapter17:RecoverySystemFailureClassificationTransactionStateAquickviewofLog-BasedRecoveryFailureClassificationTransactionfailure:Logicalerrors:transactioncannotcompleteduetosomeinternalerrorconditionSystemerrors:thedatabasesystemmustterminateanactivetransactionduetoanerrorconditio
2、n(e.g.,deadlock)Systemcrash:apowerfailureorotherhardwareorsoftwarefailurecausesthesystemtocrash.Fail-stopassumption:non-volatilestoragecontentsareassumedtonotbecorruptedbysystemcrashDatabasesystemshavenumerousintegritycheckstopreventcorruptionofdiskdataDiskfailure:aheadcrashorsimil
3、ardiskfailuredestroysallorpartofdiskstorageDestructionisassumedtobedetectable:diskdrivesusechecksumstodetectfailuresRecoveryAlgorithmsRecoveryalgorithmsaretechniquestoensuredatabaseconsistencyandtransactionatomicityanddurabilitydespitefailuresRecoveryalgorithmshavetwopartsActionsta
4、kenduringnormaltransactionprocessingtoensureenoughinformationexiststorecoverfromfailuresActionstakenafterafailuretorecoverthedatabasecontentstoastatethatensuresatomicity,consistencyanddurabilityTransactionStateSinglestepTransactionState(Cont.)Active,theinitialstate;thetransactionst
5、aysinthisstatewhileitisexecutingPartiallycommitted,afterthefinalstatementhasbeenexecuted.Failed,afterthediscoverythatnormalexecutioncannolongerproceed.Aborted,afterthetransactionhasbeenrolledbackandthedatabaserestoredtoitsstatepriortothestartofthetransaction.Twooptionsafterithasbee
6、naborted:restartthetransaction–onlyifnointernallogicalerrorkillthetransactionCommitted,aftersuccessfulcompletion.ImplementationofAtomicityandDurabilityTherecovery-managementcomponentofadatabasesystemimplementsthesupportforatomicityanddurability.Theshadow-databasescheme:assumethaton
7、lyonetransactionisactiveatatime.apointercalleddb_pointeralwayspointstothecurrentconsistentcopyofthedatabase.allupdatesaremadeonashadowcopyofthedatabase,anddb_pointerismadetopointtotheupdatedshadowcopyonlyafterthetransactionreachespartialcommitandallupdatedpageshavebeenflushedtodisk
8、.incasetransactionfails,ol
此文档下载收益归作者所有