@@ -62,10 +62,16 @@ def run_citus_upgrade_tests(config, before_upgrade_schedule, after_upgrade_sched
62
62
63
63
install_citus (config .post_tar_path )
64
64
65
+ # disable 2pc recovery for all nodes to work around https://github.com/citusdata/citus/issues/7875
66
+ disable_2pc_recovery_for_all_nodes (config .bindir , config )
67
+
65
68
restart_databases (config .bindir , config .datadir , config .mixed_mode , config )
66
69
run_alter_citus (config .bindir , config .mixed_mode , config )
67
70
verify_upgrade (config , config .mixed_mode , config .node_name_to_ports .values ())
68
71
72
+ # re-enable 2pc recovery for all nodes
73
+ enable_2pc_recovery_for_all_nodes (config .bindir , config )
74
+
69
75
run_test_on_coordinator (config , after_upgrade_schedule )
70
76
remove_citus (config .post_tar_path )
71
77
@@ -146,6 +152,18 @@ def restart_database(pg_path, abs_data_path, node_name, node_ports, logfile_pref
146
152
subprocess .run (command , check = True )
147
153
148
154
155
+ def disable_2pc_recovery_for_all_nodes (pg_path , config ):
156
+ for port in config .node_name_to_ports .values ():
157
+ utils .psql (pg_path , port , "ALTER SYSTEM SET citus.recover_2pc_interval TO -1;" )
158
+ utils .psql (pg_path , port , "SELECT pg_reload_conf();" )
159
+
160
+
161
+ def enable_2pc_recovery_for_all_nodes (pg_path , config ):
162
+ for port in config .node_name_to_ports .values ():
163
+ utils .psql (pg_path , port , "ALTER SYSTEM RESET citus.recover_2pc_interval;" )
164
+ utils .psql (pg_path , port , "SELECT pg_reload_conf();" )
165
+
166
+
149
167
def run_alter_citus (pg_path , mixed_mode , config ):
150
168
for port in config .node_name_to_ports .values ():
151
169
if mixed_mode and port in (
0 commit comments