List:Commits« Previous MessageNext Message »
From:jonas Date:August 21 2006 7:26am
Subject:bk commit into 5.1 tree (jonas:1.2274) BUG#21710
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-08-21 09:26:52+02:00, jonas@stripped +1 -0
  ndb - bug#21710
    fix bug in drop_file during pageout (LCP)

  storage/ndb/src/kernel/blocks/pgman.cpp@stripped, 2006-08-21 09:26:50+02:00, jonas@stripped +19 -6
    1) Allow Page_entry::REQUEST, when dropping page (in drop_file path)
    2) Do all IO JBA
    3) Handle PAGEOUT during drop_file (caused by LCP)

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-work

--- 1.16/storage/ndb/src/kernel/blocks/pgman.cpp	2006-08-21 09:26:56 +02:00
+++ 1.17/storage/ndb/src/kernel/blocks/pgman.cpp	2006-08-21 09:26:56 +02:00
@@ -442,13 +442,15 @@
 #endif
   Page_state state = ptr.p->m_state;
 
-  ndbrequire(! (state & Page_entry::REQUEST));
   ndbrequire(ptr.p->m_requests.isEmpty());
 
   ndbrequire(! (state & Page_entry::ONSTACK));
   ndbrequire(! (state & Page_entry::ONQUEUE));
   ndbrequire(ptr.p->m_real_page_i == RNIL);
 
+  if (! (state & Page_entry::LOCKED))
+    ndbrequire(! (state & Page_entry::REQUEST));
+  
   set_page_state(ptr, 0);
   m_page_hashlist.remove(ptr);
   m_page_entry_pool.release(ptr);
@@ -1476,7 +1478,7 @@
 				FsReadWriteReq::fsFormatGlobalPage);
   req->data.pageData[0] = ptr.p->m_real_page_i;
   sendSignal(NDBFS_REF, GSN_FSREADREQ, signal,
-	     FsReadWriteReq::FixedLength + 1, JBB);
+	     FsReadWriteReq::FixedLength + 1, JBA);
 }
 
 void
@@ -1518,8 +1520,19 @@
   FsReadWriteReq::setFormatFlag(req->operationFlag,
 				FsReadWriteReq::fsFormatGlobalPage);
   req->data.pageData[0] = ptr.p->m_real_page_i;
+
+#if ERROR_INSERT_CODE
+  if (ptr.p->m_state & Page_entry::LOCKED)
+  {
+    sendSignalWithDelay(NDBFS_REF, GSN_FSWRITEREQ, signal,
+			3000, FsReadWriteReq::FixedLength + 1);
+    ndbout_c("pageout locked (3s)");
+    return;
+  }
+#endif
+  
   sendSignal(NDBFS_REF, GSN_FSWRITEREQ, signal,
-	     FsReadWriteReq::FixedLength + 1, JBB);
+	     FsReadWriteReq::FixedLength + 1, JBA);
 }
 
 void
@@ -1635,8 +1648,8 @@
       return ptr.p->m_real_page_i;
     }
   }
-  
-  if (! (req_flags & Page_request::LOCK_PAGE))
+
+  if (! (req_flags & (Page_request::LOCK_PAGE | Page_request::UNLOCK_PAGE)))
   {
     ndbrequire(! (state & Page_entry::LOCKED));
   }
@@ -1675,7 +1688,7 @@
 
   if (req_flags & Page_request::UNLOCK_PAGE)
   {
-    state &= ~ Page_entry::LOCKED;
+    // keep it locked
   }
   
   ptr.p->m_busy_count += busy_count;
Thread
bk commit into 5.1 tree (jonas:1.2274) BUG#21710jonas21 Aug