#At file:///home/cpowers/work/dev/dev-05/mysql/
2999 Christopher Powers 2009-02-04
Bug #42505 "Falcon: Record backlogging not enabled by the Scavenger"
Use negative tablespace ids for reserved tablespaces
modified:
storage/falcon/BackLog.cpp
storage/falcon/Database.h
storage/falcon/Section.cpp
storage/falcon/SerialLog.cpp
per-file messages:
storage/falcon/BackLog.cpp
Backlog::Backlog()
- Use pre-defined tablespace id for the Backlog
storage/falcon/Database.h
Defined TABLESPACE_ID_BACKLOG
storage/falcon/Section.cpp
Section::allocSectionPage()
- Don't log section pages from temporary tablespaces
storage/falcon/SerialLog.cpp
SerialLog::getTableSpaceInfo()
- Reserved tablespace ids are negative. Map reserved
tablespaces from the end of the hash table.
=== modified file 'storage/falcon/BackLog.cpp'
--- a/storage/falcon/BackLog.cpp 2009-01-31 23:22:42 +0000
+++ b/storage/falcon/BackLog.cpp 2009-02-05 05:34:42 +0000
@@ -42,7 +42,7 @@ BackLog::BackLog(Database *db, const cha
#endif
dbb->create(fileName, dbb->pageSize, 0, HdrTableSpace, 0, NULL);
dbb->noLog = true;
- dbb->tableSpaceId = database->tableSpaceManager->createTableSpaceId();
+ dbb->tableSpaceId = TABLESPACE_ID_BACKLOG; // reserved for internal use
int32 sectionId = Section::createSection (dbb, NO_TRANSACTION);
section = new Section(dbb, sectionId, NO_TRANSACTION);
recordsBacklogged = 0;
=== modified file 'storage/falcon/Database.h'
--- a/storage/falcon/Database.h 2009-02-03 02:53:42 +0000
+++ b/storage/falcon/Database.h 2009-02-05 05:34:42 +0000
@@ -40,6 +40,11 @@
#define VERSION_CURRENT COMBINED_VERSION(ODS_VERSION, ODS_MINOR_VERSION)
#define VERSION_SERIAL_LOG COMBINED_VERSION(ODS_VERSION2, ODS_MINOR_VERSION1)
+// Reserved tablespaces
+
+static const int TABLESPACE_ID_BACKLOG = -1;
+static const int TABLESPACE_ID_RESERVED = -2;
+
static const int FALC0N_TRACE_TRANSACTIONS = 1;
static const int FALC0N_SYNC_TEST = 2;
static const int FALC0N_SYNC_OBJECTS = 4;
=== modified file 'storage/falcon/Section.cpp'
--- a/storage/falcon/Section.cpp 2009-02-03 19:37:36 +0000
+++ b/storage/falcon/Section.cpp 2009-02-05 05:34:42 +0000
@@ -73,7 +73,7 @@ static Bdb* allocSectionPage(Dbb *dbb, i
{
Bdb *newBdb = dbb->allocPage(PAGE_sections, transId);
- if (!dbb->serialLog->recovering)
+ if (!dbb->serialLog->recovering && !dbb->noLog)
dbb->serialLog->logControl->sectionPage.append(dbb, transId, parentPage, newBdb->pageNumber, slot, sectionId, sequence, level);
return newBdb;
}
=== modified file 'storage/falcon/SerialLog.cpp'
--- a/storage/falcon/SerialLog.cpp 2009-02-01 09:50:43 +0000
+++ b/storage/falcon/SerialLog.cpp 2009-02-05 05:34:42 +0000
@@ -119,8 +119,10 @@ SerialLog::SerialLog(Database *db, JStri
blocking = false;
writeError = false;
windowBuffers = MAX(database->configuration->serialLogWindows, SRL_MIN_WINDOWS);
- tableSpaceInfo = NULL;
+
memset(tableSpaces, 0, sizeof(tableSpaces));
+ tableSpaceInfo = NULL;
+
syncWrite.setName("SerialLog::syncWrite");
syncSections.setName("SerialLog::syncSections");
syncIndexes.setName("SerialLog::syncIndexes");
@@ -1533,7 +1535,10 @@ Dbb* SerialLog::findDbb(int tableSpaceId
TableSpaceInfo* SerialLog::getTableSpaceInfo(int tableSpaceId)
{
TableSpaceInfo *info;
- int slot = tableSpaceId %SLT_HASH_SIZE;
+
+ // Map reserved tablespace ids from the end of the hash table
+
+ int slot = (tableSpaceId >= 0) ? (tableSpaceId % SLT_HASH_SIZE) : (SLT_HASH_SIZE + tableSpaceId);
for (info = tableSpaces[slot]; info; info = info->collision)
if (info->tableSpaceId == tableSpaceId)
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (christopher.powers:2999)Bug#42505 | Christopher Powers | 5 Feb |