ndb - testframework

  impl. ugly flag to skip dict cache invalidation as it break all testSystemRestart testcases
parent b7ce47b2
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <mgmapi_config_parameters.h> #include <mgmapi_config_parameters.h>
int global_flag_send_heartbeat_now= 0; int global_flag_send_heartbeat_now= 0;
int global_flag_skip_invalidate_cache = 0;
// Just a C wrapper for threadMain // Just a C wrapper for threadMain
extern "C" extern "C"
...@@ -458,11 +459,14 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){ ...@@ -458,11 +459,14 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){
theNode.nfCompleteRep = false; theNode.nfCompleteRep = false;
if(noOfAliveNodes == 0) if(noOfAliveNodes == 0)
{ {
theFacade.m_globalDictCache.lock(); if (!global_flag_skip_invalidate_cache)
theFacade.m_globalDictCache.invalidate_all(); {
theFacade.m_globalDictCache.unlock(); theFacade.m_globalDictCache.lock();
m_connect_count ++; theFacade.m_globalDictCache.invalidate_all();
m_cluster_state = CS_waiting_for_clean_cache; theFacade.m_globalDictCache.unlock();
m_connect_count ++;
m_cluster_state = CS_waiting_for_clean_cache;
}
NFCompleteRep rep; NFCompleteRep rep;
for(Uint32 i = 1; i<MAX_NODES; i++){ for(Uint32 i = 1; i<MAX_NODES; i++){
if(theNodes[i].defined && theNodes[i].nfCompleteRep == false){ if(theNodes[i].defined && theNodes[i].nfCompleteRep == false){
......
...@@ -1149,6 +1149,8 @@ static struct my_option my_long_options[] = ...@@ -1149,6 +1149,8 @@ static struct my_option my_long_options[] =
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
}; };
extern int global_flag_skip_invalidate_cache;
static void usage() static void usage()
{ {
ndb_std_print_version(); ndb_std_print_version();
...@@ -1236,6 +1238,8 @@ int NDBT_TestSuite::execute(int argc, const char** argv){ ...@@ -1236,6 +1238,8 @@ int NDBT_TestSuite::execute(int argc, const char** argv){
ndbout_c("random seed: %u", opt_seed); ndbout_c("random seed: %u", opt_seed);
srand(opt_seed); srand(opt_seed);
srandom(opt_seed); srandom(opt_seed);
global_flag_skip_invalidate_cache = 1;
{ {
Ndb ndb(&con, "TEST_DB"); Ndb ndb(&con, "TEST_DB");
......
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