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

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