List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:January 31 2009 11:22pm
Subject:bzr commit into mysql-6.0-falcon-team branch (christopher.powers:2990)
Bug#42505
View as plain text  
#At file:///home/cpowers/work/dev/dev-04/mysql/

 2990 Christopher Powers	2009-01-31
      Bug #42505, "Falcon: Record backlogging not enabled by the Scavenger"
      
      Fixed several issues with record backlogging.
modified:
  storage/falcon/BackLog.cpp
  storage/falcon/Database.cpp
  storage/falcon/TableSpaceManager.cpp
  storage/falcon/TableSpaceManager.h

per-file messages:
  storage/falcon/BackLog.cpp
    Let the TableSpaceManager assign a tablespace id instead of
    using -1.
  storage/falcon/Database.cpp
    Enable backlogging when the record cache memory exceeds the
    record cache floor after a scavenge cycle.
  storage/falcon/TableSpaceManager.cpp
    Added TableSpaceManager::createTableSpaceId()
  storage/falcon/TableSpaceManager.h
    Added TableSpaceManager::createTableSpaceId()
=== modified file 'storage/falcon/BackLog.cpp'
--- a/storage/falcon/BackLog.cpp	2008-08-18 20:17:15 +0000
+++ b/storage/falcon/BackLog.cpp	2009-01-31 23:22:42 +0000
@@ -16,6 +16,7 @@
 #include "Engine.h"
 #include "BackLog.h"
 #include "Database.h"
+#include "TableSpaceManager.h"
 #include "Dbb.h"
 #include "Section.h"
 #include "Index.h"
@@ -33,16 +34,15 @@
 static const char THIS_FILE[]=__FILE__;
 #endif
 
-BackLog::BackLog(Database *db, const char *fileName)
+BackLog::BackLog(Database *db, const char *fileName) : database(db)
 {
-	database = db;
 	dbb = new Dbb(database->dbb, 0);
 #ifndef FALCONDB
 	dbb->createPath(fileName);
 #endif
 	dbb->create(fileName, dbb->pageSize, 0, HdrTableSpace, 0, NULL);
 	dbb->noLog = true;
-	dbb->tableSpaceId = -1;
+	dbb->tableSpaceId = database->tableSpaceManager->createTableSpaceId();
 	int32 sectionId = Section::createSection (dbb, NO_TRANSACTION);
 	section = new Section(dbb, sectionId, NO_TRANSACTION);
 	recordsBacklogged = 0;

=== modified file 'storage/falcon/Database.cpp'
--- a/storage/falcon/Database.cpp	2009-01-27 17:32:40 +0000
+++ b/storage/falcon/Database.cpp	2009-01-31 23:22:42 +0000
@@ -1816,7 +1816,7 @@ void Database::scavengeRecords(void)
 
 	// Check for low memory 
 
-	if (recordScavenge.spaceRemaining > recordScavengeFloor)
+	if (recordScavenge.retiredActiveMemory > recordScavengeFloor)
 		setLowMemory();
 
 	recordScavenge.print();

=== modified file 'storage/falcon/TableSpaceManager.cpp'
--- a/storage/falcon/TableSpaceManager.cpp	2009-01-28 14:26:37 +0000
+++ b/storage/falcon/TableSpaceManager.cpp	2009-01-31 23:22:42 +0000
@@ -157,9 +157,8 @@ TableSpace* TableSpaceManager::createTab
 	Sync syncDDL(&database->syncSysDDL, "TableSpaceManager::createTableSpace");
 	syncDDL.lock(Exclusive);
 
-	Sequence *sequence = database->sequenceManager->getSequence(database->getSymbol("SYSTEM"), database->getSymbol("TABLESPACE_IDS"));
 	int type = (repository) ? TABLESPACE_TYPE_REPOSITORY : TABLESPACE_TYPE_TABLESPACE;
-	int id = (int) sequence->update(1, database->getSystemTransaction());
+	int id = createTableSpaceId();
 	
 	TableSpace *tableSpace = new TableSpace(database, name, id, fileName, type, tsInit);
 	
@@ -565,3 +564,9 @@ void TableSpaceManager::getTableSpaceFil
 		}
 }
 
+int TableSpaceManager::createTableSpaceId()
+{
+	Sequence *sequence = database->sequenceManager->getSequence(database->getSymbol("SYSTEM"), database->getSymbol("TABLESPACE_IDS"));
+	int id = (int) sequence->update(1, database->getSystemTransaction());
+	return id;
+}

=== modified file 'storage/falcon/TableSpaceManager.h'
--- a/storage/falcon/TableSpaceManager.h	2008-10-31 00:29:13 +0000
+++ b/storage/falcon/TableSpaceManager.h	2009-01-31 23:22:42 +0000
@@ -63,6 +63,7 @@ public:
 	void			reportWrites(void);
 	void			redoCreateTableSpace(int id, int nameLength, const char* name, int fileNameLength, const char* fileName, int type, TableSpaceInit* tsInit);
 	void			initialize(void);
+	int				createTableSpaceId();
 
 	Database	*database;
 	TableSpace	*tableSpaces;

Thread
bzr commit into mysql-6.0-falcon-team branch (christopher.powers:2990)Bug#42505Christopher Powers1 Feb