Commit 9cc4859d authored by unknown's avatar unknown

BUG #19146 If Backup parameters incorrectly set, the data nodes can't start.


storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  If FailedToSetupFsBuffers in BACKUP block, it will send back DEFINE_BACKUP_REF to LQH.
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  If get DEFINE_BACKUP_REF signal , LQH will crash and give some messages in error log.
parent 5f01559a
......@@ -2387,6 +2387,18 @@ Backup::defineBackupRef(Signal* signal, BackupRecordPtr ptr, Uint32 errCode)
if(ptr.p->is_lcp())
{
jam();
if (ptr.p->ctlFilePtr == RNIL) {
ptr.p->m_gsn = GSN_DEFINE_BACKUP_REF;
ndbrequire(ptr.p->errorCode != 0);
DefineBackupRef* ref = (DefineBackupRef*)signal->getDataPtrSend();
ref->backupId = ptr.p->backupId;
ref->backupPtr = ptr.i;
ref->errorCode = ptr.p->errorCode;
ref->nodeId = getOwnNodeId();
sendSignal(ptr.p->masterRef, GSN_DEFINE_BACKUP_REF, signal,
DefineBackupRef::SignalLength, JBB);
return;
}
BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr);
......
......@@ -566,6 +566,26 @@ Dblqh::execDEFINE_BACKUP_REF(Signal* signal)
{
jamEntry();
m_backup_ptr = RNIL;
DefineBackupRef* ref = (DefineBackupRef*)signal->getDataPtrSend();
int err_code = 0;
char * extra_msg = NULL;
switch(ref->errorCode){
case DefineBackupRef::Undefined:
case DefineBackupRef::FailedToSetupFsBuffers:
case DefineBackupRef::FailedToAllocateBuffers:
case DefineBackupRef::FailedToAllocateTables:
case DefineBackupRef::FailedAllocateTableMem:
case DefineBackupRef::FailedToAllocateFileRecord:
case DefineBackupRef::FailedToAllocateAttributeRecord:
case DefineBackupRef::FailedInsertFileHeader:
case DefineBackupRef::FailedInsertTableList:
jam();
err_code = NDBD_EXIT_INVALID_CONFIG;
extra_msg = "Probably Backup parameters configuration error, Please consult the manual";
progError(__LINE__, err_code, extra_msg);
}
sendsttorryLab(signal);
}
......
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