Skip to content

Commit 0265c23

Browse files
authored
re-enable the external FTS ICW (#483)
Current ICW external_fts pipeline is not running with the external-fts version. So change the package and fix the invalid case fts_segment_reset.
1 parent d68aede commit 0265c23

File tree

4 files changed

+41
-19
lines changed

4 files changed

+41
-19
lines changed

hd-ci/compile_cbdb.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ CBDB_VERSION=${CBDB_VERSION}
8484
EOF
8585
else
8686
cat <<EOF >>"${SRC_PATH}/cbdb-artifacts.txt"
87-
external_tar_download_url=${tar_package_path}
87+
external_tar_download_url="${ROOT_PATH}"/cloudberrydb/gpdb_artifacts/${tar_upload_file_name}
8888
external_rpm_download_url=${rpm_package_path}
8989
external_fts_RELEASE_cbdb_${OS_TYPE}_${OS_ARCH}_url=${rpm_download_url}
9090
external_fts_TARGZ_cbdb_${OS_TYPE}_${OS_ARCH}_url=${tar_download_url}

src/backend/postmaster/interrupt.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "storage/latch.h"
2323
#include "storage/procsignal.h"
2424
#include "utils/guc.h"
25+
#include "utils/faultinjector.h"
2526

2627
volatile sig_atomic_t ConfigReloadPending = false;
2728
volatile sig_atomic_t ShutdownRequestPending = false;
@@ -71,6 +72,8 @@ SignalHandlerForConfigReload(SIGNAL_ARGS)
7172
void
7273
SignalHandlerForCrashExit(SIGNAL_ARGS)
7374
{
75+
SIMPLE_FAULT_INJECTOR("fault_in_background_writer_quickdie");
76+
7477
/*
7578
* We DO NOT want to run proc_exit() or atexit() callbacks -- we're here
7679
* because shared memory may be corrupted, so we don't want to try to

src/test/isolation2/expected/fts_segment_reset.out

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@
77
-- end_matchsubs
88

99
-- Let FTS detect/declare failure sooner
10-
!\retcode gpconfig -c gp_fts_probe_interval -v 10 --masteronly;
11-
(exited with code 0)
12-
!\retcode gpstop -u;
13-
(exited with code 0)
10+
-- start_ignore
11+
alter system set gp_fts_probe_interval to 10;
12+
ALTER
13+
select pg_reload_conf();
14+
pg_reload_conf
15+
----------------
16+
t
17+
(1 row)
18+
-- end_ignore
1419

1520
-- Let the background writer sleep 27 seconds to delay the resetting.
1621
-- This number is selected because there's a slight chance that FTS senses
@@ -53,7 +58,8 @@ CREATE
5358
1<: <... completed>
5459
ERROR: fault triggered, fault name:'start_prepare' fault type:'panic'
5560
2<: <... completed>
56-
CREATE
61+
DETAIL: Segments are in reset/recovery mode.
62+
ERROR: failed to acquire resources on one or more segments
5763

5864
-- We shouldn't see failover to mirror
5965
select gp_request_fts_probe_scan();
@@ -79,14 +85,21 @@ select gp_inject_fault('fault_in_background_writer_quickdie', 'reset', dbid) fro
7985
Success:
8086
(1 row)
8187

88+
select pg_sleep(30);
89+
pg_sleep
90+
----------
91+
92+
(1 row)
93+
94+
-- start_ignore
95+
-- restore parameters
96+
alter system reset gp_fts_probe_interval;
97+
select pg_reload_conf();
98+
-- end_ignore
99+
82100
-- The only table that should have been created successfully
83101
drop table fts_reset_t3;
84102
DROP
85103

86104
-- In case anything goes wrong, we don't want to affect other tests. So rebalance the cluster anyway.
87-
!\retcode gprecoverseg -aF !\retcode gprecoverseg -ar
88-
-- restore parameters
89-
!\retcode gpconfig -r gp_fts_probe_interval --masteronly;
90-
(exited with code 127)
91-
!\retcode gpstop -u;
92-
(exited with code 0)
105+
!\retcode gprecoverseg -aF !\retcode gprecoverseg -ar

src/test/isolation2/sql/fts_segment_reset.sql

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
-- end_matchsubs
88

99
-- Let FTS detect/declare failure sooner
10-
!\retcode gpconfig -c gp_fts_probe_interval -v 10 --masteronly;
11-
!\retcode gpstop -u;
10+
-- start_ignore
11+
alter system set gp_fts_probe_interval to 10;
12+
select pg_reload_conf();
13+
-- end_ignore
1214

1315
-- Let the background writer sleep 27 seconds to delay the resetting.
1416
-- This number is selected because there's a slight chance that FTS senses
@@ -47,13 +49,17 @@ select dbid, role, preferred_role, status from gp_segment_configuration where co
4749
select gp_inject_fault('postmaster_server_loop_no_sigkill', 'reset', dbid) from gp_segment_configuration where role = 'p' and content = 0;
4850
select gp_inject_fault('fault_in_background_writer_quickdie', 'reset', dbid) from gp_segment_configuration where role = 'p' and content = 0;
4951

52+
select pg_sleep(30);
53+
54+
-- start_ignore
55+
-- restore parameters
56+
alter system reset gp_fts_probe_interval;
57+
select pg_reload_conf();
58+
-- end_ignore
59+
5060
-- The only table that should have been created successfully
5161
drop table fts_reset_t3;
5262

5363
-- In case anything goes wrong, we don't want to affect other tests. So rebalance the cluster anyway.
5464
!\retcode gprecoverseg -aF
55-
!\retcode gprecoverseg -ar
56-
57-
-- restore parameters
58-
!\retcode gpconfig -r gp_fts_probe_interval --masteronly;
59-
!\retcode gpstop -u;
65+
!\retcode gprecoverseg -ar

0 commit comments

Comments
 (0)