Commit 8c35f44b authored by tomas@poseidon.mysql.com's avatar tomas@poseidon.mysql.com
Browse files

Bug #28899 not possible to set separate watchdog timeout at startup

parent 8a9bf139
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -81,6 +81,8 @@
#define CFG_DB_BACKUP_WRITE_SIZE          136
#define CFG_DB_BACKUP_MAX_WRITE_SIZE      139

#define CFG_DB_WATCHDOG_INTERVAL_INITIAL  141

#define CFG_LOG_DESTINATION           147

#define CFG_DB_DISCLESS               148
+0 −4
Original line number Diff line number Diff line
@@ -37,9 +37,6 @@ NDB_TICKS NdbTick_CurrentMillisecond(void);
 */
int NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros);

  /*#define TIME_MEASUREMENT*/
#ifdef TIME_MEASUREMENT

struct MicroSecondTimer {
  NDB_TICKS seconds;
  NDB_TICKS micro_seconds;
@@ -54,7 +51,6 @@ struct MicroSecondTimer {
NDB_TICKS NdbTick_getMicrosPassed(struct MicroSecondTimer start,
                            struct MicroSecondTimer stop);
int NdbTick_getMicroTimer(struct MicroSecondTimer* time_now);
#endif

#ifdef	__cplusplus
}
+1 −3
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@


#include <ndb_global.h>
#include "NdbTick.h"
#include <NdbTick.h>

#define NANOSEC_PER_SEC  1000000000
#define MICROSEC_PER_SEC 1000000
@@ -71,7 +71,6 @@ NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros){
}

#endif
#ifdef TIME_MEASUREMENT
int
NdbTick_getMicroTimer(struct MicroSecondTimer* input_timer)
{
@@ -102,4 +101,3 @@ NdbTick_getMicrosPassed(struct MicroSecondTimer start,
  }
  return ret_value;
}
#endif
+8 −0
Original line number Diff line number Diff line
@@ -277,6 +277,14 @@ void Ndbcntr::execSTTOR(Signal* signal)
    break;
  case ZSTART_PHASE_1:
    jam();
    {
      Uint32 db_watchdog_interval = 0;
      const ndb_mgm_configuration_iterator * p = 
        m_ctx.m_config.getOwnConfigIterator();
      ndb_mgm_get_int_parameter(p, CFG_DB_WATCHDOG_INTERVAL, &db_watchdog_interval);
      ndbrequire(db_watchdog_interval);
      update_watch_dog_timer(db_watchdog_interval);
    }
    startPhase1Lab(signal);
    break;
  case ZSTART_PHASE_2:
+10 −2
Original line number Diff line number Diff line
@@ -443,6 +443,11 @@ Configuration::setupConfiguration(){
	      "TimeBetweenWatchDogCheck missing");
  }

  if(iter.get(CFG_DB_WATCHDOG_INTERVAL_INITIAL, &_timeBetweenWatchDogCheckInitial)){
    ERROR_SET(fatal, NDBD_EXIT_INVALID_CONFIG, "Invalid configuration fetched", 
	      "TimeBetweenWatchDogCheckInitial missing");
  }

  /**
   * Get paths
   */  
@@ -462,9 +467,12 @@ Configuration::setupConfiguration(){
   * Create the watch dog thread
   */
  { 
    Uint32 t = _timeBetweenWatchDogCheck;
    if (_timeBetweenWatchDogCheckInitial < _timeBetweenWatchDogCheck)
      _timeBetweenWatchDogCheckInitial = _timeBetweenWatchDogCheck;

    Uint32 t = _timeBetweenWatchDogCheckInitial;
    t = globalEmulatorData.theWatchDog ->setCheckInterval(t);
    _timeBetweenWatchDogCheck = t;
    _timeBetweenWatchDogCheckInitial = t;
  }
  
  ConfigValues* cf = ConfigValuesFactory::extractCurrentSection(iter.m_config);
Loading