From 7f0a0aeeabd955cecc0420d713b1869e5f42d291 Mon Sep 17 00:00:00 2001 From: Adam Berlin Date: Tue, 16 Jul 2019 11:01:30 -0400 Subject: [PATCH] Update tests to disable fts and include warnings. --- .../expected/heap_checksum_corruption.out | 1 + src/test/regress/expected/bitmap_index.out | 6 ++-- .../expected/bitmap_index_optimizer.out | 31 +++++++++++++++++-- src/test/regress/sql/bitmap_index.sql | 2 +- 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/src/test/heap_checksum/expected/heap_checksum_corruption.out b/src/test/heap_checksum/expected/heap_checksum_corruption.out index b9a42868d6..a54d9e9239 100644 --- a/src/test/heap_checksum/expected/heap_checksum_corruption.out +++ b/src/test/heap_checksum/expected/heap_checksum_corruption.out @@ -292,6 +292,7 @@ WARNING: page verification failed, calculated checksum 18239 but expected 58815 ERROR: invalid page in block 0 of relation base/81967/81939 (seg0 slice1 127.0.0.1:25432 pid=27287) -- trigger recovery on primaries with multiple retries and ignore warning/notice messages select gp_inject_fault_infinite('finish_prepared_after_record_commit_prepared', 'panic', dbid) from gp_segment_configuration where role = 'p'; +WARNING: consider disabling FTS probes while injecting a panic. NOTICE: Success: gp_inject_fault_infinite -------------------------- diff --git a/src/test/regress/expected/bitmap_index.out b/src/test/regress/expected/bitmap_index.out index 3f20cdebc7..bbff3dbc6b 100644 --- a/src/test/regress/expected/bitmap_index.out +++ b/src/test/regress/expected/bitmap_index.out @@ -631,9 +631,9 @@ drop table unlogged_test; -- disable fault-tolerance service (FTS) probing to ensure -- the mirror does not accidentally get promoted -- -SELECT gp_inject_fault2('fts_probe', 'skip', dbid, hostname, port) FROM gp_segment_configuration WHERE role = 'p' and content = -1; - gp_inject_fault2 ------------------- +SELECT gp_inject_fault_infinite2('fts_probe', 'skip', dbid, hostname, port) FROM gp_segment_configuration WHERE role = 'p' and content = -1; + gp_inject_fault_infinite2 +--------------------------- Success: (1 row) diff --git a/src/test/regress/expected/bitmap_index_optimizer.out b/src/test/regress/expected/bitmap_index_optimizer.out index 845ef1030a..8d18fcff81 100644 --- a/src/test/regress/expected/bitmap_index_optimizer.out +++ b/src/test/regress/expected/bitmap_index_optimizer.out @@ -629,6 +629,16 @@ drop table unlogged_test; -- -- Test crash recovery -- +-- +-- disable fault-tolerance service (FTS) probing to ensure +-- the mirror does not accidentally get promoted +-- +SELECT gp_inject_fault_infinite2('fts_probe', 'skip', dbid, hostname, port) FROM gp_segment_configuration WHERE role = 'p' and content = -1; + gp_inject_fault_infinite2 +--------------------------- + Success: +(1 row) + CREATE TABLE bm_test_insert(a int) DISTRIBUTED BY (a); CREATE INDEX bm_a_idx ON bm_test_insert USING bitmap(a); CREATE TABLE bm_test_update(a int, b int) DISTRIBUTED BY (a); @@ -652,9 +662,15 @@ INSERT INTO bm_test_insert SELECT generate_series (1, 10000); UPDATE bm_test_update SET b=b+1; -- trigger recovery on primaries SELECT gp_inject_fault_infinite('finish_prepared_after_record_commit_prepared', 'panic', dbid) FROM gp_segment_configuration WHERE role = 'p' AND content > -1; -NOTICE: Success: (seg0 172.17.0.10:25435 pid=69866) -NOTICE: Success: (seg1 172.17.0.10:25433 pid=69867) -NOTICE: Success: (seg2 172.17.0.10:25434 pid=69868) +WARNING: consider disabling FTS probes while injecting a panic. (seg0 127.0.0.1:7002 pid=98667) +HINT: Inject a 'skip' into the 'fts_probe' fault to disable FTS probing. +NOTICE: Success: (seg0 127.0.0.1:7002 pid=98667) +WARNING: consider disabling FTS probes while injecting a panic. (seg1 127.0.0.1:7003 pid=98668) +HINT: Inject a 'skip' into the 'fts_probe' fault to disable FTS probing. +NOTICE: Success: (seg1 127.0.0.1:7003 pid=98668) +WARNING: consider disabling FTS probes while injecting a panic. (seg2 127.0.0.1:7004 pid=98669) +HINT: Inject a 'skip' into the 'fts_probe' fault to disable FTS probing. +NOTICE: Success: (seg2 127.0.0.1:7004 pid=98669) gp_inject_fault_infinite -------------------------- t @@ -705,6 +721,15 @@ SELECT * FROM bm_test_update WHERE b=1; DROP TABLE trigger_recovery_on_primaries; DROP TABLE bm_test_insert; DROP TABLE bm_test_update; +-- +-- re-enable fault-tolerance service (FTS) probing after recovery completed. +-- +SELECT gp_inject_fault2('fts_probe', 'reset', dbid, hostname, port) FROM gp_segment_configuration WHERE role = 'p' and content = -1; + gp_inject_fault2 +------------------ + Success: +(1 row) + -- If the table is AO table, it need generate some fake tuple pointer, -- this pointer is a little different from the heap tables pointer, -- If the Offset in pointer is 0(If the row number is 32768, the Offset diff --git a/src/test/regress/sql/bitmap_index.sql b/src/test/regress/sql/bitmap_index.sql index 2b054a377a..8d6615eb75 100644 --- a/src/test/regress/sql/bitmap_index.sql +++ b/src/test/regress/sql/bitmap_index.sql @@ -271,7 +271,7 @@ drop table unlogged_test; -- disable fault-tolerance service (FTS) probing to ensure -- the mirror does not accidentally get promoted -- -SELECT gp_inject_fault2('fts_probe', 'skip', dbid, hostname, port) FROM gp_segment_configuration WHERE role = 'p' and content = -1; +SELECT gp_inject_fault_infinite2('fts_probe', 'skip', dbid, hostname, port) FROM gp_segment_configuration WHERE role = 'p' and content = -1; CREATE TABLE bm_test_insert(a int) DISTRIBUTED BY (a); CREATE INDEX bm_a_idx ON bm_test_insert USING bitmap(a); CREATE TABLE bm_test_update(a int, b int) DISTRIBUTED BY (a); -- GitLab