Commit e4690b1d authored by marko's avatar marko

branches/zip: ibuf_merge_or_delete_for_page(): Check for

ibuf_fixed_addr_page() and fsp_descr_page() before invoking
fil_inc_pending_ibuf_merges().  That function call should
always be paired with a call to fil_decr_pending_ibuf_merges().
parent 9c6947fd
......@@ -3157,6 +3157,14 @@ ibuf_merge_or_delete_for_page(
}
if (update_ibuf_bitmap) {
zip_size = fil_space_get_zip_size(space);
ut_a(ut_is_2pow(zip_size));
if (ibuf_fixed_addr_page(space, zip_size, page_no)
|| fsp_descr_page(zip_size, page_no)) {
return;
}
/* If the following returns FALSE, we get the counter
incremented, and must decrement it when we leave this
function. When the counter is > 0, that prevents tablespace
......@@ -3170,10 +3178,27 @@ ibuf_merge_or_delete_for_page(
page = NULL;
update_ibuf_bitmap = FALSE;
}
}
} else {
mtr_start(&mtr);
bitmap_page = ibuf_bitmap_get_map_page(space, page_no,
zip_size, &mtr);
if (!ibuf_bitmap_page_get_bits(bitmap_page, page_no,
zip_size,
IBUF_BITMAP_BUFFERED,
&mtr)) {
/* No inserts buffered for this page */
mtr_commit(&mtr);
if (!tablespace_being_deleted) {
fil_decr_pending_ibuf_merges(space);
}
if (update_ibuf_bitmap || page) {
return;
}
mtr_commit(&mtr);
}
} else if (page) {
zip_size = fil_space_get_zip_size(space);
ut_a(ut_is_2pow(zip_size));
......@@ -3183,25 +3208,6 @@ ibuf_merge_or_delete_for_page(
}
}
if (update_ibuf_bitmap) {
mtr_start(&mtr);
bitmap_page = ibuf_bitmap_get_map_page(space, page_no,
zip_size, &mtr);
if (!ibuf_bitmap_page_get_bits(bitmap_page, page_no, zip_size,
IBUF_BITMAP_BUFFERED, &mtr)) {
/* No inserts buffered for this page */
mtr_commit(&mtr);
if (!tablespace_being_deleted) {
fil_decr_pending_ibuf_merges(space);
}
return;
}
mtr_commit(&mtr);
}
/* Currently the insert buffer of space 0 takes care of inserts to all
tablespaces */
......
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