List:Commits« Previous MessageNext Message »
From:cpowers Date:November 15 2007 8:30pm
Subject:bk commit into 6.0 tree (chris:1.2679) BUG#32413
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, 2007-11-15 13:30:13-06:00, chris@stripped +4 -0
  Bug#32413, "Memory usage not constrained by falcon_record_memory_max, assertion failure"
  
  - Changed MemRecordMgrSetMaxRecordMember() to allow dynamic changes to
falcon_record_memory_max.
  - Correct thawed byte accounting.

  storage/falcon/MemMgr.cpp@stripped, 2007-11-15 13:30:11-06:00, chris@stripped +2 -1
    Modified MemMgrSetMaxRecordMember() to accept post-initialization updates to 
    falcon_record_memory_max.

  storage/falcon/SRLUpdateRecords.cpp@stripped, 2007-11-15 13:30:11-06:00, chris@stripped
+5 -1
    Corrected thawed byte count. SRLUpdateRecords::thaw() returned a byte count
    for records that have already been thawed, throwing off the count. 

  storage/falcon/SRLUpdateRecords.h@stripped, 2007-11-15 13:30:11-06:00, chris@stripped
+1 -1
    Added "thawed" boolean argument to thaw().

  storage/falcon/Transaction.cpp@stripped, 2007-11-15 13:30:11-06:00, chris@stripped +5
-6
    Corrected thawed byte count. SRLUpdateRecords::thaw() returned a byte count
    for records that have already been thawed, throwing off the count.
    Transaction::thaw() now checks the byte count and a 'thawed' boolean before
    updating the accumulated totals.

diff -Nrup a/storage/falcon/MemMgr.cpp b/storage/falcon/MemMgr.cpp
--- a/storage/falcon/MemMgr.cpp	2007-11-12 14:30:08 -06:00
+++ b/storage/falcon/MemMgr.cpp	2007-11-15 13:30:11 -06:00
@@ -233,10 +233,11 @@ void MemMgrSetMaxRecordMember (long long
 	{
 	if (!recordManager.memControl)
 		{
-		memControl.setMaxSize(size);
 		memControl.addPool(&recordManager);
 		//memControl.addPool(&recordObjectManager);
 		}
+		
+		memControl.setMaxSize(size);
 	}
 
 MemMgr*	MemMgrGetFixedPool (int id)
diff -Nrup a/storage/falcon/SRLUpdateRecords.cpp b/storage/falcon/SRLUpdateRecords.cpp
--- a/storage/falcon/SRLUpdateRecords.cpp	2007-10-25 11:32:18 -05:00
+++ b/storage/falcon/SRLUpdateRecords.cpp	2007-11-15 13:30:11 -06:00
@@ -54,8 +54,10 @@ void SRLUpdateRecords::chill(Transaction
 		transaction->totalRecordData -= dataLength;
 }
 
-int SRLUpdateRecords::thaw(RecordVersion *record)
+int SRLUpdateRecords::thaw(RecordVersion *record, bool *thawed)
 {
+	*thawed = false;
+	
 	// Nothing to do if record is no longer chilled
 	
 	if (record->state != recChilled)
@@ -104,6 +106,8 @@ int SRLUpdateRecords::thaw(RecordVersion
 		log->chilledBytes -= bytesReallocated;
 	else
 		log->chilledBytes = 0;
+	
+	*thawed = true;
 	
 	return bytesReallocated;
 }
diff -Nrup a/storage/falcon/SRLUpdateRecords.h b/storage/falcon/SRLUpdateRecords.h
--- a/storage/falcon/SRLUpdateRecords.h	2007-09-20 10:42:26 -05:00
+++ b/storage/falcon/SRLUpdateRecords.h	2007-11-15 13:30:11 -06:00
@@ -34,7 +34,7 @@ public:
 	virtual void	pass2(void);
 	void			append(Transaction *transaction, RecordVersion *records, bool chillRecords =
false);
 	void			chill(Transaction *transaction, RecordVersion *record, uint dataLength);
-	int				thaw(RecordVersion *record);
+	int				thaw(RecordVersion *record, bool *thawed);
 	
 	const UCHAR		*data;
 	int				tableSpaceId;
diff -Nrup a/storage/falcon/Transaction.cpp b/storage/falcon/Transaction.cpp
--- a/storage/falcon/Transaction.cpp	2007-11-13 16:09:37 -06:00
+++ b/storage/falcon/Transaction.cpp	2007-11-15 13:30:11 -06:00
@@ -527,12 +527,10 @@ void Transaction::chillRecords()
 
 int Transaction::thaw(RecordVersion * record)
 {
-	int bytesRestored;
-
 	// Nothing to do if record is no longer chilled
 	
 	if (record->state != recChilled)
-		return(record->size);
+		return record->size;
 		
 	// Get pointer to record data in serial log
 
@@ -541,9 +539,10 @@ int Transaction::thaw(RecordVersion * re
 	// Thaw the record then update the total record data bytes for this transaction
 	
 	ASSERT(record->transactionId == transactionId);
-	bytesRestored = control.updateRecords.thaw(record);
+	bool thawed;
+	int bytesRestored = control.updateRecords.thaw(record, &thawed);
 	
-	if (bytesRestored > 0)
+	if (bytesRestored > 0 && thawed)
 		{
 		totalRecordData += bytesRestored;
 		thawedRecords++;
@@ -561,7 +560,7 @@ int Transaction::thaw(RecordVersion * re
 		debugThawedBytes = 0;
 		}
 	
-	return (bytesRestored);
+	return bytesRestored;
 }
 
 void Transaction::thaw(DeferredIndex * deferredIndex)
Thread
bk commit into 6.0 tree (chris:1.2679) BUG#32413cpowers15 Nov