• binzhang
    2024-11-02 来自美国
    can multiple active transactions share same undo segment? btw, i ask gpt4o, it says """3. **No New Undo Records**: The rollback operation does not create new undo records because it is directly using the existing undo log to revert changes. The goal is to clean up and restore the database without creating additional overhead."""

    作者回复: 1. Can multiple active transactions share same undo segment? 多个活动的事务不会使用同一个Undo段。只有当一个事务结束后,他的Undo段才有机会被其他事务重用。 2. The rollback operation does not create new undo records. 这里gtp4o的回答应该是正确的。我文章里写的不对,抱歉。Undo的时候不会生成新的Undo记录。Undo的过程中,修改数据时(比如在函数row_undo_mod_clust_low中),会带上BTR_NO_UNDO_LOG_FLAG标记。 不过Undo的过程中,会生成Redo,因此即使Undo的过程中数据库崩溃了,也不会有问题。 感谢指出文章里的问题。🤝🤝

    
    