skip check_major_status in upgrade post stage
This commit is contained in:
@ -117,7 +117,7 @@ public:
|
||||
// check status on serialized medium list
|
||||
OB_INLINE bool could_schedule_next_round() const
|
||||
{
|
||||
return !wait_check_flag_ && medium_info_list_.is_empty();
|
||||
return get_wait_check_medium_scn() == 0 && medium_info_list_.is_empty();
|
||||
}
|
||||
const ObMediumCompactionInfo *get_next_schedule_medium_info(const int64_t last_major_snapshot) const;
|
||||
OB_INLINE ObMediumCompactionInfo::ObCompactionType get_last_compaction_type() const
|
||||
|
||||
@ -65,7 +65,7 @@ def do_upgrade(my_host, my_port, my_user, my_passwd, timeout, my_module_set, upg
|
||||
|
||||
if run_modules.MODULE_HEALTH_CHECK in my_module_set:
|
||||
logging.info('================begin to run health check action ===============')
|
||||
upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout)
|
||||
upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, False) # need_check_major_status = False
|
||||
logging.info('================succeed to run health check action ===============')
|
||||
|
||||
if run_modules.MODULE_END_ROLLING_UPGRADE in my_module_set:
|
||||
|
||||
@ -87,7 +87,7 @@ def do_upgrade(my_host, my_port, my_user, my_passwd, timeout, my_module_set, upg
|
||||
|
||||
if run_modules.MODULE_HEALTH_CHECK in my_module_set:
|
||||
logging.info('================begin to run health check action ===============')
|
||||
upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout)
|
||||
upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, True) # need_check_major_status = True
|
||||
logging.info('================succeed to run health check action ===============')
|
||||
|
||||
except Exception, e:
|
||||
|
||||
@ -356,7 +356,7 @@ def check_until_timeout(query_cur, sql, value, timeout):
|
||||
time.sleep(10)
|
||||
|
||||
# 开始健康检查
|
||||
def do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, zone = ''):
|
||||
def do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, need_check_major_status, zone = ''):
|
||||
try:
|
||||
conn = mysql.connector.connect(user = my_user,
|
||||
password = my_passwd,
|
||||
@ -374,7 +374,8 @@ def do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, zone
|
||||
check_paxos_replica(query_cur, timeout)
|
||||
check_schema_status(query_cur, timeout)
|
||||
check_server_version_by_zone(query_cur, zone)
|
||||
check_major_merge(query_cur, timeout)
|
||||
if True == need_check_major_status:
|
||||
check_major_merge(query_cur, timeout)
|
||||
except Exception, e:
|
||||
logging.exception('run error')
|
||||
raise e
|
||||
@ -409,7 +410,7 @@ if __name__ == '__main__':
|
||||
zone = get_opt_zone()
|
||||
logging.info('parameters from cmd: host=\"%s\", port=%s, user=\"%s\", password=\"%s\", log-file=\"%s\", timeout=%s, zone=\"%s\"', \
|
||||
host, port, user, password, log_filename, timeout, zone)
|
||||
do_check(host, port, user, password, upgrade_params, timeout, zone)
|
||||
do_check(host, port, user, password, upgrade_params, timeout, False, zone) # need_check_major_status = False
|
||||
except mysql.connector.Error, e:
|
||||
logging.exception('mysql connctor error')
|
||||
raise e
|
||||
|
||||
@ -570,7 +570,7 @@
|
||||
#
|
||||
# if run_modules.MODULE_HEALTH_CHECK in my_module_set:
|
||||
# logging.info('================begin to run health check action ===============')
|
||||
# upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout)
|
||||
# upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, False) # need_check_major_status = False
|
||||
# logging.info('================succeed to run health check action ===============')
|
||||
#
|
||||
# if run_modules.MODULE_END_ROLLING_UPGRADE in my_module_set:
|
||||
@ -756,7 +756,7 @@
|
||||
#
|
||||
# if run_modules.MODULE_HEALTH_CHECK in my_module_set:
|
||||
# logging.info('================begin to run health check action ===============')
|
||||
# upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout)
|
||||
# upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, True) # need_check_major_status = True
|
||||
# logging.info('================succeed to run health check action ===============')
|
||||
#
|
||||
# except Exception, e:
|
||||
@ -2554,7 +2554,7 @@
|
||||
# time.sleep(10)
|
||||
#
|
||||
## 开始健康检查
|
||||
#def do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, zone = ''):
|
||||
#def do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, need_check_major_status, zone = ''):
|
||||
# try:
|
||||
# conn = mysql.connector.connect(user = my_user,
|
||||
# password = my_passwd,
|
||||
@ -2572,7 +2572,8 @@
|
||||
# check_paxos_replica(query_cur, timeout)
|
||||
# check_schema_status(query_cur, timeout)
|
||||
# check_server_version_by_zone(query_cur, zone)
|
||||
# check_major_merge(query_cur, timeout)
|
||||
# if True == need_check_major_status:
|
||||
# check_major_merge(query_cur, timeout)
|
||||
# except Exception, e:
|
||||
# logging.exception('run error')
|
||||
# raise e
|
||||
@ -2607,7 +2608,7 @@
|
||||
# zone = get_opt_zone()
|
||||
# logging.info('parameters from cmd: host=\"%s\", port=%s, user=\"%s\", password=\"%s\", log-file=\"%s\", timeout=%s, zone=\"%s\"', \
|
||||
# host, port, user, password, log_filename, timeout, zone)
|
||||
# do_check(host, port, user, password, upgrade_params, timeout, zone)
|
||||
# do_check(host, port, user, password, upgrade_params, timeout, False, zone) # need_check_major_status = False
|
||||
# except mysql.connector.Error, e:
|
||||
# logging.exception('mysql connctor error')
|
||||
# raise e
|
||||
|
||||
@ -570,7 +570,7 @@
|
||||
#
|
||||
# if run_modules.MODULE_HEALTH_CHECK in my_module_set:
|
||||
# logging.info('================begin to run health check action ===============')
|
||||
# upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout)
|
||||
# upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, False) # need_check_major_status = False
|
||||
# logging.info('================succeed to run health check action ===============')
|
||||
#
|
||||
# if run_modules.MODULE_END_ROLLING_UPGRADE in my_module_set:
|
||||
@ -756,7 +756,7 @@
|
||||
#
|
||||
# if run_modules.MODULE_HEALTH_CHECK in my_module_set:
|
||||
# logging.info('================begin to run health check action ===============')
|
||||
# upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout)
|
||||
# upgrade_health_checker.do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, True) # need_check_major_status = True
|
||||
# logging.info('================succeed to run health check action ===============')
|
||||
#
|
||||
# except Exception, e:
|
||||
@ -2554,7 +2554,7 @@
|
||||
# time.sleep(10)
|
||||
#
|
||||
## 开始健康检查
|
||||
#def do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, zone = ''):
|
||||
#def do_check(my_host, my_port, my_user, my_passwd, upgrade_params, timeout, need_check_major_status, zone = ''):
|
||||
# try:
|
||||
# conn = mysql.connector.connect(user = my_user,
|
||||
# password = my_passwd,
|
||||
@ -2572,7 +2572,8 @@
|
||||
# check_paxos_replica(query_cur, timeout)
|
||||
# check_schema_status(query_cur, timeout)
|
||||
# check_server_version_by_zone(query_cur, zone)
|
||||
# check_major_merge(query_cur, timeout)
|
||||
# if True == need_check_major_status:
|
||||
# check_major_merge(query_cur, timeout)
|
||||
# except Exception, e:
|
||||
# logging.exception('run error')
|
||||
# raise e
|
||||
@ -2607,7 +2608,7 @@
|
||||
# zone = get_opt_zone()
|
||||
# logging.info('parameters from cmd: host=\"%s\", port=%s, user=\"%s\", password=\"%s\", log-file=\"%s\", timeout=%s, zone=\"%s\"', \
|
||||
# host, port, user, password, log_filename, timeout, zone)
|
||||
# do_check(host, port, user, password, upgrade_params, timeout, zone)
|
||||
# do_check(host, port, user, password, upgrade_params, timeout, False, zone) # need_check_major_status = False
|
||||
# except mysql.connector.Error, e:
|
||||
# logging.exception('mysql connctor error')
|
||||
# raise e
|
||||
|
||||
Reference in New Issue
Block a user