[MDEV-15104] Remove trx_sys_t::rw_trx_ids and trx_sys_t::serialisation_list Created: 2018-01-28 Updated: 2023-12-19 Resolved: 2018-01-31 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 10.3.5 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Epic Link: | arm64 optimization | ||||||||||||||||||||||||||||||||||||
| Sprint: | 10.2.13 | ||||||||||||||||||||||||||||||||||||
| Description |
|
Take snapshot of registered read-write transaction identifiers directly Downside of this approach is bigger overhead for view opening, because Currently we still take trx_sys.mutex to serialise ReadView creation. Compared to previous implementation removing element from rw_trx_hash serialisation_list was supposed to instantly give minimum registered Since we already take MVCC snapshot by iterating trx_sys_t::rw_trx_hash, |
| Comments |
| Comment by Sergey Vojtovich [ 2018-01-28 ] |
|
marko, please review patches for this task: https://github.com/MariaDB/server/commits/bb-10.3-arm |
| Comment by Marko Mäkelä [ 2018-01-29 ] |
|
This looks OK, except for a possible race or starvation where we fail to update the max_trx_id in the TRX_SYS page before writing newer trx_id values to undo logs. I think that a proper fix to that is to do the equivalent of SELECT MAX(trx_id) FROM undo_logs on startup, and only when there are no undo logs (not even to purge), read the value from the TRX_SYS page. (And only write to the TRX_SYS page when trx_undo_truncate_start() discards the last undo log.) |
| Comment by Marko Mäkelä [ 2018-01-31 ] |
|
Thank you! Very good work. |
| Comment by Marko Mäkelä [ 2018-01-31 ] |
|
For the record, |
| Comment by zhai weixiang [ 2018-02-08 ] |
|
I got an assertion while running benchmark.(50% update-non-index, 50% select-on-pk), not sure if it relates to this change. ersion: '10.3.5-MariaDB-rds-dev' socket: '/u01/maria/run/mysql.sock' port: 3306 Source distribution the latest commit is 029ab11cc883d486117f30900c787c4b2765b742 |
| Comment by Marko Mäkelä [ 2018-02-08 ] |
|
zhaiwx1987, sorry, we forgot to update this ticket to inform of this problem that axel found out when running benchmarks (actually to evaluate if
Please revert this commit, or test with its parent. axel ran benchmarks with is parent over last weekend, and did not report of any crashes. |
| Comment by zhai weixiang [ 2018-02-08 ] |
|
Hi, Marko, thank you for your reply, |
| Comment by Sergey Vojtovich [ 2018-02-08 ] |
|
zhaiwx1987, it was agreed to use server coding style in new InnoDB code. |