Commit c5e13ae0 authored by tomas@whalegate.ndb.mysql.com's avatar tomas@whalegate.ndb.mysql.com

Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user

into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-build
parents d822cf03 50d2a6de
......@@ -10,7 +10,8 @@ DataDir= CHOOSE_FILESYSTEM
MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes
MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes
TimeBetweenGlobalCheckpoints= 500
NoOfFragmentLogFiles= 3
NoOfFragmentLogFiles= 8
FragmentLogFileSize= 6M
DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory
#
......
......@@ -10,7 +10,8 @@ DataDir= CHOOSE_FILESYSTEM
MaxNoOfOrderedIndexes= CHOOSE_MaxNoOfOrderedIndexes
MaxNoOfAttributes= CHOOSE_MaxNoOfAttributes
TimeBetweenGlobalCheckpoints= 500
NoOfFragmentLogFiles= 3
NoOfFragmentLogFiles= 4
FragmentLogFileSize=12M
DiskPageBufferMemory= CHOOSE_DiskPageBufferMemory
# the following parametes just function as a small regression
# test that the parameter exists
......
......@@ -64,6 +64,7 @@
#define CFG_DB_FILESYSTEM_PATH 125
#define CFG_DB_NO_REDOLOG_FILES 126
#define CFG_DB_REDOLOG_FILE_SIZE 140
#define CFG_DB_LCP_DISC_PAGES_TUP 127
#define CFG_DB_LCP_DISC_PAGES_TUP_SR 128
......
......@@ -71,7 +71,6 @@ class Dbtup;
/* CONSTANTS OF THE LOG PAGES */
/* ------------------------------------------------------------------------- */
#define ZPAGE_HEADER_SIZE 32
#define ZNO_MBYTES_IN_FILE 16
#define ZPAGE_SIZE 8192
#define ZPAGES_IN_MBYTE 32
#define ZTWOLOG_NO_PAGES_IN_MBYTE 5
......@@ -142,7 +141,7 @@ class Dbtup;
/* IN THE MBYTE. */
/* ------------------------------------------------------------------------- */
#define ZFD_HEADER_SIZE 3
#define ZFD_PART_SIZE 48
#define ZFD_MBYTE_SIZE 3
#define ZLOG_HEAD_SIZE 8
#define ZNEXT_LOG_SIZE 2
#define ZABORT_LOG_SIZE 3
......@@ -169,7 +168,6 @@ class Dbtup;
#define ZPOS_LOG_TYPE 0
#define ZPOS_NO_FD 1
#define ZPOS_FILE_NO 2
#define ZMAX_LOG_FILES_IN_PAGE_ZERO 40
/* ------------------------------------------------------------------------- */
/* THE POSITIONS WITHIN A PREPARE LOG RECORD AND A NEW PREPARE */
/* LOG RECORD. */
......@@ -1437,17 +1435,17 @@ public:
* header of each log file. That information is used during
* system restart to find the tail of the log.
*/
UintR logLastPrepRef[16];
UintR *logLastPrepRef;
/**
* The max global checkpoint completed before the mbyte in the
* log file was started. One variable per mbyte.
*/
UintR logMaxGciCompleted[16];
UintR *logMaxGciCompleted;
/**
* The max global checkpoint started before the mbyte in the log
* file was started. One variable per mbyte.
*/
UintR logMaxGciStarted[16];
UintR *logMaxGciStarted;
/**
* This variable contains the file name as needed by the file
* system when opening the file.
......@@ -2163,6 +2161,7 @@ private:
void execSTART_RECREF(Signal* signal);
void execGCP_SAVEREQ(Signal* signal);
void execFSOPENREF(Signal* signal);
void execFSOPENCONF(Signal* signal);
void execFSCLOSECONF(Signal* signal);
void execFSWRITECONF(Signal* signal);
......@@ -2671,6 +2670,8 @@ private:
LogPartRecord *logPartRecord;
LogPartRecordPtr logPartPtr;
UintR clogPartFileSize;
Uint32 clogFileSize; // In MBYTE
Uint32 cmaxLogFilesInPageZero; //
// Configurable
LogFileRecord *logFileRecord;
......
......@@ -60,6 +60,8 @@ void Dblqh::initData()
cLqhTimeOutCheckCount = 0;
cbookedAccOps = 0;
m_backup_ptr = RNIL;
clogFileSize = 16;
cmaxLogFilesInPageZero = 40;
}//Dblqh::initData()
void Dblqh::initRecords()
......@@ -260,6 +262,7 @@ Dblqh::Dblqh(Block_context& ctx):
addRecSignal(GSN_START_FRAGREQ, &Dblqh::execSTART_FRAGREQ);
addRecSignal(GSN_START_RECREF, &Dblqh::execSTART_RECREF);
addRecSignal(GSN_GCP_SAVEREQ, &Dblqh::execGCP_SAVEREQ);
addRecSignal(GSN_FSOPENREF, &Dblqh::execFSOPENREF, true);
addRecSignal(GSN_FSOPENCONF, &Dblqh::execFSOPENCONF);
addRecSignal(GSN_FSCLOSECONF, &Dblqh::execFSCLOSECONF);
addRecSignal(GSN_FSWRITECONF, &Dblqh::execFSWRITECONF);
......
......@@ -2741,16 +2741,34 @@ void Ndbcntr::execSTART_ORD(Signal* signal){
c_missra.execSTART_ORD(signal);
}
#define CLEAR_DX 13
#define CLEAR_LCP 3
void
Ndbcntr::clearFilesystem(Signal* signal){
Ndbcntr::clearFilesystem(Signal* signal)
{
const Uint32 lcp = c_fsRemoveCount >= CLEAR_DX;
FsRemoveReq * req = (FsRemoveReq *)signal->getDataPtrSend();
req->userReference = reference();
req->userPointer = 0;
req->directory = 1;
req->ownDirectory = 1;
FsOpenReq::setVersion(req->fileNumber, 3);
FsOpenReq::setSuffix(req->fileNumber, FsOpenReq::S_CTL); // Can by any...
FsOpenReq::v1_setDisk(req->fileNumber, c_fsRemoveCount);
if (lcp == 0)
{
FsOpenReq::setVersion(req->fileNumber, 3);
FsOpenReq::setSuffix(req->fileNumber, FsOpenReq::S_CTL); // Can by any...
FsOpenReq::v1_setDisk(req->fileNumber, c_fsRemoveCount);
}
else
{
FsOpenReq::setVersion(req->fileNumber, 5);
FsOpenReq::setSuffix(req->fileNumber, FsOpenReq::S_DATA);
FsOpenReq::v5_setLcpNo(req->fileNumber, c_fsRemoveCount - CLEAR_DX);
FsOpenReq::v5_setTableId(req->fileNumber, 0);
FsOpenReq::v5_setFragmentId(req->fileNumber, 0);
}
sendSignal(NDBFS_REF, GSN_FSREMOVEREQ, signal,
FsRemoveReq::SignalLength, JBA);
c_fsRemoveCount++;
......@@ -2759,12 +2777,12 @@ Ndbcntr::clearFilesystem(Signal* signal){
void
Ndbcntr::execFSREMOVECONF(Signal* signal){
jamEntry();
if(c_fsRemoveCount == 13){
if(c_fsRemoveCount == CLEAR_DX + CLEAR_LCP){
jam();
sendSttorry(signal);
} else {
jam();
ndbrequire(c_fsRemoveCount < 13);
ndbrequire(c_fsRemoveCount < CLEAR_DX + CLEAR_LCP);
clearFilesystem(signal);
}//if
}
......
......@@ -879,6 +879,18 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"3",
STR_VALUE(MAX_INT_RNIL) },
{
CFG_DB_REDOLOG_FILE_SIZE,
"FragmentLogFileSize",
DB_TOKEN,
"Size of each Redo log file",
ConfigInfo::CI_USED,
false,
ConfigInfo::CI_INT,
"16M",
"4M",
"1G" },
{
CFG_DB_MAX_OPEN_FILES,
"MaxNoOfOpenFiles",
......
......@@ -179,7 +179,7 @@ ErrorBundle ErrorCodes[] = {
{ 873, DMEC, TR, "Out of attrinfo records for scan in tuple manager" },
{ 899, DMEC, TR, "Rowid already allocated" },
{ 1217, DMEC, TR, "Out of operation records in local data manager (increase MaxNoOfLocalOperations)" },
{ 1220, DMEC, TR, "REDO log files overloaded, consult online manual (decrease TimeBetweenLocalCheckpoints, and|or increase NoOfFragmentLogFiles)" },
{ 1220, DMEC, TR, "REDO log files overloaded, consult online manual (increase FragmentLogFileSize)" },
{ 1222, DMEC, TR, "Out of transaction markers in LQH" },
{ 4021, DMEC, TR, "Out of Send Buffer space in NDB API" },
{ 4022, DMEC, TR, "Out of Send Buffer space in NDB API" },
......
......@@ -21,3 +21,6 @@ BackupMemory = 64M
MaxNoOfConcurrentScans = 100
MaxNoOfSavedMessages= 1000
SendBufferMemory = 2M
NoOfFragmentLogFiles = 4
FragmentLogFileSize = 64M
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment