List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:October 24 2008 5:35am
Subject:bzr commit into mysql-6.0-falcon-team branch (cpowers:2881) Bug#36631
Bug#38541 Bug#38567 Bug#38569 Bug#39694 Bug#39695 Bug#39696
View as plain text  
#At file:///home/cpowers/work/dev/dev-09/mysql/

 2881 Christopher Powers	2008-10-24
      Bug#36631,"Assertion in SerialLogControl::nextRecord"
      Bug#38541,"Falcon RecordVersion::thaw assertion """"bytesRestored > 0 || data.record == NULL"""
      Bug#38567,"Falcon crash in  Record::getEncodedRecord at Record.cpp:743"
      Bug#38569,"Falcon assertion in SRLUpdateIndex::thaw : type == srlUpdateIndex"
      Bug#39694,"Crash in StorageTable::setRecord during falcon_chill_thaw test"
      Bug#39695,"Crash in SRLUpdateRecords::thaw during falcon_chill_thaw test"
      Bug#39696,"Assertion in Table.cpp (dup->state == recDeleted) fails during falcon_chill_thaw"
      
      Fix 2 of 3 for chill/thaw bugs.
      
      Synchronized record thaw operations using a pool of sync objects in the associated table.
      Record chill operations do not need to be synchronized because chills are performed in one place, and only by the active Transaction.
modified:
  storage/falcon/Record.cpp
  storage/falcon/Record.h
  storage/falcon/RecordVersion.cpp
  storage/falcon/Table.cpp
  storage/falcon/Table.h

per-file messages:
  storage/falcon/Record.cpp
    Added Record::getSyncThaw()
  storage/falcon/Record.h
    Added Record::getSyncThaw()
  storage/falcon/RecordVersion.cpp
    Added exclusive lock to RecordVersion::thaw()
  storage/falcon/Table.cpp
    Added thaw sync object pool. Modeled after syncPrior implementation.
  storage/falcon/Table.h
    Added Table::getSyncThaw()
=== modified file 'storage/falcon/Record.cpp'
--- a/storage/falcon/Record.cpp	2008-10-24 05:06:52 +0000
+++ b/storage/falcon/Record.cpp	2008-10-24 05:35:38 +0000
@@ -971,3 +971,8 @@ SyncObject* Record::getSyncPrior(void)
 {
 	return format->table->getSyncPrior(this);
 }
+
+SyncObject* Record::getSyncThaw(void)
+{
+	return format->table->getSyncThaw(this);
+}

=== modified file 'storage/falcon/Record.h'
--- a/storage/falcon/Record.h	2008-10-24 05:06:52 +0000
+++ b/storage/falcon/Record.h	2008-10-24 05:35:38 +0000
@@ -94,6 +94,7 @@ public:
 	virtual void	serialize(Serialize* stream);
 	virtual int		getSize(void);
 	virtual SyncObject* getSyncPrior(void);
+	virtual SyncObject* getSyncThaw(void);
 
 	const UCHAR*	getEncoding (int index);
 	int				setEncodedRecord(Stream *stream, bool interlocked);

=== modified file 'storage/falcon/RecordVersion.cpp'
--- a/storage/falcon/RecordVersion.cpp	2008-10-24 05:06:52 +0000
+++ b/storage/falcon/RecordVersion.cpp	2008-10-24 05:35:38 +0000
@@ -355,6 +355,9 @@ uint64 RecordVersion::getVirtualOffset()
 
 int RecordVersion::thaw(bool force)
 {
+	Sync syncThaw(format->table->getSyncThaw(this), "RecordVersion::thaw");
+	syncThaw.lock(Exclusive);
+
 	int bytesRestored = 0;
 	Transaction *trans = transaction;
 	

=== modified file 'storage/falcon/Table.cpp'
--- a/storage/falcon/Table.cpp	2008-10-24 05:06:52 +0000
+++ b/storage/falcon/Table.cpp	2008-10-24 05:35:38 +0000
@@ -859,8 +859,12 @@ void Table::init(int id, const char *sch
 	syncTriggers.setName("Table::syncTriggers");
 	syncScavenge.setName("Table::syncScavenge");
 	syncAlter.setName("Table::syncAlter");
+	
 	for (int n = 0; n < SYNC_VERSIONS_SIZE; n++)
 		syncPriorVersions[n].setName("Table::syncPriorVersions");
+	
+	for (int n = 0; n < SYNC_THAW_SIZE; n++)
+		syncThaw[n].setName("Table::syncThaw");
 }
 
 Record* Table::fetch(int32 recordNumber)
@@ -3819,6 +3823,18 @@ SyncObject* Table::getSyncPrior(int reco
 	return syncPriorVersions + lockNumber;
 }
 
+SyncObject* Table::getSyncThaw(Record* record)
+{
+	int lockNumber = record->recordNumber % SYNC_THAW_SIZE;
+	return syncThaw + lockNumber;
+}
+
+SyncObject* Table::getSyncThaw(int recordNumber)
+{
+	int lockNumber = recordNumber % SYNC_THAW_SIZE;
+	return syncThaw + lockNumber;
+}
+
 static bool needUniqueCheck(Index *index, Record *record)
 {
 	Record *oldRecord = record->getPriorVersion();

=== modified file 'storage/falcon/Table.h'
--- a/storage/falcon/Table.h	2008-10-16 02:53:35 +0000
+++ b/storage/falcon/Table.h	2008-10-24 05:35:38 +0000
@@ -43,6 +43,7 @@ static const int PostCommit	= 128;
 static const int BL_SIZE			= 128;
 static const int FORMAT_HASH_SIZE	= 20;
 static const int SYNC_VERSIONS_SIZE	= 16;
+static const int SYNC_THAW_SIZE		= 16;
 
 #define FOR_FIELDS(field,table)	{for (Field *field=table->fields; field; field = field->next){
 #define FOR_INDEXES(index,table)	{for (Index *index=table->indexes; index; index = index->next){
@@ -224,7 +225,8 @@ public:
 	
 	SyncObject*		getSyncPrior(Record* record);
 	SyncObject*		getSyncPrior(int recordNumber);
-	
+	SyncObject*		getSyncThaw(Record* record);
+	SyncObject*		getSyncThaw(int recordNumber);
 
 	Dbb				*dbb;
 	SyncObject		syncObject;
@@ -232,6 +234,7 @@ public:
 	SyncObject		syncScavenge;
 	SyncObject		syncAlter;				// prevent concurrent Alter statements.
 	SyncObject		syncPriorVersions[SYNC_VERSIONS_SIZE];
+	SyncObject		syncThaw[SYNC_THAW_SIZE];
 	Table			*collision;				// Hash collision in database
 	Table			*idCollision;			// mod(id) collision in database
 	Table			*next;					// next in database linked list

Thread
bzr commit into mysql-6.0-falcon-team branch (cpowers:2881) Bug#36631Bug#38541 Bug#38567 Bug#38569 Bug#39694 Bug#39695 Bug#39696Christopher Powers24 Oct