diff --git a/tools/upgrade/special_upgrade_action_pre.py b/tools/upgrade/special_upgrade_action_pre.py index d1a0f988a2..3edb96dafb 100755 --- a/tools/upgrade/special_upgrade_action_pre.py +++ b/tools/upgrade/special_upgrade_action_pre.py @@ -15,6 +15,7 @@ import binascii import my_utils import actions import sys +import upgrade_health_checker # 主库需要执行的升级动作 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_major_freeze', '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) # 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. diff --git a/tools/upgrade/upgrade_post.py b/tools/upgrade/upgrade_post.py index dde9e38a5d..3a9b87569a 100755 --- a/tools/upgrade/upgrade_post.py +++ b/tools/upgrade/upgrade_post.py @@ -1263,6 +1263,7 @@ #import my_utils #import actions #import sys +#import upgrade_health_checker # ## 主库需要执行的升级动作 #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_major_freeze', '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) # # 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. diff --git a/tools/upgrade/upgrade_pre.py b/tools/upgrade/upgrade_pre.py index d67efac5df..a7d1c39ed4 100755 --- a/tools/upgrade/upgrade_pre.py +++ b/tools/upgrade/upgrade_pre.py @@ -1263,6 +1263,7 @@ #import my_utils #import actions #import sys +#import upgrade_health_checker # ## 主库需要执行的升级动作 #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_major_freeze', '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) # # 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.