构造一致性读的过程!

有关一致性读的过程确实非常复杂...希望有一天能以试验的方式清晰的解读这个过程...[@more@]

CREATING A READ CONSISTENT VIEW STEPS

1. Read the Data Block. If the block is resident in memory, create a clone to perform the undo. 2. Read the Row Header. 3. Check the LockByte to determine if there is an ITL entry. 4. Read the ITL to determine the Transaction ID.
Automatic UNDO Internals
5. Read the Transaction Table. If the transaction has been committed and has a System Commit Number less than the query’s System Change Number, cleanout the block and move on the next data block (if required) and Step 1. 6. Read the last undo block indicated 7. Compare the block transaction id with the transaction table transaction id. If the Transaction ID in the undo block does not equal the Transaction ID from the Transaction Table, then signal an ORA-01555 “Snapshot Too Old.”. 8. Starting with the head undo entry, apply the changes to the block. 9. If the tail undo entry (the last one read) indicates another data block address, read the indicated undo block into memory. Repeat 7 & 8 until the first record does not contain a value for the data block address. 10. When there is no previous data block address, the transaction has been undone. 11. If the undo entry contains a) a pointer to a previous transaction undo block address, read the TxID in the previous transaction undo block header and read the appropriate Transaction Table entry. Return to step 5. b) an ITL record, restore the ITL record to the data block. Return to step 4.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/19602/viewspace-1020837/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/19602/viewspace-1020837/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值