14.4.8 Undo Logs

  • An undo log is a collection of undo log records associated with a single transaction. An undo log record contains information about how to undo the latest change by a transaction to a clustered index record. If another transaction needs to see the original data (as part of a consistent read operation), the unmodified data is retrieved from the undo log records. Undo logs exist within undo log segments, which are contained within rollback segments. Rollback segments reside in thesystem tablespace, temporary tablespace, and undo tablespaces. For more information, see Section 14.7.7, “Configuring Undo Tablespaces”. For information about multi-versioning, see Section 14.3, “InnoDB Multi-Versioning”.
  • 撤消日誌是單個事務關聯的撤消日誌記錄的集合,撤消日誌記錄包含有關如何通過事務撤消對羣集索引記錄的最新更改的信息。如果另一個事務需要查看原始數據 (作爲一致讀取操作的一部分), 則從撤消日誌記錄中檢索未修改的數據。撤銷日誌存在於撤銷日誌段中,撤銷日誌段存在於回滾段中,回滾端存在在系統表空間,臨時表空間和撤銷表空間裏面,更多信息,請看Section 14.7.7, “Configuring Undo Tablespaces”.多版本的更多信息,請看Section 14.3, “InnoDB Multi-Versioning”.
  • InnoDB supports 128 rollback segments, 32 of which are reserved as non-redo rollback segments for temporary table transactions. Each transaction that updates a temporary table (excluding read-only transactions) is assigned two rollback segments, one redo-enabled rollback segment and one non-redo rollback segment. Read-only transactions are only assigned non-redo rollback segments, as read-only transactions are only permitted to modify temporary tables.
  • innodb支持128個回滾段,其中32個保留爲臨時表事務的非重做回滾段,每個更新臨時表(不包括只讀事務)的事務都會分配兩個回滾段,一個重做回滾段和一個非重做回滾段,只讀事務只會分配一個非重做回滾段,並且只讀事務只允許修改臨時表空間
  • This leaves 96 available rollback segments, each of which supports up to 1023 concurrent data-modifying transactions, for a total limit of approximately 96K concurrent data-modifying transactions. The 96K limit assumes that transactions do not modify temporary tables. If all data-modifying transactions also modify temporary tables, the total limit is approximately 32K concurrent data modifying transactions. For more information about rollback segments that are reserved for temporary table transactions, see Temporary Table Undo Logs.
  • 剩下的96個可用的回滾段,每個段支持多達1023個併發數據修改事務,總共限制大約96K併發數據修改事務。96K限制假定事務不修改臨時表。如果所有數據修改事務也修改臨時表,那麼大約支持32K個併發修改數據的事務,有關爲臨時表事務保留的回滾段的詳細信息,請看Temporary Table Undo Logs.
  • The innodb_rollback_segments option defines the number of rollback segments used by InnoDB.
  • innodb_rollback_segments選項定義使用InnoDB回滾段的數目。

NEXT:14.4.7 Doublewrite Buffer. https://blog.51cto.com/itzhoujun/2353192
PREV:14.4.9 File-Per-Table Tablespaces. https://blog.51cto.com/itzhoujun/2353195

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章