mirror of
https://github.com/MariaDB/server.git
synced 2026-02-06 18:59:08 +01:00
The design of "binlog group commit" involves carrying some state across transaction boundaries. This includes trx_t::commit_lsn, which keeps track of how much write-ahead log needs to be written. Unfortunately, this field was not reset in a commit where a log write was elided. That would cause an unnecessary wait in a subsequent read-only transaction that happened to reuse the same transaction object. trx_deregister_from_2pc(): Reset trx->commit_lsn so that an earlier write that was executed in the same client connection will not result in an unnecessary wait during a subsequent read operation. trx_commit_complete_for_mysql(): Unless we are inside a binlog group commit, reset trx->commit_lsn. unlock_and_close_files(): Reset trx->commit_lsn after durably writing the log, and remove a redundant log write call from some callers. trx_t::rollback_finish(): Clear commit_lsn, because a rolled-back transaction will not need to be durably written. trx_t::clear_and_free(): Wrapper function to suppress a debug check in trx_t::free(). Also, remove some redundant ut_ad(!trx->will_lock) that will be checked in trx_t::free(). Reviewed by: Vladislav Vaintroub |
||
|---|---|---|
| .. | ||
| ha_innodb.cc | ||
| ha_innodb.h | ||
| handler0alter.cc | ||
| i_s.cc | ||
| i_s.h | ||