List:Commits« Previous MessageNext Message »
From:cpowers Date:April 22 2008 11:33pm
Subject:bk commit into 6.0 tree (cpowers:1.2639) BUG#36269
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of cpowers.  When cpowers 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, 2008-04-22 18:33:52-05:00, cpowers@stripped +1 -0
  Bug#36269: Thread stalls during DBT2 run
  - Stack trace shows 179 threads blocked on a forced scavenge.
  - Removed syncSysDDL shared lock and corrected scavenge cycle bug.

  storage/falcon/Database.cpp@stripped, 2008-04-22 18:33:50-05:00, cpowers@stripped +10 -11
    Database::retireRecords
    - Removed shared lock on syncSysDDL
    - Save scavenge cycle *before* getting exclusive scavenger lock
    - Increment scavengeCycle at the end of scavenging, not before

diff -Nrup a/storage/falcon/Database.cpp b/storage/falcon/Database.cpp
--- a/storage/falcon/Database.cpp	2008-04-11 21:22:42 -05:00
+++ b/storage/falcon/Database.cpp	2008-04-22 18:33:50 -05:00
@@ -1750,24 +1750,19 @@ void Database::scavenge()
 
 void Database::retireRecords(bool forced)
 {
-	// Commit pending system transactions before proceeding
+	int cycle = scavengeCycle;
 	
-	if (!forced && systemConnection->transaction)
-		commitSystemTransaction();
-
-	Sync syncDDL(&syncSysDDL, "Database::retireRecords");
-	syncDDL.lock(Shared);
-
 	Sync syncScavenger(&syncScavenge, "Database::retireRecords");
 	syncScavenger.lock(Exclusive);
 
-	int cycle = scavengeCycle;
-	
 	if (forced && scavengeCycle > cycle)
 		return;
 	
-	++scavengeCycle;
+	// Commit pending system transactions before proceeding
 	
+	if (!forced && systemConnection->transaction)
+		commitSystemTransaction();
+
 	if (forced)
 		Log::log("Forced record scavenge cycle\n");
 	
@@ -1840,7 +1835,9 @@ void Database::retireRecords(bool forced
 		{
 		recordScavenge.scavengeGeneration = UNDEFINED;
 		cleanupRecords (&recordScavenge);
-		
+
+		++scavengeCycle;
+				
 		return;
 		}
 	else
@@ -1849,6 +1846,8 @@ void Database::retireRecords(bool forced
 		cleanupRecords (&recordScavenge);
 		}
 
+	++scavengeCycle;
+	
 	lastRecordMemory = recordDataPool->activeMemory;
 	INTERLOCKED_INCREMENT (currentGeneration);
 }
Thread
bk commit into 6.0 tree (cpowers:1.2639) BUG#36269cpowers23 Apr