Commit 6ac6b08c authored by unknown's avatar unknown

ndb - bug#18298

  8 repeated nr with table wo/ logging cause crash
  Dont create crashed replica for temporary tables


ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
  Dont create crashed replica for temporary tables
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Dont create crashed replica for temporary tables
parent b0a73946
...@@ -1038,7 +1038,8 @@ private: ...@@ -1038,7 +1038,8 @@ private:
void prepareReplicas(FragmentstorePtr regFragptr); void prepareReplicas(FragmentstorePtr regFragptr);
void removeNodeFromStored(Uint32 nodeId, void removeNodeFromStored(Uint32 nodeId,
FragmentstorePtr regFragptr, FragmentstorePtr regFragptr,
ReplicaRecordPtr replicaPtr); ReplicaRecordPtr replicaPtr,
bool temporary);
void removeOldStoredReplica(FragmentstorePtr regFragptr, void removeOldStoredReplica(FragmentstorePtr regFragptr,
ReplicaRecordPtr replicaPtr); ReplicaRecordPtr replicaPtr);
void removeStoredReplica(FragmentstorePtr regFragptr, void removeStoredReplica(FragmentstorePtr regFragptr,
......
...@@ -5212,6 +5212,7 @@ void Dbdih::removeNodeFromTable(Signal* signal, ...@@ -5212,6 +5212,7 @@ void Dbdih::removeNodeFromTable(Signal* signal,
//const Uint32 lcpId = SYSFILE->latestLCP_ID; //const Uint32 lcpId = SYSFILE->latestLCP_ID;
const bool lcpOngoingFlag = (tabPtr.p->tabLcpStatus== TabRecord::TLS_ACTIVE); const bool lcpOngoingFlag = (tabPtr.p->tabLcpStatus== TabRecord::TLS_ACTIVE);
const bool temporary = !tabPtr.p->storedTable;
FragmentstorePtr fragPtr; FragmentstorePtr fragPtr;
for(Uint32 fragNo = 0; fragNo < tabPtr.p->totalfragments; fragNo++){ for(Uint32 fragNo = 0; fragNo < tabPtr.p->totalfragments; fragNo++){
...@@ -5232,7 +5233,7 @@ void Dbdih::removeNodeFromTable(Signal* signal, ...@@ -5232,7 +5233,7 @@ void Dbdih::removeNodeFromTable(Signal* signal,
jam(); jam();
found = true; found = true;
noOfRemovedReplicas++; noOfRemovedReplicas++;
removeNodeFromStored(nodeId, fragPtr, replicaPtr); removeNodeFromStored(nodeId, fragPtr, replicaPtr, temporary);
if(replicaPtr.p->lcpOngoingFlag){ if(replicaPtr.p->lcpOngoingFlag){
jam(); jam();
/** /**
...@@ -12051,9 +12052,18 @@ void Dbdih::removeDeadNode(NodeRecordPtr removeNodePtr) ...@@ -12051,9 +12052,18 @@ void Dbdih::removeDeadNode(NodeRecordPtr removeNodePtr)
/*---------------------------------------------------------------*/ /*---------------------------------------------------------------*/
void Dbdih::removeNodeFromStored(Uint32 nodeId, void Dbdih::removeNodeFromStored(Uint32 nodeId,
FragmentstorePtr fragPtr, FragmentstorePtr fragPtr,
ReplicaRecordPtr replicatePtr) ReplicaRecordPtr replicatePtr,
bool temporary)
{ {
if (!temporary)
{
jam();
newCrashedReplica(nodeId, replicatePtr); newCrashedReplica(nodeId, replicatePtr);
}
else
{
jam();
}
removeStoredReplica(fragPtr, replicatePtr); removeStoredReplica(fragPtr, replicatePtr);
linkOldStoredReplica(fragPtr, replicatePtr); linkOldStoredReplica(fragPtr, replicatePtr);
ndbrequire(fragPtr.p->storedReplicas != RNIL); ndbrequire(fragPtr.p->storedReplicas != RNIL);
......
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