mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
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.
This commit is contained in:
parent
68b5aeae4e
commit
cd623508df
1 changed files with 11 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue