[MDEV-15181] innodb_lock_schedule_algorithm=vats may cause debug assertion failure Created: 2018-02-02  Updated: 2018-02-16  Resolved: 2018-02-16

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB, Storage Engine - XtraDB
Affects Version/s: 10.1, 10.2, 10.3
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Thirunarayanan Balathandayuthapani
Resolution: Not a Bug Votes: 0
Labels: assertion, deadlock, rollback, transactions

Issue Links:
Relates
relates to MDEV-14958 Merge new release of InnoDB MySQL 5.7... Closed

 Description   

MySQL 8.0, which was the first MySQL release to include the VATS algorithm that debuted in MariaDB 10.1, includes this bug fix:
BUG#26562371 ASSERTION FAILURE: !LOCK_REC_OTHER_TRX_HOLDS_EX
Please evaluate whether this fix is applicable to MariaDB.



 Comments   
Comment by Thirunarayanan Balathandayuthapani [ 2018-02-16 ]

We can ignore this fix. In MariaDB, we are not updating the age of the transaction if deadlock is involved.
In mariaDB 10.1 code is like the following:

// Move it only when it does not cause a deadlock.
        if (err != DB_DEADLOCK
                && innodb_lock_schedule_algorithm
                        == INNODB_LOCK_SCHEDULE_ALGORITHM_VATS
                && !thd_is_replication_slave_thread(lock->trx->mysql_thd)) {
                space = buf_block_get_space(block);
                page_no = buf_block_get_page_no(block);
                HASH_DELETE(lock_t, hash, lock_sys->rec_hash,
                        lock_rec_fold(space, page_no), lock);
                dberr_t res = lock_rec_insert_by_trx_age(lock);
                if (res != DB_SUCCESS) {
                        return res;
                }
        }

But their patch checks the condition whether the transaction is a deadlock victim. So we can close this issue.

Generated at Thu Feb 08 08:19:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.