Skip to content

Commit

Permalink
Merge pull request #5268 from satya-bodapati/trunk
Browse files Browse the repository at this point in the history
Innovation/trunk: PS-9107 : [ERROR] [MY-013183] [InnoDB] Assertion failure: ibuf0ibuf.c…
  • Loading branch information
satya-bodapati authored Mar 22, 2024
2 parents ffc9e0d + bf142d4 commit 827eac6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion storage/innobase/ibuf/ibuf0ibuf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ this program; if not, write to the Free Software Foundation, Inc.,
#include "sync0sync.h"

#include "my_dbug.h"
#include "scope_guard.h"

#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
bool srv_ibuf_disable_background_merge;
Expand Down Expand Up @@ -3812,7 +3813,14 @@ static bool ibuf_restore_pos(
return true;
}

if (fil_space_get_flags(space) == UINT32_UNDEFINED) {
/* Check if the tablespace is dropped. */
fil_space_t *sp = fil_space_acquire_silent(space);

auto guard = create_scope_guard([&]() {
if (sp != nullptr) fil_space_release(sp);
});

if (sp == nullptr || sp->flags == UINT32_UNDEFINED) {
/* The tablespace has been dropped. It is possible
that another thread has deleted the insert buffer
entry. Do not complain. */
Expand Down

0 comments on commit 827eac6

Please sign in to comment.