List:Commits« Previous MessageNext Message »
From:Kevin Lewis Date:April 9 2009 2:45pm
Subject:bzr commit into mysql-6.0-falcon-team branch (kevin.lewis:3114)
Bug#41661
View as plain text  
#At file:///C:/Work/bzr/Merge/mysql-6.0-falcon-team/ based on revid:hky@stripped

 3114 Kevin Lewis	2009-04-09
      Bug#41661 - A mistake was faound in RecordLeaf::retireRecords.  It makes a call to Record::retire() first and then calls record->getMemUsage().  It should do it the other way around.
       
      In addition, I found that the scavenger thread should also have a CycleLock for each table tht it prunes or retires because these activities can look at priorRecords periodically.

    modified:
      storage/falcon/RecordLeaf.cpp
      storage/falcon/Table.cpp
=== modified file 'storage/falcon/RecordLeaf.cpp'
--- a/storage/falcon/RecordLeaf.cpp	2009-04-07 14:31:04 +0000
+++ b/storage/falcon/RecordLeaf.cpp	2009-04-09 14:45:17 +0000
@@ -203,9 +203,9 @@ void RecordLeaf::retireRecords (Table *t
 			if (   (recordScavenge->canBeRetired(record))
 				&& (COMPARE_EXCHANGE_POINTER(ptr, record, NULL)))
 				{
-				record->retire();
 				++recordScavenge->recordsRetired;
 				recordScavenge->spaceRetired += record->getMemUsage();
+				record->retire();
 				}
 			else
 				{

=== modified file 'storage/falcon/Table.cpp'
--- a/storage/falcon/Table.cpp	2009-04-08 15:36:49 +0000
+++ b/storage/falcon/Table.cpp	2009-04-09 14:45:17 +0000
@@ -1945,6 +1945,7 @@ void Table::pruneRecords(RecordScavenge 
 
 	Sync syncObj(&syncObject, "Table::pruneRecords");
 	syncObj.lock(Shared);
+	CycleLock cyleLock(database);
 
 	if (records)
 		records->pruneRecords(this, 0, recordScavenge);
@@ -1957,6 +1958,7 @@ void Table::retireRecords(RecordScavenge
 
 	Sync syncObj(&syncObject, "Table::retireRecords");
 	syncObj.lock(Shared);
+	CycleLock cyleLock(database);
 
 	if (!records)
 		return;


Attachment: [text/bzr-bundle] bzr/kevin.lewis@sun.com-20090409144517-vor0khtrwnlqltb2.bundle
Thread
bzr commit into mysql-6.0-falcon-team branch (kevin.lewis:3114)Bug#41661Kevin Lewis9 Apr