improved error message printing on filesystem refuse signals
This commit is contained in:
parent
d0c2e46f11
commit
c2252e451f
@ -31,25 +31,7 @@
|
||||
* SENDER: Ndbfs
|
||||
* RECIVER:
|
||||
*/
|
||||
class FsRef {
|
||||
/**
|
||||
* Reciver(s)
|
||||
*/
|
||||
friend class Dbdict;
|
||||
friend class Backup;
|
||||
|
||||
/**
|
||||
* Sender(s)
|
||||
*/
|
||||
friend class Ndbfs;
|
||||
friend class VoidFs;
|
||||
|
||||
/**
|
||||
* For printing
|
||||
*/
|
||||
friend bool printFSREF(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiverBlockNo);
|
||||
|
||||
public:
|
||||
struct FsRef {
|
||||
/**
|
||||
* Enum type for errorCode
|
||||
*/
|
||||
@ -73,8 +55,6 @@ public:
|
||||
*/
|
||||
STATIC_CONST( SignalLength = 4 );
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* DATA VARIABLES
|
||||
*/
|
||||
|
@ -150,16 +150,16 @@ Backup::Backup(const Configuration & conf) :
|
||||
addRecSignal(GSN_DI_FCOUNTCONF, &Backup::execDI_FCOUNTCONF);
|
||||
addRecSignal(GSN_DIGETPRIMCONF, &Backup::execDIGETPRIMCONF);
|
||||
|
||||
addRecSignal(GSN_FSOPENREF, &Backup::execFSOPENREF);
|
||||
addRecSignal(GSN_FSOPENREF, &Backup::execFSOPENREF, true);
|
||||
addRecSignal(GSN_FSOPENCONF, &Backup::execFSOPENCONF);
|
||||
|
||||
addRecSignal(GSN_FSCLOSEREF, &Backup::execFSCLOSEREF);
|
||||
addRecSignal(GSN_FSCLOSEREF, &Backup::execFSCLOSEREF, true);
|
||||
addRecSignal(GSN_FSCLOSECONF, &Backup::execFSCLOSECONF);
|
||||
|
||||
addRecSignal(GSN_FSAPPENDREF, &Backup::execFSAPPENDREF);
|
||||
addRecSignal(GSN_FSAPPENDREF, &Backup::execFSAPPENDREF, true);
|
||||
addRecSignal(GSN_FSAPPENDCONF, &Backup::execFSAPPENDCONF);
|
||||
|
||||
addRecSignal(GSN_FSREMOVEREF, &Backup::execFSREMOVEREF);
|
||||
addRecSignal(GSN_FSREMOVEREF, &Backup::execFSREMOVEREF, true);
|
||||
addRecSignal(GSN_FSREMOVECONF, &Backup::execFSREMOVECONF);
|
||||
|
||||
/*****/
|
||||
|
@ -949,17 +949,12 @@ private:
|
||||
void execACC_TO_REQ(Signal* signal);
|
||||
void execACC_LOCKREQ(Signal* signal);
|
||||
void execFSOPENCONF(Signal* signal);
|
||||
void execFSOPENREF(Signal* signal);
|
||||
void execFSCLOSECONF(Signal* signal);
|
||||
void execFSCLOSEREF(Signal* signal);
|
||||
void execFSWRITECONF(Signal* signal);
|
||||
void execFSWRITEREF(Signal* signal);
|
||||
void execFSREADCONF(Signal* signal);
|
||||
void execFSREADREF(Signal* signal);
|
||||
void execNDB_STTOR(Signal* signal);
|
||||
void execDROP_TAB_REQ(Signal* signal);
|
||||
void execFSREMOVECONF(Signal* signal);
|
||||
void execFSREMOVEREF(Signal* signal);
|
||||
void execREAD_CONFIG_REQ(Signal* signal);
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
void execDUMP_STATE_ORD(Signal* signal);
|
||||
|
@ -187,17 +187,12 @@ Dbacc::Dbacc(const class Configuration & conf):
|
||||
addRecSignal(GSN_ACC_TO_REQ, &Dbacc::execACC_TO_REQ);
|
||||
addRecSignal(GSN_ACC_LOCKREQ, &Dbacc::execACC_LOCKREQ);
|
||||
addRecSignal(GSN_FSOPENCONF, &Dbacc::execFSOPENCONF);
|
||||
addRecSignal(GSN_FSOPENREF, &Dbacc::execFSOPENREF);
|
||||
addRecSignal(GSN_FSCLOSECONF, &Dbacc::execFSCLOSECONF);
|
||||
addRecSignal(GSN_FSCLOSEREF, &Dbacc::execFSCLOSEREF);
|
||||
addRecSignal(GSN_FSWRITECONF, &Dbacc::execFSWRITECONF);
|
||||
addRecSignal(GSN_FSWRITEREF, &Dbacc::execFSWRITEREF);
|
||||
addRecSignal(GSN_FSREADCONF, &Dbacc::execFSREADCONF);
|
||||
addRecSignal(GSN_FSREADREF, &Dbacc::execFSREADREF);
|
||||
addRecSignal(GSN_NDB_STTOR, &Dbacc::execNDB_STTOR);
|
||||
addRecSignal(GSN_DROP_TAB_REQ, &Dbacc::execDROP_TAB_REQ);
|
||||
addRecSignal(GSN_FSREMOVECONF, &Dbacc::execFSREMOVECONF);
|
||||
addRecSignal(GSN_FSREMOVEREF, &Dbacc::execFSREMOVEREF);
|
||||
addRecSignal(GSN_READ_CONFIG_REQ, &Dbacc::execREAD_CONFIG_REQ, true);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Dbacc::execSET_VAR_REQ);
|
||||
|
||||
|
@ -248,15 +248,6 @@ void Dbacc::execFSCLOSECONF(Signal* signal)
|
||||
return;
|
||||
}//Dbacc::execFSCLOSECONF()
|
||||
|
||||
/* ******************--------------------------------------------------------------- */
|
||||
/* FSCLOSEREF OPENFILE CONF */
|
||||
/* ******************------------------------------+ */
|
||||
/* SENDER: FS, LEVEL B */
|
||||
void Dbacc::execFSCLOSEREF(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
ndbrequire(false);
|
||||
}//Dbacc::execFSCLOSEREF()
|
||||
|
||||
/* ******************--------------------------------------------------------------- */
|
||||
/* FSOPENCONF OPENFILE CONF */
|
||||
@ -304,15 +295,6 @@ void Dbacc::execFSOPENCONF(Signal* signal)
|
||||
return;
|
||||
}//Dbacc::execFSOPENCONF()
|
||||
|
||||
/* ******************--------------------------------------------------------------- */
|
||||
/* FSOPENREF OPENFILE REF */
|
||||
/* ******************------------------------------+ */
|
||||
/* SENDER: FS, LEVEL B */
|
||||
void Dbacc::execFSOPENREF(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
ndbrequire(false);
|
||||
}//Dbacc::execFSOPENREF()
|
||||
|
||||
/* ******************--------------------------------------------------------------- */
|
||||
/* FSREADCONF OPENFILE CONF */
|
||||
@ -366,16 +348,6 @@ void Dbacc::execFSREADCONF(Signal* signal)
|
||||
return;
|
||||
}//Dbacc::execFSREADCONF()
|
||||
|
||||
/* ******************--------------------------------------------------------------- */
|
||||
/* FSREADRREF OPENFILE CONF */
|
||||
/* ******************------------------------------+ */
|
||||
/* SENDER: FS, LEVEL B */
|
||||
void Dbacc::execFSREADREF(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
progError(0, __LINE__, "Read of file refused");
|
||||
return;
|
||||
}//Dbacc::execFSREADREF()
|
||||
|
||||
/* ******************--------------------------------------------------------------- */
|
||||
/* FSWRITECONF OPENFILE CONF */
|
||||
@ -479,16 +451,6 @@ void Dbacc::execFSWRITECONF(Signal* signal)
|
||||
return;
|
||||
}//Dbacc::execFSWRITECONF()
|
||||
|
||||
/* ******************--------------------------------------------------------------- */
|
||||
/* FSWRITEREF OPENFILE CONF */
|
||||
/* ******************------------------------------+ */
|
||||
/* SENDER: FS, LEVEL B */
|
||||
void Dbacc::execFSWRITEREF(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
progError(0, __LINE__, "Write to file refused");
|
||||
return;
|
||||
}//Dbacc::execFSWRITEREF()
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@ -1425,10 +1387,6 @@ void Dbacc::execFSREMOVECONF(Signal* signal)
|
||||
tabPtr.p->tabUserRef = 0;
|
||||
}//Dbacc::execFSREMOVECONF()
|
||||
|
||||
void Dbacc::execFSREMOVEREF(Signal* signal)
|
||||
{
|
||||
ndbrequire(false);
|
||||
}//Dbacc::execFSREMOVEREF()
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* ADDFRAGTOTAB */
|
||||
|
@ -379,14 +379,6 @@ void Dbdict::execFSCLOSECONF(Signal* signal)
|
||||
}//switch
|
||||
}//execFSCLOSECONF()
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
// A close file was refused.
|
||||
/* ---------------------------------------------------------------- */
|
||||
void Dbdict::execFSCLOSEREF(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
progError(0, 0);
|
||||
}//execFSCLOSEREF()
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
// A file was successfully opened.
|
||||
@ -449,17 +441,21 @@ void Dbdict::execFSOPENREF(Signal* signal)
|
||||
c_fsConnectRecordPool.getPtr(fsPtr, fsRef->userPointer);
|
||||
switch (fsPtr.p->fsState) {
|
||||
case FsConnectRecord::OPEN_READ_SCHEMA1:
|
||||
jam();
|
||||
openReadSchemaRef(signal, fsPtr);
|
||||
break;
|
||||
return;
|
||||
case FsConnectRecord::OPEN_READ_TAB_FILE1:
|
||||
jam();
|
||||
openReadTableRef(signal, fsPtr);
|
||||
break;
|
||||
return;
|
||||
default:
|
||||
jamLine((fsPtr.p->fsState & 0xFFF));
|
||||
ndbrequire(false);
|
||||
break;
|
||||
}//switch
|
||||
{
|
||||
char msg[100];
|
||||
sprintf(msg, "File system open failed during FsConnectRecord state %d", (Uint32)fsPtr.p->fsState);
|
||||
fsRefError(signal,__LINE__,msg);
|
||||
}
|
||||
}//execFSOPENREF()
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
@ -499,17 +495,21 @@ void Dbdict::execFSREADREF(Signal* signal)
|
||||
c_fsConnectRecordPool.getPtr(fsPtr, fsRef->userPointer);
|
||||
switch (fsPtr.p->fsState) {
|
||||
case FsConnectRecord::READ_SCHEMA1:
|
||||
jam();
|
||||
readSchemaRef(signal, fsPtr);
|
||||
break;
|
||||
return;
|
||||
case FsConnectRecord::READ_TAB_FILE1:
|
||||
jam();
|
||||
readTableRef(signal, fsPtr);
|
||||
break;
|
||||
return;
|
||||
default:
|
||||
jamLine((fsPtr.p->fsState & 0xFFF));
|
||||
ndbrequire(false);
|
||||
break;
|
||||
}//switch
|
||||
{
|
||||
char msg[100];
|
||||
sprintf(msg, "File system read failed during FsConnectRecord state %d", (Uint32)fsPtr.p->fsState);
|
||||
fsRefError(signal,__LINE__,msg);
|
||||
}
|
||||
}//execFSREADREF()
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
@ -536,14 +536,6 @@ void Dbdict::execFSWRITECONF(Signal* signal)
|
||||
}//switch
|
||||
}//execFSWRITECONF()
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
// A write file was refused.
|
||||
/* ---------------------------------------------------------------- */
|
||||
void Dbdict::execFSWRITEREF(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
progError(0, 0);
|
||||
}//execFSWRITEREF()
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
// Routines to handle Read/Write of Table Files
|
||||
@ -1181,13 +1173,11 @@ Dbdict::Dbdict(const class Configuration & conf):
|
||||
addRecSignal(GSN_DICTSTARTREQ, &Dbdict::execDICTSTARTREQ);
|
||||
addRecSignal(GSN_READ_NODESCONF, &Dbdict::execREAD_NODESCONF);
|
||||
addRecSignal(GSN_FSOPENCONF, &Dbdict::execFSOPENCONF);
|
||||
addRecSignal(GSN_FSOPENREF, &Dbdict::execFSOPENREF);
|
||||
addRecSignal(GSN_FSOPENREF, &Dbdict::execFSOPENREF, true);
|
||||
addRecSignal(GSN_FSCLOSECONF, &Dbdict::execFSCLOSECONF);
|
||||
addRecSignal(GSN_FSCLOSEREF, &Dbdict::execFSCLOSEREF);
|
||||
addRecSignal(GSN_FSWRITECONF, &Dbdict::execFSWRITECONF);
|
||||
addRecSignal(GSN_FSWRITEREF, &Dbdict::execFSWRITEREF);
|
||||
addRecSignal(GSN_FSREADCONF, &Dbdict::execFSREADCONF);
|
||||
addRecSignal(GSN_FSREADREF, &Dbdict::execFSREADREF);
|
||||
addRecSignal(GSN_FSREADREF, &Dbdict::execFSREADREF, true);
|
||||
addRecSignal(GSN_LQHFRAGCONF, &Dbdict::execLQHFRAGCONF);
|
||||
addRecSignal(GSN_LQHADDATTCONF, &Dbdict::execLQHADDATTCONF);
|
||||
addRecSignal(GSN_LQHADDATTREF, &Dbdict::execLQHADDATTREF);
|
||||
|
@ -458,13 +458,11 @@ private:
|
||||
void execSCHEMA_INFOCONF(Signal* signal);
|
||||
void execREAD_NODESCONF(Signal* signal);
|
||||
void execFSCLOSECONF(Signal* signal);
|
||||
void execFSCLOSEREF(Signal* signal);
|
||||
void execFSOPENCONF(Signal* signal);
|
||||
void execFSOPENREF(Signal* signal);
|
||||
void execFSREADCONF(Signal* signal);
|
||||
void execFSREADREF(Signal* signal);
|
||||
void execFSWRITECONF(Signal* signal);
|
||||
void execFSWRITEREF(Signal* signal);
|
||||
void execNDB_STTOR(Signal* signal);
|
||||
void execREAD_CONFIG_REQ(Signal* signal);
|
||||
void execSTTOR(Signal* signal);
|
||||
|
@ -206,13 +206,13 @@ Dbdih::Dbdih(const class Configuration & config):
|
||||
addRecSignal(GSN_ADD_FRAGCONF, &Dbdih::execADD_FRAGCONF);
|
||||
addRecSignal(GSN_ADD_FRAGREF, &Dbdih::execADD_FRAGREF);
|
||||
addRecSignal(GSN_FSOPENCONF, &Dbdih::execFSOPENCONF);
|
||||
addRecSignal(GSN_FSOPENREF, &Dbdih::execFSOPENREF);
|
||||
addRecSignal(GSN_FSOPENREF, &Dbdih::execFSOPENREF, true);
|
||||
addRecSignal(GSN_FSCLOSECONF, &Dbdih::execFSCLOSECONF);
|
||||
addRecSignal(GSN_FSCLOSEREF, &Dbdih::execFSCLOSEREF);
|
||||
addRecSignal(GSN_FSCLOSEREF, &Dbdih::execFSCLOSEREF, true);
|
||||
addRecSignal(GSN_FSREADCONF, &Dbdih::execFSREADCONF);
|
||||
addRecSignal(GSN_FSREADREF, &Dbdih::execFSREADREF);
|
||||
addRecSignal(GSN_FSREADREF, &Dbdih::execFSREADREF, true);
|
||||
addRecSignal(GSN_FSWRITECONF, &Dbdih::execFSWRITECONF);
|
||||
addRecSignal(GSN_FSWRITEREF, &Dbdih::execFSWRITEREF);
|
||||
addRecSignal(GSN_FSWRITEREF, &Dbdih::execFSWRITEREF, true);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Dbdih::execSET_VAR_REQ);
|
||||
|
||||
addRecSignal(GSN_START_INFOREQ,
|
||||
|
@ -782,29 +782,36 @@ void Dbdih::execFSCLOSEREF(Signal* signal)
|
||||
filePtr.p->reqStatus = FileRecord::IDLE;
|
||||
switch (status) {
|
||||
case FileRecord::CLOSING_GCP:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
case FileRecord::CLOSING_GCP_CRASH:
|
||||
jam();
|
||||
closingGcpCrashLab(signal, filePtr);
|
||||
break;
|
||||
return;
|
||||
case FileRecord::CLOSING_TABLE_CRASH:
|
||||
jam();
|
||||
closingTableCrashLab(signal, filePtr);
|
||||
break;
|
||||
return;
|
||||
case FileRecord::CLOSING_TABLE_SR:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
case FileRecord::TABLE_CLOSE:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
case FileRecord::TABLE_CLOSE_DELETE:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
default:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
|
||||
}//switch
|
||||
{
|
||||
char msg[100];
|
||||
sprintf(msg, "File system close failed during FileRecord status %d", (Uint32)status);
|
||||
fsRefError(signal,__LINE__,msg);
|
||||
}
|
||||
|
||||
return;
|
||||
}//Dbdih::execFSCLOSEREF()
|
||||
|
||||
@ -868,34 +875,39 @@ void Dbdih::execFSOPENREF(Signal* signal)
|
||||
/* WE DID NOT MANAGE TO CREATE A GLOBAL CHECKPOINT FILE. SERIOUS ERROR */
|
||||
/* WHICH CAUSES A SYSTEM RESTART. */
|
||||
/* --------------------------------------------------------------------- */
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
case FileRecord::OPENING_COPY_GCI:
|
||||
jam();
|
||||
openingCopyGciErrorLab(signal, filePtr);
|
||||
break;
|
||||
return;
|
||||
case FileRecord::CREATING_COPY_GCI:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
case FileRecord::OPENING_GCP:
|
||||
jam();
|
||||
openingGcpErrorLab(signal, filePtr);
|
||||
break;
|
||||
return;
|
||||
case FileRecord::OPENING_TABLE:
|
||||
jam();
|
||||
openingTableErrorLab(signal, filePtr);
|
||||
break;
|
||||
return;
|
||||
case FileRecord::TABLE_CREATE:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
case FileRecord::TABLE_OPEN_FOR_DELETE:
|
||||
jam();
|
||||
tableDeleteLab(signal, filePtr);
|
||||
break;
|
||||
return;
|
||||
default:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
}//switch
|
||||
{
|
||||
char msg[100];
|
||||
sprintf(msg, "File system open failed during FileRecord status %d", (Uint32)status);
|
||||
fsRefError(signal,__LINE__,msg);
|
||||
}
|
||||
return;
|
||||
}//Dbdih::execFSOPENREF()
|
||||
|
||||
@ -935,16 +947,19 @@ void Dbdih::execFSREADREF(Signal* signal)
|
||||
case FileRecord::READING_GCP:
|
||||
jam();
|
||||
readingGcpErrorLab(signal, filePtr);
|
||||
break;
|
||||
return;
|
||||
case FileRecord::READING_TABLE:
|
||||
jam();
|
||||
readingTableErrorLab(signal, filePtr);
|
||||
break;
|
||||
return;
|
||||
default:
|
||||
ndbrequire(false);
|
||||
break;
|
||||
}//switch
|
||||
return;
|
||||
{
|
||||
char msg[100];
|
||||
sprintf(msg, "File system read failed during FileRecord status %d", (Uint32)status);
|
||||
fsRefError(signal,__LINE__,msg);
|
||||
}
|
||||
}//Dbdih::execFSREADREF()
|
||||
|
||||
void Dbdih::execFSWRITECONF(Signal* signal)
|
||||
@ -989,22 +1004,27 @@ void Dbdih::execFSWRITEREF(Signal* signal)
|
||||
/* EVEN CREATING THE FILE DID NOT WORK. WE WILL THEN CRASH. */
|
||||
/* ERROR IN WRITING FILE. WE WILL NOT CONTINUE FROM HERE. */
|
||||
/* --------------------------------------------------------------------- */
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
case FileRecord::WRITE_INIT_GCP:
|
||||
/* --------------------------------------------------------------------- */
|
||||
/* AN ERROR OCCURRED IN WRITING A GCI FILE WHICH IS A SERIOUS ERROR */
|
||||
/* THAT CAUSE A SYSTEM RESTART. */
|
||||
/* --------------------------------------------------------------------- */
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
case FileRecord::TABLE_WRITE:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
default:
|
||||
ndbrequire(false);
|
||||
jam();
|
||||
break;
|
||||
}//switch
|
||||
{
|
||||
char msg[100];
|
||||
sprintf(msg, "File system write failed during FileRecord status %d", (Uint32)status);
|
||||
fsRefError(signal,__LINE__,msg);
|
||||
}
|
||||
return;
|
||||
}//Dbdih::execFSWRITEREF()
|
||||
|
||||
|
@ -2175,9 +2175,7 @@ private:
|
||||
void execTUP_SRREF(Signal* signal);
|
||||
void execGCP_SAVEREQ(Signal* signal);
|
||||
void execFSOPENCONF(Signal* signal);
|
||||
void execFSOPENREF(Signal* signal);
|
||||
void execFSCLOSECONF(Signal* signal);
|
||||
void execFSCLOSEREF(Signal* signal);
|
||||
void execFSWRITECONF(Signal* signal);
|
||||
void execFSWRITEREF(Signal* signal);
|
||||
void execFSREADCONF(Signal* signal);
|
||||
@ -2186,7 +2184,6 @@ private:
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
void execTIME_SIGNAL(Signal* signal);
|
||||
void execFSSYNCCONF(Signal* signal);
|
||||
void execFSSYNCREF(Signal* signal);
|
||||
|
||||
void execALTER_TAB_REQ(Signal* signal);
|
||||
void execALTER_TAB_CONF(Signal* signal);
|
||||
|
@ -311,18 +311,15 @@ Dblqh::Dblqh(const class Configuration & conf):
|
||||
addRecSignal(GSN_TUP_SRREF, &Dblqh::execTUP_SRREF);
|
||||
addRecSignal(GSN_GCP_SAVEREQ, &Dblqh::execGCP_SAVEREQ);
|
||||
addRecSignal(GSN_FSOPENCONF, &Dblqh::execFSOPENCONF);
|
||||
addRecSignal(GSN_FSOPENREF, &Dblqh::execFSOPENREF);
|
||||
addRecSignal(GSN_FSCLOSECONF, &Dblqh::execFSCLOSECONF);
|
||||
addRecSignal(GSN_FSCLOSEREF, &Dblqh::execFSCLOSEREF);
|
||||
addRecSignal(GSN_FSWRITECONF, &Dblqh::execFSWRITECONF);
|
||||
addRecSignal(GSN_FSWRITEREF, &Dblqh::execFSWRITEREF);
|
||||
addRecSignal(GSN_FSWRITEREF, &Dblqh::execFSWRITEREF, true);
|
||||
addRecSignal(GSN_FSREADCONF, &Dblqh::execFSREADCONF);
|
||||
addRecSignal(GSN_FSREADREF, &Dblqh::execFSREADREF);
|
||||
addRecSignal(GSN_FSREADREF, &Dblqh::execFSREADREF, true);
|
||||
addRecSignal(GSN_ACC_ABORTCONF, &Dblqh::execACC_ABORTCONF);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Dblqh::execSET_VAR_REQ);
|
||||
addRecSignal(GSN_TIME_SIGNAL, &Dblqh::execTIME_SIGNAL);
|
||||
addRecSignal(GSN_FSSYNCCONF, &Dblqh::execFSSYNCCONF);
|
||||
addRecSignal(GSN_FSSYNCREF, &Dblqh::execFSSYNCREF);
|
||||
addRecSignal(GSN_REMOVE_MARKER_ORD, &Dblqh::execREMOVE_MARKER_ORD);
|
||||
|
||||
//addRecSignal(GSN_DROP_TAB_REQ, &Dblqh::execDROP_TAB_REQ);
|
||||
|
@ -11718,14 +11718,6 @@ Dblqh::execFSSYNCCONF(Signal* signal)
|
||||
ccurrentGcprec = RNIL;
|
||||
}//Dblqh::execFSSYNCCONF()
|
||||
|
||||
void
|
||||
Dblqh::execFSSYNCREF(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
}//Dblqh::execFSSYNCREF()
|
||||
|
||||
|
||||
/* ######################################################################### */
|
||||
/* ####### FILE HANDLING MODULE ####### */
|
||||
@ -11796,16 +11788,6 @@ void Dblqh::execFSCLOSECONF(Signal* signal)
|
||||
}//switch
|
||||
}//Dblqh::execFSCLOSECONF()
|
||||
|
||||
/* ************>> */
|
||||
/* FSCLOSEREF > */
|
||||
/* ************>> */
|
||||
void Dblqh::execFSCLOSEREF(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
terrorCode = signal->theData[1];
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
}//Dblqh::execFSCLOSEREF()
|
||||
|
||||
/* ************>> */
|
||||
/* FSOPENCONF > */
|
||||
@ -11894,16 +11876,6 @@ void Dblqh::execFSOPENCONF(Signal* signal)
|
||||
}//switch
|
||||
}//Dblqh::execFSOPENCONF()
|
||||
|
||||
/* ************> */
|
||||
/* FSOPENREF > */
|
||||
/* ************> */
|
||||
void Dblqh::execFSOPENREF(Signal* signal)
|
||||
{
|
||||
jamEntry();
|
||||
terrorCode = signal->theData[1];
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
}//Dblqh::execFSOPENREF()
|
||||
|
||||
/* ************>> */
|
||||
/* FSREADCONF > */
|
||||
@ -11981,60 +11953,43 @@ void Dblqh::execFSREADREF(Signal* signal)
|
||||
jamEntry();
|
||||
lfoPtr.i = signal->theData[0];
|
||||
ptrCheckGuard(lfoPtr, clfoFileSize, logFileOperationRecord);
|
||||
terrorCode = signal->theData[1];
|
||||
switch (lfoPtr.p->lfoState) {
|
||||
case LogFileOperationRecord::READ_SR_LAST_MBYTE:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
case LogFileOperationRecord::READ_SR_FRONTPAGE:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
case LogFileOperationRecord::READ_SR_LAST_FILE:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
case LogFileOperationRecord::READ_SR_NEXT_FILE:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
case LogFileOperationRecord::READ_EXEC_SR:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
case LogFileOperationRecord::READ_EXEC_LOG:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
case LogFileOperationRecord::READ_SR_FOURTH_PHASE:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
case LogFileOperationRecord::READ_SR_FOURTH_ZERO:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
case LogFileOperationRecord::READ_SR_INVALIDATE_PAGES:
|
||||
jam()
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
return;
|
||||
break;
|
||||
}//switch
|
||||
return;
|
||||
{
|
||||
char msg[100];
|
||||
sprintf(msg, "File system read failed during LogFileOperationRecord state %d", (Uint32)lfoPtr.p->lfoState);
|
||||
fsRefError(signal,__LINE__,msg);
|
||||
}
|
||||
}//Dblqh::execFSREADREF()
|
||||
|
||||
/* *************** */
|
||||
@ -12115,49 +12070,43 @@ void Dblqh::execFSWRITEREF(Signal* signal)
|
||||
switch (lfoPtr.p->lfoState) {
|
||||
case LogFileOperationRecord::WRITE_PAGE_ZERO:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
case LogFileOperationRecord::LAST_WRITE_IN_FILE:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
case LogFileOperationRecord::INIT_WRITE_AT_END:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
case LogFileOperationRecord::INIT_FIRST_PAGE:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
case LogFileOperationRecord::WRITE_GCI_ZERO:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
case LogFileOperationRecord::WRITE_DIRTY:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
case LogFileOperationRecord::WRITE_INIT_MBYTE:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
case LogFileOperationRecord::ACTIVE_WRITE_LOG:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
case LogFileOperationRecord::FIRST_PAGE_WRITE_IN_LOGFILE:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
case LogFileOperationRecord::WRITE_SR_INVALIDATE_PAGES:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
default:
|
||||
jam();
|
||||
systemErrorLab(signal);
|
||||
break;
|
||||
}//switch
|
||||
{
|
||||
char msg[100];
|
||||
sprintf(msg, "File system write failed during LogFileOperationRecord state %d", (Uint32)lfoPtr.p->lfoState);
|
||||
fsRefError(signal,__LINE__,msg);
|
||||
}
|
||||
}//Dblqh::execFSWRITEREF()
|
||||
|
||||
|
||||
|
@ -1051,20 +1051,15 @@ private:
|
||||
void execTUP_SRREQ(Signal* signal);
|
||||
void execTUP_PREPLCPREQ(Signal* signal);
|
||||
void execFSOPENCONF(Signal* signal);
|
||||
void execFSOPENREF(Signal* signal);
|
||||
void execFSCLOSECONF(Signal* signal);
|
||||
void execFSCLOSEREF(Signal* signal);
|
||||
void execFSWRITECONF(Signal* signal);
|
||||
void execFSWRITEREF(Signal* signal);
|
||||
void execFSREADCONF(Signal* signal);
|
||||
void execFSREADREF(Signal* signal);
|
||||
void execNDB_STTOR(Signal* signal);
|
||||
void execREAD_CONFIG_REQ(Signal* signal);
|
||||
void execSET_VAR_REQ(Signal* signal);
|
||||
void execDROP_TAB_REQ(Signal* signal);
|
||||
void execALTER_TAB_REQ(Signal* signal);
|
||||
void execFSREMOVECONF(Signal* signal);
|
||||
void execFSREMOVEREF(Signal* signal);
|
||||
void execTUP_ALLOCREQ(Signal* signal);
|
||||
void execTUP_DEALLOCREQ(Signal* signal);
|
||||
void execTUP_WRITELOG_REQ(Signal* signal);
|
||||
|
@ -25,7 +25,6 @@
|
||||
#include <AttributeHeader.hpp>
|
||||
#include <Interpreter.hpp>
|
||||
#include <signaldata/FsConf.hpp>
|
||||
#include <signaldata/FsRef.hpp>
|
||||
#include <signaldata/FsRemoveReq.hpp>
|
||||
#include <signaldata/TupCommit.hpp>
|
||||
#include <signaldata/TupKey.hpp>
|
||||
@ -117,13 +116,9 @@ Dbtup::Dbtup(const class Configuration & conf)
|
||||
addRecSignal(GSN_TUP_SRREQ, &Dbtup::execTUP_SRREQ);
|
||||
addRecSignal(GSN_TUP_PREPLCPREQ, &Dbtup::execTUP_PREPLCPREQ);
|
||||
addRecSignal(GSN_FSOPENCONF, &Dbtup::execFSOPENCONF);
|
||||
addRecSignal(GSN_FSOPENREF, &Dbtup::execFSOPENREF);
|
||||
addRecSignal(GSN_FSCLOSECONF, &Dbtup::execFSCLOSECONF);
|
||||
addRecSignal(GSN_FSCLOSEREF, &Dbtup::execFSCLOSEREF);
|
||||
addRecSignal(GSN_FSWRITECONF, &Dbtup::execFSWRITECONF);
|
||||
addRecSignal(GSN_FSWRITEREF, &Dbtup::execFSWRITEREF);
|
||||
addRecSignal(GSN_FSREADCONF, &Dbtup::execFSREADCONF);
|
||||
addRecSignal(GSN_FSREADREF, &Dbtup::execFSREADREF);
|
||||
addRecSignal(GSN_NDB_STTOR, &Dbtup::execNDB_STTOR);
|
||||
addRecSignal(GSN_READ_CONFIG_REQ, &Dbtup::execREAD_CONFIG_REQ, true);
|
||||
addRecSignal(GSN_SET_VAR_REQ, &Dbtup::execSET_VAR_REQ);
|
||||
@ -133,7 +128,6 @@ Dbtup::Dbtup(const class Configuration & conf)
|
||||
addRecSignal(GSN_DROP_TRIG_REQ, &Dbtup::execDROP_TRIG_REQ);
|
||||
|
||||
addRecSignal(GSN_DROP_TAB_REQ, &Dbtup::execDROP_TAB_REQ);
|
||||
addRecSignal(GSN_FSREMOVEREF, &Dbtup::execFSREMOVEREF);
|
||||
addRecSignal(GSN_FSREMOVECONF, &Dbtup::execFSREMOVECONF);
|
||||
|
||||
addRecSignal(GSN_TUP_ALLOCREQ, &Dbtup::execTUP_ALLOCREQ);
|
||||
@ -263,12 +257,6 @@ void Dbtup::execFSCLOSECONF(Signal* signal)
|
||||
releasePendingFileOpenInfoRecord(pfoPtr);
|
||||
}//Dbtup::execFSCLOSECONF()
|
||||
|
||||
void Dbtup::execFSCLOSEREF(Signal* signal)
|
||||
{
|
||||
ljamEntry();
|
||||
ndbrequire(false);
|
||||
}//Dbtup::execFSCLOSEREF()
|
||||
|
||||
void Dbtup::execFSOPENCONF(Signal* signal)
|
||||
{
|
||||
PendingFileOpenInfoPtr pfoPtr;
|
||||
@ -363,12 +351,6 @@ void Dbtup::execFSOPENCONF(Signal* signal)
|
||||
releasePendingFileOpenInfoRecord(pfoPtr);
|
||||
}//Dbtup::execFSOPENCONF()
|
||||
|
||||
void Dbtup::execFSOPENREF(Signal* signal)
|
||||
{
|
||||
ljamEntry();
|
||||
ndbrequire(false);
|
||||
}//Dbtup::execFSOPENREF()
|
||||
|
||||
void Dbtup::execFSREADCONF(Signal* signal)
|
||||
{
|
||||
DiskBufferSegmentInfoPtr dbsiPtr;
|
||||
@ -424,12 +406,6 @@ void Dbtup::execFSREADCONF(Signal* signal)
|
||||
}//switch
|
||||
}//Dbtup::execFSREADCONF()
|
||||
|
||||
void Dbtup::execFSREADREF(Signal* signal)
|
||||
{
|
||||
ljamEntry();
|
||||
ndbrequire(false);
|
||||
}//Dbtup::execFSREADREF()
|
||||
|
||||
void Dbtup::execFSWRITECONF(Signal* signal)
|
||||
{
|
||||
DiskBufferSegmentInfoPtr dbsiPtr;
|
||||
@ -478,12 +454,6 @@ void Dbtup::execFSWRITECONF(Signal* signal)
|
||||
return;
|
||||
}//Dbtup::execFSWRITECONF()
|
||||
|
||||
void Dbtup::execFSWRITEREF(Signal* signal)
|
||||
{
|
||||
ljamEntry();
|
||||
ndbrequire(false);
|
||||
}//Dbtup::execFSWRITEREF()
|
||||
|
||||
void Dbtup::execCONTINUEB(Signal* signal)
|
||||
{
|
||||
ljamEntry();
|
||||
|
@ -687,10 +687,3 @@ void Dbtup::execFSREMOVECONF(Signal* signal)
|
||||
initTab(tabPtr.p);
|
||||
}//Dbtup::execFSREMOVECONF()
|
||||
|
||||
void Dbtup::execFSREMOVEREF(Signal* signal)
|
||||
{
|
||||
ljamEntry();
|
||||
ndbrequire(false);
|
||||
}//Dbtup::execFSREMOVEREF()
|
||||
|
||||
|
||||
|
@ -309,7 +309,6 @@ private:
|
||||
Uint32 c_fsRemoveCount;
|
||||
Uint32 c_nodeGroup;
|
||||
void clearFilesystem(Signal* signal);
|
||||
void execFSREMOVEREF(Signal* signal);
|
||||
void execFSREMOVECONF(Signal* signal);
|
||||
|
||||
NdbNodeBitmask c_allDefinedNodes;
|
||||
|
@ -100,7 +100,6 @@ Ndbcntr::Ndbcntr(const class Configuration & conf):
|
||||
addRecSignal(GSN_STTORRY, &Ndbcntr::execSTTORRY);
|
||||
addRecSignal(GSN_READ_CONFIG_CONF, &Ndbcntr::execREAD_CONFIG_CONF);
|
||||
|
||||
addRecSignal(GSN_FSREMOVEREF, &Ndbcntr::execFSREMOVEREF);
|
||||
addRecSignal(GSN_FSREMOVECONF, &Ndbcntr::execFSREMOVECONF);
|
||||
|
||||
initData();
|
||||
|
@ -144,6 +144,7 @@ void Ndbcntr::execSYSTEM_ERROR(Signal* signal)
|
||||
const SystemError * const sysErr = (SystemError *)signal->getDataPtr();
|
||||
char buf[100];
|
||||
int killingNode = refToNode(sysErr->errorRef);
|
||||
Uint32 data1 = sysErr->data1;
|
||||
|
||||
jamEntry();
|
||||
switch (sysErr->errorCode){
|
||||
@ -178,8 +179,9 @@ void Ndbcntr::execSYSTEM_ERROR(Signal* signal)
|
||||
case SystemError::CopyFragRefError:
|
||||
BaseString::snprintf(buf, sizeof(buf),
|
||||
"Node %d killed this node because "
|
||||
"it could not copy a fragment during node restart",
|
||||
killingNode);
|
||||
"it could not copy a fragment during node restart. "
|
||||
"Copy fragment error code: %u.",
|
||||
killingNode, data1);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -2395,12 +2397,6 @@ Ndbcntr::clearFilesystem(Signal* signal){
|
||||
c_fsRemoveCount++;
|
||||
}
|
||||
|
||||
void
|
||||
Ndbcntr::execFSREMOVEREF(Signal* signal){
|
||||
jamEntry();
|
||||
ndbrequire(0);
|
||||
}
|
||||
|
||||
void
|
||||
Ndbcntr::execFSREMOVECONF(Signal* signal){
|
||||
jamEntry();
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <signaldata/EventReport.hpp>
|
||||
#include <signaldata/ContinueFragmented.hpp>
|
||||
#include <signaldata/NodeStateSignalData.hpp>
|
||||
#include <signaldata/FsRef.hpp>
|
||||
#include <DebuggerNames.hpp>
|
||||
#include "LongSignal.hpp"
|
||||
|
||||
@ -140,6 +141,13 @@ SimulatedBlock::installSimulatedBlockFunctions(){
|
||||
a[GSN_UTIL_UNLOCK_REF] = &SimulatedBlock::execUTIL_UNLOCK_REF;
|
||||
a[GSN_UTIL_UNLOCK_CONF] = &SimulatedBlock::execUTIL_UNLOCK_CONF;
|
||||
a[GSN_READ_CONFIG_REQ] = &SimulatedBlock::execREAD_CONFIG_REQ;
|
||||
a[GSN_FSOPENREF] = &SimulatedBlock::execFSOPENREF;
|
||||
a[GSN_FSCLOSEREF] = &SimulatedBlock::execFSCLOSEREF;
|
||||
a[GSN_FSWRITEREF] = &SimulatedBlock::execFSWRITEREF;
|
||||
a[GSN_FSREADREF] = &SimulatedBlock::execFSREADREF;
|
||||
a[GSN_FSREMOVEREF] = &SimulatedBlock::execFSREMOVEREF;
|
||||
a[GSN_FSSYNCREF] = &SimulatedBlock::execFSSYNCREF;
|
||||
a[GSN_FSAPPENDREF] = &SimulatedBlock::execFSAPPENDREF;
|
||||
}
|
||||
|
||||
void
|
||||
@ -1781,6 +1789,61 @@ SimulatedBlock::execUPGRADE(Signal* signal){
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SimulatedBlock::fsRefError(Signal* signal, Uint32 line, const char *msg)
|
||||
{
|
||||
const FsRef *fsRef = (FsRef*)signal->getDataPtr();
|
||||
Uint32 errorCode = fsRef->errorCode;
|
||||
Uint32 osErrorCode = fsRef->osErrorCode;
|
||||
char msg2[100];
|
||||
|
||||
sprintf(msg2, "%s: %s. OS errno: %u", getBlockName(number()), msg, osErrorCode);
|
||||
|
||||
progError(line, errorCode, msg2);
|
||||
}
|
||||
|
||||
void
|
||||
SimulatedBlock::execFSWRITEREF(Signal* signal)
|
||||
{
|
||||
fsRefError(signal, __LINE__, "File system write failed");
|
||||
}
|
||||
|
||||
void
|
||||
SimulatedBlock::execFSREADREF(Signal* signal)
|
||||
{
|
||||
fsRefError(signal, __LINE__, "File system read failed");
|
||||
}
|
||||
|
||||
void
|
||||
SimulatedBlock::execFSCLOSEREF(Signal* signal)
|
||||
{
|
||||
fsRefError(signal, __LINE__, "File system close failed");
|
||||
}
|
||||
|
||||
void
|
||||
SimulatedBlock::execFSOPENREF(Signal* signal)
|
||||
{
|
||||
fsRefError(signal, __LINE__, "File system open failed");
|
||||
}
|
||||
|
||||
void
|
||||
SimulatedBlock::execFSREMOVEREF(Signal* signal)
|
||||
{
|
||||
fsRefError(signal, __LINE__, "File system remove failed");
|
||||
}
|
||||
|
||||
void
|
||||
SimulatedBlock::execFSSYNCREF(Signal* signal)
|
||||
{
|
||||
fsRefError(signal, __LINE__, "File system sync failed");
|
||||
}
|
||||
|
||||
void
|
||||
SimulatedBlock::execFSAPPENDREF(Signal* signal)
|
||||
{
|
||||
fsRefError(signal, __LINE__, "File system append failed");
|
||||
}
|
||||
|
||||
#ifdef VM_TRACE
|
||||
void
|
||||
SimulatedBlock::clear_global_variables(){
|
||||
|
@ -487,6 +487,15 @@ private:
|
||||
protected:
|
||||
void execUPGRADE(Signal* signal);
|
||||
|
||||
void fsRefError(Signal* signal, Uint32 line, const char *msg);
|
||||
void execFSWRITEREF(Signal* signal);
|
||||
void execFSREADREF(Signal* signal);
|
||||
void execFSOPENREF(Signal* signal);
|
||||
void execFSCLOSEREF(Signal* signal);
|
||||
void execFSREMOVEREF(Signal* signal);
|
||||
void execFSSYNCREF(Signal* signal);
|
||||
void execFSAPPENDREF(Signal* signal);
|
||||
|
||||
// Variable for storing inserted errors, see pc.H
|
||||
ERROR_INSERT_VARIABLE;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user