Skip to content
Permalink
Browse files

buf_read_ibuf_merge_pages(): Discard all entries for a missing tables…

…pace

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.
  • Loading branch information...
dr-m committed Jun 29, 2017
1 parent 68b5aea commit cd623508dff53c210154392da6c0f65b7b6bcf4c
Showing with 11 additions and 8 deletions.
  1. +11 −8 storage/innobase/buf/buf0rea.cc
@@ -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);

0 comments on commit cd62350

Please sign in to comment.
You can’t perform that action at this time.