List:Commits« Previous MessageNext Message »
From:Jim Starkey Date:July 3 2007 5:20pm
Subject:bk commit into 6.0-falcon tree (jas:1.2585)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0-falcon repository of jas. When jas 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-07-03 13:20:39-04:00, jas@stripped +3 -0
  Turning on SyncObject backlog; fixed some inadvertent
  assertiong failures in the serial log.

  storage/falcon/SerialLog.cpp@stripped, 2007-07-03 11:03:55-04:00, jas@stripped +4 -0
    Lock serial log write lock during recoverying and initialization
    to avoid an assertion failure for absence of an exclusive lock
    when advancing the write window.

  storage/falcon/SyncObject.cpp@stripped, 2007-07-03 11:03:55-04:00, jas@stripped +6 -6
    A little tuning on SyncObject.

  storage/falcon/SyncTest.h@stripped, 2007-07-03 11:03:56-04:00, jas@stripped +2 -0
    Provision to track collisions.

# 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:	jas
# Host:	fluffy.netfrastructure.com
# Root:	/home/mysql/mysql-5.1-falcon

--- 1.1/storage/falcon/SyncTest.h	2007-07-03 13:20:46 -04:00
+++ 1.2/storage/falcon/SyncTest.h	2007-07-03 13:20:46 -04:00
@@ -36,6 +36,8 @@
 	bool		stop;
 	bool		ready;
 	int			count;
+	int			lockCollisions;
+	int			unlockCollisions;
 	SyncTest	*parent;
 	SyncObject	starter;
 	SyncObject	syncObject;

--- 1.91/storage/falcon/SerialLog.cpp	2007-07-03 13:20:46 -04:00
+++ 1.92/storage/falcon/SerialLog.cpp	2007-07-03 13:20:46 -04:00
@@ -216,6 +216,8 @@
 void SerialLog::recover()
 {
 	Log::log("Recovering database %s ...\n", (const char*) defaultDbb->fileName);
+	Sync sync(&syncWrite, "SerialLog::recover");
+	sync.lock(Exclusive);
 	//defaultDbb->setRecovering(true);
 	recovering = true;
 	recoveryPhase = 0;
@@ -735,6 +737,8 @@
 
 void SerialLog::initializeLog(int64 blockNumber)
 {
+	Sync sync(&syncWrite, "SerialLog::initializeLog");
+	sync.lock(Exclusive);
 	nextBlockNumber = blockNumber;
 	writeWindow = allocWindow(file1, 0);
 	writeWindow->firstBlockNumber = nextBlockNumber;

--- 1.31/storage/falcon/SyncObject.cpp	2007-07-03 13:20:46 -04:00
+++ 1.32/storage/falcon/SyncObject.cpp	2007-07-03 13:20:46 -04:00
@@ -150,10 +150,11 @@
 			if (COMPARE_EXCHANGE(&lockState, oldState, newState))
 				return;
 			
-			if (!thread)
+			if (thread)
+				thread->sleep(1);
+			else
 				thread = Thread::getThread("SyncObject::lock");
 			
-			thread->sleep(1);
 			}
 
 		mutex.lock();
@@ -270,12 +271,11 @@
 				
 			return;
 			}
-
 			
-		if (!thread)
+		if (thread)
+			thread->sleep(1);
+		else
 			thread = Thread::getThread("SyncObject::lock");
-		
-		thread->sleep(1);
 		}
 }
 
Thread
bk commit into 6.0-falcon tree (jas:1.2585)Jim Starkey3 Jul