Commit 344945c4 authored by unknown's avatar unknown

ndb - bug#27003

  merge to 5.1, adopt testprg to optimized node recovery


storage/ndb/include/kernel/signaldata/LqhKey.hpp:
  Add Restore as friend
storage/ndb/src/kernel/blocks/restore.cpp:
  Give proper error message on LQHKEYREF
storage/ndb/test/ndbapi/testNodeRestart.cpp:
  post merge fix, adopt to optimized node recovery...
parent c3d3c80b
......@@ -582,6 +582,7 @@ class LqhKeyRef {
* Reciver(s)
*/
friend class Dbtc;
friend class Restore;
/**
* Sender(s)
......
......@@ -1154,8 +1154,23 @@ Restore::calulate_hash(Uint32 tableId, const Uint32 *src)
}
void
Restore::execLQHKEYREF(Signal*)
Restore::execLQHKEYREF(Signal* signal)
{
FilePtr file_ptr;
LqhKeyRef* ref = (LqhKeyRef*)signal->getDataPtr();
m_file_pool.getPtr(file_ptr, ref->connectPtr);
char buf[255], name[100];
BaseString::snprintf(name, sizeof(name), "%u/T%dF%d",
file_ptr.p->m_lcp_no,
file_ptr.p->m_table_id,
file_ptr.p->m_fragment_id);
BaseString::snprintf(buf, sizeof(buf),
"Error %d during restore of %s",
ref->errorCode, name);
progError(__LINE__, NDBD_EXIT_INVALID_LCP_FILE, buf);
ndbrequire(false);
}
......
......@@ -1332,7 +1332,7 @@ runBug27003(NDBT_Context* ctx, NDBT_Step* step)
int node = res.getRandomNotMasterNodeId(rand());
ndbout_c("node: %d", node);
if (res.restartOneDbNode(node, false, true, true))
if (res.restartOneDbNode(node, true, true, true))
return NDBT_FAILED;
Uint32 pos = 0;
......@@ -1351,7 +1351,7 @@ runBug27003(NDBT_Context* ctx, NDBT_Step* step)
if (res.insertErrorInNode(node, errnos[pos]))
return NDBT_FAILED;
int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 3 };
if (res.dumpStateOneNode(node, val2, 2))
return NDBT_FAILED;
......
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