List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:November 26 2009 7:22pm
Subject:bzr commit into mysql-5.1-telco-6.2 branch (pekka:3039) Bug#48910
View as plain text  
#At file:///export/space/pekka/ndb/version/my51-bug48910/ based on revid:pekka@stripped

 3039 Pekka Nousiainen	2009-11-26
      bug#48910 02_pgman.diff
      In process_callback() sync REQUEST state before set_page_state().
      Fixes assert "has_req == has_req2".

    modified:
      storage/ndb/src/kernel/blocks/pgman.cpp
=== modified file 'storage/ndb/src/kernel/blocks/pgman.cpp'
--- a/storage/ndb/src/kernel/blocks/pgman.cpp	2009-11-26 19:21:10 +0000
+++ b/storage/ndb/src/kernel/blocks/pgman.cpp	2009-11-26 19:22:12 +0000
@@ -1047,11 +1047,11 @@ Pgman::process_callback(Signal* signal, 
   debugOut << "PGMAN: " << ptr << " : process_callback" << endl;
 #endif
   int max_count = 1;
-  Page_state state = ptr.p->m_state;
 
   while (! ptr.p->m_requests.isEmpty() && --max_count >= 0)
   {
     jam();
+    Page_state state = ptr.p->m_state;
     SimulatedBlock* b;
     Callback callback;
     {
@@ -1093,19 +1093,18 @@ Pgman::process_callback(Signal* signal, 
     }
     ndbrequire(state & Page_entry::BOUND);
     ndbrequire(state & Page_entry::MAPPED);
+
+    // make REQUEST state consistent before set_page_state()
+    if (ptr.p->m_requests.isEmpty())
+    {
+      jam();
+      state &= ~ Page_entry::REQUEST;
+    }
     
     // callback may re-enter PGMAN and change page state
     set_page_state(ptr, state);
     b->execute(signal, callback, ptr.p->m_real_page_i);
-    state = ptr.p->m_state;
-  }
-  
-  if (ptr.p->m_requests.isEmpty())
-  {
-    jam();
-    state &= ~ Page_entry::REQUEST;
   }
-  set_page_state(ptr, state);
   return true;
 }
 


Attachment: [text/bzr-bundle] bzr/pekka@mysql.com-20091126192212-cez5l2e5yt22s2t6.bundle
Thread
bzr commit into mysql-5.1-telco-6.2 branch (pekka:3039) Bug#48910Pekka Nousiainen26 Nov