[MDEV-22701] InnoDB: encapsulate trx_sys.mutex and trx_sys.trx_list into a separate class Created: 2020-05-25 Updated: 2020-06-24 Resolved: 2020-06-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 10.5.5 |
| Type: | Task | Priority: | Minor |
| Reporter: | Sergey Vojtovich | Assignee: | Eugene Kosov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Epic Link: | InnoDB trx_sys improvements |
| Description |
|
This should be doable when |
| Comments |
| Comment by Marko Mäkelä [ 2020-06-17 ] | |||||
|
As part of this cleanup, I think that it is acceptable to move trx_sys.mutex to somewhere else, but in 10.5, we must not change either the type of that mutex or the access patterns. In particular, innobase_kill_query() must hold both the equivalent of trx_sys.mutex and the trx_t::mutex. In some cases, the state change of trx_t::commit_in_memory() is only protected indirectly by trx_sys.mutex. | |||||
| Comment by Sergey Vojtovich [ 2020-06-17 ] | |||||
|
I don't see innobase_kill_query() taking trx_sys.mutex. Or was that added recently? | |||||
| Comment by Sergey Vojtovich [ 2020-06-17 ] | |||||
|
I see. Though I don't see how it fixes the problem: what if trx gets released to the pool before these mutexes are locked? | |||||
| Comment by Marko Mäkelä [ 2020-06-18 ] | |||||
|
svoj, yes, the code was changed recently in order to fix https://github.com/MariaDB/server/commit/96f7a64d8ce4a6ddb84036c024c83a51cc2b8d89 looks OK to me with the following changes:
|