summaryrefslogtreecommitdiff
path: root/BUILD/SETUP.sh
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-10-04 11:48:45 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-10-04 11:48:45 +0300
commit18dee4363b839ab9441167e5a41a7f4f1d249650 (patch)
treed96241eb0d67190b3f311be68b60aa62ce1d7e88 /BUILD/SETUP.sh
parent5e65c67cfcc79c48c22798babee7555b04f40d18 (diff)
downloadmariadb-git-bb-10.2-MDEV-19344.tar.gz
MDEV-19344 InnoDB purge buffering may corrupt a pagebb-10.2-MDEV-19344
MySQL 5.5 introduced the ability of InnoDB to buffer delete-mark and delete operations (the insert buffer was generalized to the change buffer). These operations were only buffered on DELETE, UPDATE (of a key) and the purge of history of committed transactions. We never buffered anything on ROLLBACK; it could have been beneficial for rolling back a large recovered transaction. The delete-mark buffering appears to work fine, but there are problems with the purge buffering. MySQL Bug #61104 InnoDB: Failing assertion: page_get_n_recs(page) > 1 reported a problem with the purge buffering: an index page could become empty, which essentially means that the secondary index becomes corrupted. At MariaDB, we got closer to the root cause, by making a failure repeatable with innodb.innodb-change-buffer-recovery-innodb when an additional debug assertion is present. page_header_set_field(): Enable the assertion that PAGE_N_RECS must never be set to 0. (This function will not be invoked when initializing an empty page. If an index page is empty, it must be the root page, and the table must be empty. No changes to the root page are ever buffered.) A combination of two asynchronous, inherently nondeterministic operations (purge and change buffering) is difficult to cover in tests or to reason about. The purge buffering required a complex mechanism in the buffer pool, the buffer pool watch. If we no longer buffer purge operations, we can remove the watch as well. We fix this by ceasing to buffer delete (purge) operations, that is, by treating innodb_change_buffering=all (the default) in the same way as innodb_change_buffering=changes and treating innodb_change_buffering=purges in the same way as innodb_change_buffering=deletes. MDEV-16260 will attempt to improve the performance of purge in a more controlled fashion by scaling the effort according to the workload. We will retain the code that merges buffered purge operations, so that upgrades from older versions will be possible. BTR_DELETE_OP, BTR_DELETE, BUF_BLOCK_POOL_WATCH, BUF_GET_IF_IN_POOL_OR_WATCH, BUF_POOL_WATCH_SIZE, ROW_NOT_DELETED_REF: Remove. btr_cur_t::purge_node, buf_pool_t::watch: Remove. ibuf_get_volume_buffered_hash(): Remove. It is no longer necessary to estimate whether the page could become empty.
Diffstat (limited to 'BUILD/SETUP.sh')
0 files changed, 0 insertions, 0 deletions