[MDEV-30021] FK actions are ignored after tc_purge and COMMIT Created: 2022-11-16 Updated: 2023-12-15 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.6 |
| Fix Version/s: | 10.5, 10.6, 10.11, 11.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Nikita Malyavin | Assignee: | Nikita Malyavin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Description |
|
To reproduce, please specify
Another suitable alternative to BACKUP STAGE can be FLUSH TABLES. The table affected by a transaction is removed on COMMIT in lock_release(). |
| Comments |
| Comment by Marko Mäkelä [ 2022-11-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
I can reproduce this with the following:
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2022-11-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
This bug is represented as an assertion failure in f3cc51e4 (MDEV-29181), as was found by the latest RQG | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2022-11-16 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
AS far as I understand the idea of innodb_evict_tables_on_commit_debug, it is used to imitate eviction in a cheap way. So I see a few ways of fixing it. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2022-12-09 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Approach #3 wouldn't save us from a parallel FLUSH+evict. What could be done is a reference count could be increased once the tables are loaded, but then DROP-ing a referenced table under FOREIGN_KEYS_CHECK=off wouldn't work. Approach#2 would required a significant change in eviction logic. Besides, TRUNCATE/DROP will do it without waiting for release. So I went by approach #1. There code base already was expecting this possible, but with some issues, see MDEV-30103 . marko please review commit 4021d847e, branch bb-10.6-MDEV-29181 | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2022-12-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
This look OK to me. Please wait for stress test results. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2023-01-26 ] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
This was tested OK, according to a comment in MDEV-29181. |