List:Commits« Previous MessageNext Message »
From:U-ROWVWADEjas Date:June 12 2007 7:39pm
Subject:bk commit into 6.0-falcon tree (jas:1.2562)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0-falcon repository of . When  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-06-12 13:39:30-04:00, jas@rowvwade. +6 -0
  Report I/O statistics for all active table spaces, not just
  primary table space.

  storage/falcon/Configuration.cpp@stripped, 2007-06-12 13:39:21-04:00, jas@rowvwade. +12 -6
    Stylistic edit for clarity.

  storage/falcon/Database.cpp@stripped, 2007-06-12 13:39:22-04:00, jas@rowvwade. +2 -1
    Report I/O statistics for all active table spaces, not just
    primary table space.

  storage/falcon/StorageHandler.cpp@stripped, 2007-06-12 13:39:22-04:00, jas@rowvwade. +1 -1
    Don't roll over temporary table space every server restart.  We
    need something, but every time isn't the answer.

  storage/falcon/StorageHandler.h@stripped, 2007-06-12 13:39:22-04:00, jas@rowvwade. +1 -0
    Define macro for temporary table space filename.

  storage/falcon/TableSpaceManager.cpp@stripped, 2007-06-12 13:39:23-04:00, jas@rowvwade. +28
-12
    Report I/O statistics for all active table spaces, not just
    primary table space.

  storage/falcon/TableSpaceManager.h@stripped, 2007-06-12 13:39:23-04:00, jas@rowvwade. +13 -10
    Report I/O statistics for all active table spaces, not just
    primary table space.

# 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:	rowvwade.
# Root:	D:/MySQL/mysql-5.1-falcon

--- 1.33/storage/falcon/StorageHandler.cpp	2007-06-12 13:39:52 -04:00
+++ 1.34/storage/falcon/StorageHandler.cpp	2007-06-12 13:39:52 -04:00
@@ -933,7 +933,7 @@
 			}
 		
 		//if (hit)
-			statement->executeUpdate(dropTempSpace);
+			//statement->executeUpdate(dropTempSpace);
 		}
 	catch(...)
 		{

--- 1.19/storage/falcon/StorageHandler.h	2007-06-12 13:39:52 -04:00
+++ 1.20/storage/falcon/StorageHandler.h	2007-06-12 13:39:52 -04:00
@@ -22,6 +22,7 @@
 #define MASTER_PATH				"falcon_master.fts"
 #define DEFAULT_TABLESPACE		"falcon_user"
 #define TEMPORARY_TABLESPACE	"falcon_temporary"
+#define TEMPORARY_PATH			"falcon_temporary.fts"
 
 static const int connectionHashSize = 101;
 

--- 1.6/storage/falcon/TableSpaceManager.cpp	2007-06-12 13:39:52 -04:00
+++ 1.7/storage/falcon/TableSpaceManager.cpp	2007-06-12 13:39:52 -04:00
@@ -53,16 +53,16 @@
 	database = db;
 	memset(nameHash, 0, sizeof(nameHash));
 	memset(idHash, 0, sizeof(nameHash));
+	tableSpaces;
 }
 
 TableSpaceManager::~TableSpaceManager()
 {
-	for (int n = 0; n < TS_HASH_SIZE; ++n)
-		for (TableSpace *tableSpace; (tableSpace = nameHash[n]); )
-			{
-			nameHash[n] = tableSpace->nameCollision;
-			delete tableSpace;
-			}
+	for (TableSpace *tableSpace; (tableSpace = tableSpaces);)
+		{
+		tableSpaces = tableSpace->next;
+		delete tableSpace;
+		}
 }
 
 void TableSpaceManager::add(TableSpace *tableSpace)
@@ -75,6 +75,8 @@
 	slot = tableSpace->tableSpaceId % TS_HASH_SIZE;
 	tableSpace->idCollision = idHash[slot];
 	idHash[slot] = tableSpace;
+	tableSpace->next = tableSpaces;
+	tableSpaces = tableSpace;
 }
 
 TableSpace* TableSpaceManager::findTableSpace(const char *name)
@@ -216,16 +218,14 @@
 
 void TableSpaceManager::shutdown(TransId transId)
 {
-	for (int n = 0; n < TS_HASH_SIZE; ++n)
-		for (TableSpace *tableSpace = nameHash[n]; tableSpace; tableSpace =
tableSpace->nameCollision)
-			tableSpace->shutdown(transId);
+	for (TableSpace *tableSpace = tableSpaces; tableSpace; tableSpace = tableSpace->next)
+		tableSpace->shutdown(transId);
 }
 
 void TableSpaceManager::dropDatabase(void)
 {
-	for (int n = 0; n < TS_HASH_SIZE; ++n)
-		for (TableSpace *tableSpace = nameHash[n]; tableSpace; tableSpace =
tableSpace->nameCollision)
-			tableSpace->dropTableSpace();
+	for (TableSpace *tableSpace = tableSpaces; tableSpace; tableSpace = tableSpace->next)
+		tableSpace->dropTableSpace();
 }
 
 void TableSpaceManager::dropTableSpace(TableSpace* tableSpace)
@@ -260,7 +260,23 @@
 			break;
 			}
 	
+	for (ptr = &tableSpaces; *ptr; ptr = &(*ptr)->next)
+		if (*ptr == tableSpace)
+			{
+			*ptr = tableSpace->next;
+			break;
+			}
+
 	sync.unlock();
 	tableSpace->dropTableSpace();
 	delete tableSpace;
+}
+
+void TableSpaceManager::reportStatistics(void)
+{
+	Sync sync(&syncObject, "TableSpaceManager::reportStatistics");
+	sync.lock(Shared);
+
+	for (TableSpace *tableSpace = tableSpaces; tableSpace; tableSpace = tableSpace->next)
+		tableSpace->dbb->reportStatistics();
 }

--- 1.5/storage/falcon/TableSpaceManager.h	2007-06-12 13:39:52 -04:00
+++ 1.6/storage/falcon/TableSpaceManager.h	2007-06-12 13:39:52 -04:00
@@ -35,23 +35,26 @@
 class TableSpaceManager  
 {
 public:
-	TableSpace* getTableSpace (int id);
-	TableSpace* findTableSpace(int id);
-	void bootstrap (int sectionId);
-	TableSpace* createTableSpace (const char *name, const char *fileName);
-	TableSpace* getTableSpace (const char *name);
-	TableSpace* findTableSpace(const char *name);
-	void add (TableSpace *tableSpace);
 	TableSpaceManager(Database *db);
 	virtual ~TableSpaceManager();
 
+	TableSpace*		getTableSpace (int id);
+	TableSpace*		findTableSpace(int id);
+	void			bootstrap (int sectionId);
+	TableSpace*		createTableSpace (const char *name, const char *fileName);
+	TableSpace*		getTableSpace (const char *name);
+	TableSpace*		findTableSpace(const char *name);
+	void			add (TableSpace *tableSpace);
+	void			shutdown(TransId transId);
+	void			dropDatabase(void);
+	void			dropTableSpace(TableSpace* tableSpace);
+	void			reportStatistics(void);
+
 	Database	*database;
+	TableSpace	*tableSpaces;
 	TableSpace	*nameHash[TS_HASH_SIZE];
 	TableSpace	*idHash[TS_HASH_SIZE];
 	SyncObject	syncObject;
-	void shutdown(TransId transId);
-	void dropDatabase(void);
-	void dropTableSpace(TableSpace* tableSpace);
 };
 
 #endif //
!defined(AFX_TABLESPACEMANAGER_H__BD1D39F6_2201_4136_899C_7CB106E99B8C__INCLUDED_)

--- 1.13/storage/falcon/Configuration.cpp	2007-06-12 13:39:52 -04:00
+++ 1.14/storage/falcon/Configuration.cpp	2007-06-12 13:39:52 -04:00
@@ -155,8 +155,8 @@
 	if (recordMemoryLower && recordMemoryLower < MIN_RECORD_MEMORY/2)
 		recordMemoryLower = MIN_RECORD_MEMORY/2;
 	else
-	if (!recordMemoryLower || recordMemoryLower >= recordMemoryUpper)
-		recordMemoryLower = recordMemoryUpper / 2;
+		if (!recordMemoryLower || recordMemoryLower >= recordMemoryUpper)
+			recordMemoryLower = recordMemoryUpper / 2;
 
 #ifdef STORAGE_ENGINE
 	falcon_min_record_memory = recordMemoryLower;
@@ -180,16 +180,22 @@
 		{
 		if (!fgets (buffer, sizeof (buffer), (FILE*) file))
 			return false;
+			
 		const char *q = buffer;
+		
 		while (*q == ' ' || *q == '\t')
 			++q;
+			
 		while (q < end && *q && *q != '\n')
 			*p++ = *q++;
+			
 		if (p [-1] != '\\')
 			{
 			*p = 0;
+			
 			return true;
 			}
+			
 		--p;
 		}
 }
@@ -228,13 +234,13 @@
 bool Configuration::enabled(JString string)
 {
 	if (string.equalsNoCase ("enabled") ||
-		string.equalsNoCase ("yes") ||
-		string.equalsNoCase ("on"))
+		 string.equalsNoCase ("yes") ||
+		 string.equalsNoCase ("on"))
 		return true;
 
 	if (string.equalsNoCase ("disabled") ||
-		string.equalsNoCase ("no") ||
-		string.equalsNoCase ("off"))
+		 string.equalsNoCase ("no") ||
+		 string.equalsNoCase ("off"))
 		return false;
 
 	throw SQLEXCEPTION (DDL_ERROR, "unknown enable value \"%s\"", (const char*) string);

--- 1.72/storage/falcon/Database.cpp	2007-06-12 13:39:52 -04:00
+++ 1.73/storage/falcon/Database.cpp	2007-06-12 13:39:52 -04:00
@@ -1662,7 +1662,8 @@
 	sessionManager->scavenge (&now);
 #endif
 	
-	dbb->reportStatistics();
+	//dbb->reportStatistics();
+	tableSpaceManager->reportStatistics();
 	repositoryManager->reportStatistics();
 }
 
Thread
bk commit into 6.0-falcon tree (jas:1.2562)U-ROWVWADEjas12 Jun