ITPub博客

首页 > 应用开发 > IT综合 > 构造一致性读的过程!

构造一致性读的过程!

原创 IT综合 作者:warehouse 时间:2009-04-19 08:59:16 0 删除 编辑
有关一致性读的过程确实非常复杂...希望有一天能以试验的方式清晰的解读这个过程...[@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博客 ” ,链接:https://blog.itpub.net/19602/viewspace-1020837/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-07

  • 博文量
    717
  • 访问量
    5366344