ndb - bug#29176 pgman: another missing stack pruning related to drop table

parent 0510a696
...@@ -695,7 +695,14 @@ Pgman::lirs_reference(Ptr<Page_entry> ptr) ...@@ -695,7 +695,14 @@ Pgman::lirs_reference(Ptr<Page_entry> ptr)
if (state & Page_entry::ONSTACK) if (state & Page_entry::ONSTACK)
{ {
jam(); jam();
bool at_bottom = ! pl_stack.hasPrev(ptr);
pl_stack.remove(ptr); pl_stack.remove(ptr);
if (at_bottom)
{
jam();
ndbassert(state & Page_entry::HOT);
lirs_stack_prune();
}
} }
pl_stack.add(ptr); pl_stack.add(ptr);
state |= Page_entry::ONSTACK; state |= Page_entry::ONSTACK;
...@@ -1891,9 +1898,10 @@ Pgman::drop_page(Ptr<Page_entry> ptr) ...@@ -1891,9 +1898,10 @@ Pgman::drop_page(Ptr<Page_entry> ptr)
bool at_bottom = ! pl_stack.hasPrev(ptr); bool at_bottom = ! pl_stack.hasPrev(ptr);
pl_stack.remove(ptr); pl_stack.remove(ptr);
state &= ~ Page_entry::ONSTACK; state &= ~ Page_entry::ONSTACK;
if (at_bottom && (state & Page_entry::HOT)) if (at_bottom)
{ {
jam(); jam();
ndbassert(state & Page_entry::HOT);
lirs_stack_prune(); lirs_stack_prune();
} }
} }
...@@ -1905,6 +1913,7 @@ Pgman::drop_page(Ptr<Page_entry> ptr) ...@@ -1905,6 +1913,7 @@ Pgman::drop_page(Ptr<Page_entry> ptr)
state &= ~ Page_entry::ONQUEUE; state &= ~ Page_entry::ONQUEUE;
} }
ndbassert(ptr.p->m_real_page_i != RNIL);
if (ptr.p->m_real_page_i != RNIL) if (ptr.p->m_real_page_i != RNIL)
{ {
jam(); jam();
......
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