Commit cd623508 authored by Marko Mäkelä's avatar Marko Mäkelä

buf_read_ibuf_merge_pages(): Discard all entries for a missing tablespace

A similar change was contributed to Percona XtraBackup, but for some
reason, it is not present in Percona XtraDB. Since MDEV-9566
(MariaDB 10.1.23), that change is present in the MariaDB XtraDB.
parent 68b5aeae
......@@ -813,23 +813,26 @@ buf_read_ibuf_merge_pages(
#endif
for (ulint i = 0; i < n_stored; i++) {
const page_id_t page_id(space_ids[i], page_nos[i]);
buf_pool_t* buf_pool = buf_pool_get(page_id);
bool found;
const page_size_t page_size(fil_space_get_page_size(
space_ids[i], &found));
if (!found) {
tablespace_deleted:
/* The tablespace was not found, remove the
entries for that page */
ibuf_merge_or_delete_for_page(NULL, page_id,
NULL, FALSE);
/* The tablespace was not found: remove all
entries for it */
ibuf_delete_for_discarded_space(space_ids[i]);
while (i + 1 < n_stored
&& space_ids[i + 1] == space_ids[i]) {
i++;
}
continue;
}
const page_id_t page_id(space_ids[i], page_nos[i]);
buf_pool_t* buf_pool = buf_pool_get(page_id);
while (buf_pool->n_pend_reads
> buf_pool->curr_size / BUF_READ_AHEAD_PEND_LIMIT) {
os_thread_sleep(500000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment