ndb dd -

Fix bug where page is read, modified and then transaction abort
  and then puge is flushed causing lsn on page to be 0
parent 0764e94d
......@@ -1330,6 +1330,24 @@ Pgman::fsreadconf(Signal* signal, Ptr<Page_entry> ptr)
state |= Page_entry::MAPPED;
set_page_state(ptr, state);
{
/**
* Update lsn record on page
* as it can be modified/flushed wo/ update_lsn has been called
* (e.g. prealloc) and it then would get lsn 0, which is bad
* when running undo and following SR
*/
Ptr<GlobalPage> pagePtr;
m_global_page_pool.getPtr(pagePtr, ptr.p->m_real_page_i);
File_formats::Datafile::Data_page* page =
(File_formats::Datafile::Data_page*)pagePtr.p;
Uint64 lsn = 0;
lsn += page->m_page_header.m_page_lsn_hi; lsn <<= 32;
lsn += page->m_page_header.m_page_lsn_lo;
ptr.p->m_lsn = lsn;
}
ndbrequire(m_stats.m_current_io_waits > 0);
m_stats.m_current_io_waits--;
......
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