List:Commits« Previous MessageNext Message »
From:Jim Starkey Date:July 12 2007 6:34pm
Subject:bk commit into 6.0-falcon tree (jas:1.2626)
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-12 14:34:26-04:00, jas@stripped +4 -0
  Make non-blocking scavenger conditional.  At the moment,
  it's turned off.

  storage/falcon/RecordLeaf.cpp@stripped, 2007-07-12 14:34:18-04:00, jas@stripped +5 -2
    Make non-blocking scavenger conditional.  At the moment,
    it's turned off.

  storage/falcon/SyncObject.cpp@stripped, 2007-07-12 14:34:18-04:00, jas@stripped +13 -13
    Fix conflicting variable names.  Valid c++, but confusing.

  storage/falcon/Table.cpp@stripped, 2007-07-12 14:34:18-04:00, jas@stripped +11 -1
    Make non-blocking scavenger conditional.  At the moment,
    it's turned off.

  storage/falcon/Table.h@stripped, 2007-07-12 14:34:18-04:00, jas@stripped +1 -1
    Make non-blocking scavenger conditional.  At the moment,
    it's turned off.

# 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.26/storage/falcon/RecordLeaf.cpp	2007-07-12 14:34:35 -04:00
+++ 1.27/storage/falcon/RecordLeaf.cpp	2007-07-12 14:34:35 -04:00
@@ -111,10 +111,12 @@
 
 int RecordLeaf::retireRecords (Table *table, int base, int age, TransId oldestActiveTransaction)
 {
-	Sync sync(&syncObject, "RecordLeaf::retireRecords");
-	sync.lock(Shared);
 	int count = 0;
 	Record **ptr, **end;
+
+#ifdef NON_BLOCKING_SCAVENGING
+	Sync sync(&syncObject, "RecordLeaf::retireRecords");
+	sync.lock(Shared);
 	bool redo = false;
 	
 	for (ptr = records, end = records + RECORD_SLOTS; ptr < end; ++ptr)
@@ -152,6 +154,7 @@
 	sync.unlock();
 	sync.lock(Exclusive);
 	count = 0;
+#endif
 	
 	for (ptr = records, end = records + RECORD_SLOTS; ptr < end; ++ptr)
 		{

--- 1.37/storage/falcon/SyncObject.cpp	2007-07-12 14:34:35 -04:00
+++ 1.38/storage/falcon/SyncObject.cpp	2007-07-12 14:34:35 -04:00
@@ -467,15 +467,15 @@
 	mutex.lock();
 	ASSERT ((waiters && que) || (!waiters && !que));
 	const char *description = NULL;
-	//Thread *thread = NULL;
+	Thread *thread = NULL;
 	
-	for (Thread *thread = que, *prior = NULL, *next; thread; thread = next)
+	for (Thread *waiter = que, *prior = NULL, *next; waiter; waiter = next)
 		{
-		description = thread->description;
+		description = waiter->description;
 		bool granted = false;
-		next = thread->que;
+		next = waiter->que;
 				
-		if (thread->lockType == Shared)
+		if (waiter->lockType == Shared)
 			for (int oldState; (oldState = lockState) >= 0;)
 				{
 				long newState = oldState + 1;
@@ -491,14 +491,14 @@
 				}
 		else
 			{
-			ASSERT(thread->lockType == Exclusive);
+			ASSERT(waiter->lockType == Exclusive);
 			
 			while (lockState == 0)
 				{
 				if (COMPARE_EXCHANGE(&lockState, 0, -1))
 					{
 					granted = true;
-					exclusiveThread = thread;
+					exclusiveThread = waiter;
 					break;
 					}
 				
@@ -513,20 +513,20 @@
 			else
 				que = next;
 			
-			bool shutdownInProgress = thread->shutdownInProgress;
+			bool shutdownInProgress = waiter->shutdownInProgress;
 			
 			if (shutdownInProgress)
 				Thread::lockExitMutex();
 					
 			bumpWaiters(-1);
-			--thread->activeLocks;
-			thread->grantLock (this);
+			--waiter->activeLocks;
+			waiter->grantLock (this);
 			
 			if (shutdownInProgress)
 				Thread::unlockExitMutex();
 			}
 		else
-			prior = thread;
+			prior = waiter;
 		}
 			
 	mutex.release();
@@ -622,8 +622,8 @@
 {
 	SyncObject *syncObject;
 	
-	for (int n = 1; n < MAX_SYNC_OBJECTS; ++n)
-		if ( (syncObject = syncObjects[n]) && syncObject->where)
+	for (int index = 1; index < MAX_SYNC_OBJECTS; ++index)
+		if ( (syncObject = syncObjects[index]) && syncObject->where)
 			{
 			int n = 0;
 			infoTable->putString(n++, syncObject->where);

--- 1.129/storage/falcon/Table.cpp	2007-07-12 14:34:35 -04:00
+++ 1.130/storage/falcon/Table.cpp	2007-07-12 14:34:35 -04:00
@@ -1514,7 +1514,13 @@
 	scavenge.lock(Exclusive);
 
 	Sync sync(&syncObject, "Table::retireRecords");
+
+#ifdef NON_BLOCKING_SCAVENGING
 	sync.lock(Shared);
+#else
+	sync.lock(Exclusive);
+#endif
+
 	activeVersions = false;
 	int count = records->retireRecords(this, 0, age, oldestActiveTransaction);
 
@@ -1707,10 +1713,14 @@
 		recordNumber = (recordNumber == ZERO_REPOSITORY_PLACE) ? 0 : -recordNumber;
 
 	ASSERT(section);
+
+#ifndef NON_BLOCKING_SCAVENGING
+	// This probably isn't necessary, ever
 	Sync sync(&syncObject, "Table::expungeBlob");
 	sync.lock(Exclusive);
+#endif
+
 	dbb->updateRecord(section, recordNumber, NULL, NULL, true);
-	//dbb->updateRecord(section, recordNumber, NULL, NULL, false);
 	dbb->expungeRecord(section, recordNumber);
 }
 

--- 1.29/storage/falcon/Table.h	2007-07-12 14:34:35 -04:00
+++ 1.30/storage/falcon/Table.h	2007-07-12 14:34:35 -04:00
@@ -39,7 +39,7 @@
 static const int PreCommit	= 64;
 static const int PostCommit	= 128;
 
-
+//#define NON_BLOCKING_SCAVENGING
 #define FORMAT_HASH_SIZE		20
 #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){
Thread
bk commit into 6.0-falcon tree (jas:1.2626)Jim Starkey12 Jul