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( ...@@ -813,23 +813,26 @@ buf_read_ibuf_merge_pages(
#endif #endif
for (ulint i = 0; i < n_stored; i++) { 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; bool found;
const page_size_t page_size(fil_space_get_page_size( const page_size_t page_size(fil_space_get_page_size(
space_ids[i], &found)); space_ids[i], &found));
if (!found) { if (!found) {
tablespace_deleted: tablespace_deleted:
/* The tablespace was not found, remove the /* The tablespace was not found: remove all
entries for that page */ entries for it */
ibuf_merge_or_delete_for_page(NULL, page_id, ibuf_delete_for_discarded_space(space_ids[i]);
NULL, FALSE); while (i + 1 < n_stored
&& space_ids[i + 1] == space_ids[i]) {
i++;
}
continue; 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 while (buf_pool->n_pend_reads
> buf_pool->curr_size / BUF_READ_AHEAD_PEND_LIMIT) { > buf_pool->curr_size / BUF_READ_AHEAD_PEND_LIMIT) {
os_thread_sleep(500000); 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