#At file:///export/space/pekka/ndb/version/my51-bug48910/ based on revid:pekka@stripped
3038 Pekka Nousiainen 2009-11-26
bug#48910 01_pgman.diff
Assert verify_page_entry() at end of each set_page_state().
Add hot stack bottom assert to verify_page_entry().
NOTE: The asserts are fixed in patches 02-06.
modified:
storage/ndb/src/kernel/blocks/pgman.cpp
storage/ndb/src/kernel/blocks/pgman.hpp
=== modified file 'storage/ndb/src/kernel/blocks/pgman.cpp'
--- a/storage/ndb/src/kernel/blocks/pgman.cpp 2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/kernel/blocks/pgman.cpp 2009-11-26 19:21:10 +0000
@@ -354,6 +354,7 @@ Pgman::set_page_state(Ptr<Page_entry> pt
#ifdef VM_TRACE
debugOut << "PGMAN: " << ptr << ": after" << endl;
+ verify_page_entry(ptr);
debugOut << "PGMAN: <set_page_state" << endl;
#endif
}
@@ -1977,6 +1978,8 @@ Pgman::drop_page(Ptr<Page_entry> ptr)
void
Pgman::verify_page_entry(Ptr<Page_entry> ptr)
{
+ Page_stack& pl_stack = m_page_stack;
+
Uint32 ptrI = ptr.i;
Page_state state = ptr.p->m_state;
@@ -1999,6 +2002,10 @@ Pgman::verify_page_entry(Ptr<Page_entry>
// hot entry must be on stack
ndbrequire(! is_hot || on_stack || dump_page_lists(ptrI));
+ // stack bottom is hot
+ bool at_bottom = on_stack && ! pl_stack.hasPrev(ptr);
+ ndbrequire(! at_bottom || is_hot || dump_page_lists(ptrI));
+
bool on_queue = state & Page_entry::ONQUEUE;
// hot entry is not on queue
ndbrequire(! is_hot || ! on_queue || dump_page_lists(ptrI));
=== modified file 'storage/ndb/src/kernel/blocks/pgman.hpp'
--- a/storage/ndb/src/kernel/blocks/pgman.hpp 2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/kernel/blocks/pgman.hpp 2009-11-26 19:21:10 +0000
@@ -54,7 +54,7 @@
* Updating a resident cache page makes it "dirty". A background
* clean-up process makes dirty pages "clean" via "pageout" to disk.
* Write ahead logging (WAL) of the page is done first i.e. UNDO log is
- * flushed up to the page log sequence number (LSN) by calling a TSMAN
+ * flushed up to the page log sequence number (LSN) by calling a LGMAN
* method. The reason for this is obvious but not relevant to PGMAN.
*
* A local check point (LCP) periodically performs a complete pageout of
Attachment: [text/bzr-bundle] bzr/pekka@mysql.com-20091126192110-d4p70b9eb8r9hubz.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-6.2 branch (pekka:3038) Bug#48910 | Pekka Nousiainen | 26 Nov |