add major_status check before suspend in upgrade
This commit is contained in:
parent
7b4f5eeffe
commit
39d11ce2ce
@ -15,6 +15,7 @@ import binascii
|
|||||||
import my_utils
|
import my_utils
|
||||||
import actions
|
import actions
|
||||||
import sys
|
import sys
|
||||||
|
import upgrade_health_checker
|
||||||
|
|
||||||
# 主库需要执行的升级动作
|
# 主库需要执行的升级动作
|
||||||
def do_special_upgrade(conn, cur, timeout, user, passwd):
|
def do_special_upgrade(conn, cur, timeout, user, passwd):
|
||||||
@ -29,6 +30,11 @@ def do_special_upgrade(conn, cur, timeout, user, passwd):
|
|||||||
actions.set_parameter(cur, 'enable_ddl', 'False', timeout)
|
actions.set_parameter(cur, 'enable_ddl', 'False', timeout)
|
||||||
actions.set_parameter(cur, 'enable_major_freeze', 'False', timeout)
|
actions.set_parameter(cur, 'enable_major_freeze', 'False', timeout)
|
||||||
actions.set_tenant_parameter(cur, '_enable_adaptive_compaction', 'False', timeout)
|
actions.set_tenant_parameter(cur, '_enable_adaptive_compaction', 'False', timeout)
|
||||||
|
# wait scheduler in storage to notice adaptive_compaction is switched to false
|
||||||
|
time.sleep(60 * 2)
|
||||||
|
query_cur = actions.QueryCursor(cur)
|
||||||
|
wait_major_timeout = 600
|
||||||
|
upgrade_health_checker.check_major_merge(query_cur, wait_major_timeout)
|
||||||
actions.do_suspend_merge(cur, timeout)
|
actions.do_suspend_merge(cur, timeout)
|
||||||
# When upgrading from a version prior to 4.2 to version 4.2, the bloom_filter should be disabled.
|
# When upgrading from a version prior to 4.2 to version 4.2, the bloom_filter should be disabled.
|
||||||
# The param _bloom_filter_enabled is no longer in use as of version 4.2, there is no need to enable it again.
|
# The param _bloom_filter_enabled is no longer in use as of version 4.2, there is no need to enable it again.
|
||||||
|
@ -1263,6 +1263,7 @@
|
|||||||
#import my_utils
|
#import my_utils
|
||||||
#import actions
|
#import actions
|
||||||
#import sys
|
#import sys
|
||||||
|
#import upgrade_health_checker
|
||||||
#
|
#
|
||||||
## 主库需要执行的升级动作
|
## 主库需要执行的升级动作
|
||||||
#def do_special_upgrade(conn, cur, timeout, user, passwd):
|
#def do_special_upgrade(conn, cur, timeout, user, passwd):
|
||||||
@ -1277,6 +1278,11 @@
|
|||||||
# actions.set_parameter(cur, 'enable_ddl', 'False', timeout)
|
# actions.set_parameter(cur, 'enable_ddl', 'False', timeout)
|
||||||
# actions.set_parameter(cur, 'enable_major_freeze', 'False', timeout)
|
# actions.set_parameter(cur, 'enable_major_freeze', 'False', timeout)
|
||||||
# actions.set_tenant_parameter(cur, '_enable_adaptive_compaction', 'False', timeout)
|
# actions.set_tenant_parameter(cur, '_enable_adaptive_compaction', 'False', timeout)
|
||||||
|
# # wait scheduler in storage to notice adaptive_compaction is switched to false
|
||||||
|
# time.sleep(60 * 2)
|
||||||
|
# query_cur = actions.QueryCursor(cur)
|
||||||
|
# wait_major_timeout = 600
|
||||||
|
# upgrade_health_checker.check_major_merge(query_cur, wait_major_timeout)
|
||||||
# actions.do_suspend_merge(cur, timeout)
|
# actions.do_suspend_merge(cur, timeout)
|
||||||
# # When upgrading from a version prior to 4.2 to version 4.2, the bloom_filter should be disabled.
|
# # When upgrading from a version prior to 4.2 to version 4.2, the bloom_filter should be disabled.
|
||||||
# # The param _bloom_filter_enabled is no longer in use as of version 4.2, there is no need to enable it again.
|
# # The param _bloom_filter_enabled is no longer in use as of version 4.2, there is no need to enable it again.
|
||||||
|
@ -1263,6 +1263,7 @@
|
|||||||
#import my_utils
|
#import my_utils
|
||||||
#import actions
|
#import actions
|
||||||
#import sys
|
#import sys
|
||||||
|
#import upgrade_health_checker
|
||||||
#
|
#
|
||||||
## 主库需要执行的升级动作
|
## 主库需要执行的升级动作
|
||||||
#def do_special_upgrade(conn, cur, timeout, user, passwd):
|
#def do_special_upgrade(conn, cur, timeout, user, passwd):
|
||||||
@ -1277,6 +1278,11 @@
|
|||||||
# actions.set_parameter(cur, 'enable_ddl', 'False', timeout)
|
# actions.set_parameter(cur, 'enable_ddl', 'False', timeout)
|
||||||
# actions.set_parameter(cur, 'enable_major_freeze', 'False', timeout)
|
# actions.set_parameter(cur, 'enable_major_freeze', 'False', timeout)
|
||||||
# actions.set_tenant_parameter(cur, '_enable_adaptive_compaction', 'False', timeout)
|
# actions.set_tenant_parameter(cur, '_enable_adaptive_compaction', 'False', timeout)
|
||||||
|
# # wait scheduler in storage to notice adaptive_compaction is switched to false
|
||||||
|
# time.sleep(60 * 2)
|
||||||
|
# query_cur = actions.QueryCursor(cur)
|
||||||
|
# wait_major_timeout = 600
|
||||||
|
# upgrade_health_checker.check_major_merge(query_cur, wait_major_timeout)
|
||||||
# actions.do_suspend_merge(cur, timeout)
|
# actions.do_suspend_merge(cur, timeout)
|
||||||
# # When upgrading from a version prior to 4.2 to version 4.2, the bloom_filter should be disabled.
|
# # When upgrading from a version prior to 4.2 to version 4.2, the bloom_filter should be disabled.
|
||||||
# # The param _bloom_filter_enabled is no longer in use as of version 4.2, there is no need to enable it again.
|
# # The param _bloom_filter_enabled is no longer in use as of version 4.2, there is no need to enable it again.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user