summaryrefslogtreecommitdiff
path: root/storage/ndb/src
diff options
context:
space:
mode:
authorjonas@eel.(none) <>2007-02-02 17:07:15 +0100
committerjonas@eel.(none) <>2007-02-02 17:07:15 +0100
commitef38f9b780692e054e9bba386b12952f94071ea6 (patch)
tree1c18f983abd72ceeb3f493c6f728e20c852cacf3 /storage/ndb/src
parent9f69d9ffde92ad678d33cbbdcdf3ee9d575ad5a3 (diff)
downloadmariadb-git-ef38f9b780692e054e9bba386b12952f94071ea6.tar.gz
ndb - bug#25984 - more than 7 failed node restart can cause cluster failure
new behaviour is as follows: 1) node is refused to start, and should fail with message in error log that it must be restarted --initial 2) if cluster failure in this situation, node must also be restarted --intial if not SR will fail, with this message
Diffstat (limited to 'storage/ndb/src')
-rw-r--r--storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp29
1 files changed, 27 insertions, 2 deletions
diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index 3512ba10af3..163e4c61533 100644
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -1525,10 +1525,26 @@ void Dbdih::ndbStartReqLab(Signal* signal, BlockReference ref)
*/
SYSFILE->lastCompletedGCI[nodePtr.i] = 0;
ndbrequire(nodePtr.p->nodeStatus != NodeRecord::ALIVE);
- warningEvent("Making filesystem for node %d unusable",
+ warningEvent("Making filesystem for node %d unusable (need --initial)",
nodePtr.i);
}
+ else if (nodePtr.p->nodeStatus == NodeRecord::ALIVE &&
+ SYSFILE->lastCompletedGCI[nodePtr.i] == 0)
+ {
+ jam();
+ CRASH_INSERTION(7170);
+ char buf[255];
+ BaseString::snprintf(buf, sizeof(buf),
+ "Cluster requires this node to be started "
+ " with --initial as partial start has been performed"
+ " and this filesystem is unusable");
+ progError(__LINE__,
+ NDBD_EXIT_SR_RESTARTCONFLICT,
+ buf);
+ ndbrequire(false);
+ }
}
+
/**
* This set which GCI we will try to restart to
*/
@@ -12515,14 +12531,23 @@ void Dbdih::newCrashedReplica(Uint32 nodeId, ReplicaRecordPtr ncrReplicaPtr)
/* THAT THE NEW REPLICA IS NOT STARTED YET AND REPLICA_LAST_GCI IS*/
/* SET TO -1 TO INDICATE THAT IT IS NOT DEAD YET. */
/*----------------------------------------------------------------------*/
+ Uint32 lastGCI = SYSFILE->lastCompletedGCI[nodeId];
arrGuardErr(ncrReplicaPtr.p->noCrashedReplicas + 1, 8,
NDBD_EXIT_MAX_CRASHED_REPLICAS);
ncrReplicaPtr.p->replicaLastGci[ncrReplicaPtr.p->noCrashedReplicas] =
- SYSFILE->lastCompletedGCI[nodeId];
+ lastGCI;
ncrReplicaPtr.p->noCrashedReplicas = ncrReplicaPtr.p->noCrashedReplicas + 1;
ncrReplicaPtr.p->createGci[ncrReplicaPtr.p->noCrashedReplicas] = 0;
ncrReplicaPtr.p->replicaLastGci[ncrReplicaPtr.p->noCrashedReplicas] =
(Uint32)-1;
+
+ if (ncrReplicaPtr.p->noCrashedReplicas == 7 && lastGCI)
+ {
+ jam();
+ SYSFILE->lastCompletedGCI[nodeId] = 0;
+ warningEvent("Making filesystem for node %d unusable (need --initial)",
+ nodeId);
+ }
}//Dbdih::newCrashedReplica()
/*************************************************************************/