This is an automated email from the ASF dual-hosted git repository. maxyang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit af8b4af8afd2f7588c6fd8a59c691c75c87978c0 Author: Brent Doil <[email protected]> AuthorDate: Fri May 10 09:46:40 2024 -0400 Update createidx_while_reindex tests As a result of commit 65e579c182e, create index statements executed during a reindex are no longer expected to block until the reindex transaction commits. Update the corresponding answer files. --- .../expected/reindex/createidx_while_reindex_idx_ao_bitmap.out | 5 ++--- .../expected/reindex/createidx_while_reindex_idx_ao_btree.out | 5 ++--- .../expected/reindex/createidx_while_reindex_idx_aoco_bitmap.out | 5 ++--- .../expected/reindex/createidx_while_reindex_idx_aoco_btree.out | 5 ++--- .../isolation2/sql/reindex/createidx_while_reindex_idx_ao_bitmap.sql | 3 +-- .../isolation2/sql/reindex/createidx_while_reindex_idx_ao_btree.sql | 3 +-- .../sql/reindex/createidx_while_reindex_idx_aoco_bitmap.sql | 3 +-- .../sql/reindex/createidx_while_reindex_idx_aoco_btree.sql | 3 +-- 8 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_ao_bitmap.out b/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_ao_bitmap.out index dbcb25dce1..ebda60ec24 100644 --- a/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_ao_bitmap.out +++ b/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_ao_bitmap.out @@ -26,11 +26,10 @@ BEGIN BEGIN 1: REINDEX index idx_reindex_crtab_ao_bitmap; REINDEX -2&: create index idx_reindex_crtab_ao_bitmap2 on reindex_crtab_ao_bitmap USING bitmap(a); <waiting ...> +2: create index idx_reindex_crtab_ao_bitmap2 on reindex_crtab_ao_bitmap USING bitmap(a); +CREATE 1: COMMIT; COMMIT -2<: <... completed> -CREATE 2: COMMIT; COMMIT 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_ao_bitmap' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); diff --git a/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_ao_btree.out b/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_ao_btree.out index 61ad0013e2..65b18f1147 100644 --- a/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_ao_btree.out +++ b/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_ao_btree.out @@ -26,11 +26,10 @@ BEGIN BEGIN 1: REINDEX index idx_reindex_crtab_ao_btree; REINDEX -2&: create index idx_reindex_crtab_ao_btree2 on reindex_crtab_ao_btree(a); <waiting ...> +2: create index idx_reindex_crtab_ao_btree2 on reindex_crtab_ao_btree(a); +CREATE 1: COMMIT; COMMIT -2<: <... completed> -CREATE 2: COMMIT; COMMIT 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_ao_btree' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); diff --git a/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_aoco_bitmap.out b/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_aoco_bitmap.out index 7d00040a7d..4f7b6f9bd2 100644 --- a/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_aoco_bitmap.out +++ b/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_aoco_bitmap.out @@ -26,11 +26,10 @@ BEGIN BEGIN 1: REINDEX index idx_reindex_crtab_aoco_bitmap; REINDEX -2&: create index idx_reindex_crtab_aoco_bitmap2 on reindex_crtab_aoco_bitmap USING bitmap(a); <waiting ...> +2: create index idx_reindex_crtab_aoco_bitmap2 on reindex_crtab_aoco_bitmap USING bitmap(a); +CREATE 1: COMMIT; COMMIT -2<: <... completed> -CREATE 2: COMMIT; COMMIT 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_aoco_bitmap' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); diff --git a/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_aoco_btree.out b/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_aoco_btree.out index 1c7b58dc7f..c7a70b9ccd 100644 --- a/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_aoco_btree.out +++ b/src/test/isolation2/expected/reindex/createidx_while_reindex_idx_aoco_btree.out @@ -26,11 +26,10 @@ BEGIN BEGIN 1: REINDEX index idx_reindex_crtab_aoco_btree; REINDEX -2&: create index idx_reindex_crtab_aoco_btree2 on reindex_crtab_aoco_btree(a); <waiting ...> +2: create index idx_reindex_crtab_aoco_btree2 on reindex_crtab_aoco_btree(a); +CREATE 1: COMMIT; COMMIT -2<: <... completed> -CREATE 2: COMMIT; COMMIT 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_aoco_btree' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); diff --git a/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_ao_bitmap.sql b/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_ao_bitmap.sql index a61fd05441..d3091134e6 100644 --- a/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_ao_bitmap.sql +++ b/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_ao_bitmap.sql @@ -13,9 +13,8 @@ DELETE FROM reindex_crtab_ao_bitmap WHERE a < 128; 1: BEGIN; 2: BEGIN; 1: REINDEX index idx_reindex_crtab_ao_bitmap; -2&: create index idx_reindex_crtab_ao_bitmap2 on reindex_crtab_ao_bitmap USING bitmap(a); +2: create index idx_reindex_crtab_ao_bitmap2 on reindex_crtab_ao_bitmap USING bitmap(a); 1: COMMIT; -2<: 2: COMMIT; 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_ao_bitmap' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_ao_bitmap2' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); diff --git a/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_ao_btree.sql b/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_ao_btree.sql index 8d5188b3c2..a813abd39f 100644 --- a/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_ao_btree.sql +++ b/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_ao_btree.sql @@ -13,9 +13,8 @@ DELETE FROM reindex_crtab_ao_btree WHERE a < 128; 1: BEGIN; 2: BEGIN; 1: REINDEX index idx_reindex_crtab_ao_btree; -2&: create index idx_reindex_crtab_ao_btree2 on reindex_crtab_ao_btree(a); +2: create index idx_reindex_crtab_ao_btree2 on reindex_crtab_ao_btree(a); 1: COMMIT; -2<: 2: COMMIT; 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_ao_btree' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_ao_btree2' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); diff --git a/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_aoco_bitmap.sql b/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_aoco_bitmap.sql index e6ad8c457a..e7f9ffb784 100644 --- a/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_aoco_bitmap.sql +++ b/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_aoco_bitmap.sql @@ -13,9 +13,8 @@ DELETE FROM reindex_crtab_aoco_bitmap WHERE a < 128; 1: BEGIN; 2: BEGIN; 1: REINDEX index idx_reindex_crtab_aoco_bitmap; -2&: create index idx_reindex_crtab_aoco_bitmap2 on reindex_crtab_aoco_bitmap USING bitmap(a); +2: create index idx_reindex_crtab_aoco_bitmap2 on reindex_crtab_aoco_bitmap USING bitmap(a); 1: COMMIT; -2<: 2: COMMIT; 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_aoco_bitmap' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_aoco_bitmap2' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); diff --git a/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_aoco_btree.sql b/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_aoco_btree.sql index 1749338741..9823c7db80 100644 --- a/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_aoco_btree.sql +++ b/src/test/isolation2/sql/reindex/createidx_while_reindex_idx_aoco_btree.sql @@ -13,9 +13,8 @@ DELETE FROM reindex_crtab_aoco_btree WHERE a < 128; 1: BEGIN; 2: BEGIN; 1: REINDEX index idx_reindex_crtab_aoco_btree; -2&: create index idx_reindex_crtab_aoco_btree2 on reindex_crtab_aoco_btree(a); +2: create index idx_reindex_crtab_aoco_btree2 on reindex_crtab_aoco_btree(a); 1: COMMIT; -2<: 2: COMMIT; 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_aoco_btree' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); 3: SELECT 1 AS oid_same_on_all_segs from gp_dist_random('pg_class') WHERE relname = 'idx_reindex_crtab_aoco_btree2' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
