Commit 59ffe5bd authored by pekka@mysql.com's avatar pekka@mysql.com

ndb - bug#8876 third and final solution

parent 4b7d6244
...@@ -5923,11 +5923,17 @@ int Dbtc::releaseAndAbort(Signal* signal) ...@@ -5923,11 +5923,17 @@ int Dbtc::releaseAndAbort(Signal* signal)
UintR TnoLoops = tcConnectptr.p->noOfNodes; UintR TnoLoops = tcConnectptr.p->noOfNodes;
apiConnectptr.p->counter++; apiConnectptr.p->counter++;
bool prevAlive = false;
for (Uint32 Ti = 0; Ti < TnoLoops ; Ti++) { for (Uint32 Ti = 0; Ti < TnoLoops ; Ti++) {
localHostptr.i = tcConnectptr.p->tcNodedata[Ti]; localHostptr.i = tcConnectptr.p->tcNodedata[Ti];
ptrCheckGuard(localHostptr, chostFilesize, hostRecord); ptrCheckGuard(localHostptr, chostFilesize, hostRecord);
if (localHostptr.p->hostStatus == HS_ALIVE) { if (localHostptr.p->hostStatus == HS_ALIVE) {
jam(); jam();
if (prevAlive) {
// if previous is alive, its LQH forwards abort to this node
jam();
continue;
}
/* ************< */ /* ************< */
/* ABORT < */ /* ABORT < */
/* ************< */ /* ************< */
...@@ -5937,6 +5943,7 @@ int Dbtc::releaseAndAbort(Signal* signal) ...@@ -5937,6 +5943,7 @@ int Dbtc::releaseAndAbort(Signal* signal)
signal->theData[2] = apiConnectptr.p->transid[0]; signal->theData[2] = apiConnectptr.p->transid[0];
signal->theData[3] = apiConnectptr.p->transid[1]; signal->theData[3] = apiConnectptr.p->transid[1];
sendSignal(tblockref, GSN_ABORT, signal, 4, JBB); sendSignal(tblockref, GSN_ABORT, signal, 4, JBB);
prevAlive = true;
} else { } else {
jam(); jam();
signal->theData[0] = tcConnectptr.i; signal->theData[0] = tcConnectptr.i;
...@@ -5945,6 +5952,7 @@ int Dbtc::releaseAndAbort(Signal* signal) ...@@ -5945,6 +5952,7 @@ int Dbtc::releaseAndAbort(Signal* signal)
signal->theData[3] = localHostptr.i; signal->theData[3] = localHostptr.i;
signal->theData[4] = ZFALSE; signal->theData[4] = ZFALSE;
sendSignal(cownref, GSN_ABORTED, signal, 5, JBB); sendSignal(cownref, GSN_ABORTED, signal, 5, JBB);
prevAlive = false;
}//if }//if
}//for }//for
return 1; return 1;
......
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