From 96c3175b4d656ecb7521d4dce0ee8e4ba9c9f984 Mon Sep 17 00:00:00 2001 From: Noel Kwan Date: Mon, 9 Oct 2023 11:03:56 +0800 Subject: [PATCH] fix backfill tests --- ci/scripts/run-backfill-tests.sh | 18 +++++------------- .../replication_with_column_pruning/insert.sql | 2 ++ .../insert_recurse.sql | 2 -- .../insert_seed.sql | 2 -- src/stream/src/executor/backfill/utils.rs | 2 +- 5 files changed, 8 insertions(+), 18 deletions(-) create mode 100644 ci/scripts/sql/backfill/replication_with_column_pruning/insert.sql delete mode 100644 ci/scripts/sql/backfill/replication_with_column_pruning/insert_recurse.sql delete mode 100644 ci/scripts/sql/backfill/replication_with_column_pruning/insert_seed.sql diff --git a/ci/scripts/run-backfill-tests.sh b/ci/scripts/run-backfill-tests.sh index 044deef13b9d8..fb36f8d8206e8 100755 --- a/ci/scripts/run-backfill-tests.sh +++ b/ci/scripts/run-backfill-tests.sh @@ -43,21 +43,13 @@ test_basic() { test_replication_with_column_pruning() { run_sql_file "$PARENT_PATH"/sql/backfill/replication_with_column_pruning/create_base_table.sql - run_sql_file "$PARENT_PATH"/sql/backfill/replication_with_column_pruning/insert_seed.sql - # Provide snapshot - for i in $(seq 1 18) - do - run_sql_file "$PARENT_PATH"/sql/backfill/replication_with_column_pruning/insert_recurse.sql - done + run_sql_file "$PARENT_PATH"/sql/backfill/replication_with_column_pruning/insert.sql run_sql_file "$PARENT_PATH"/sql/backfill/replication_with_column_pruning/create_mv.sql & # Provide upstream updates - for i in $(seq 1 2) - do - run_sql_file "$PARENT_PATH"/sql/backfill/replication_with_column_pruning/insert_recurse.sql & - done + run_sql_file "$PARENT_PATH"/sql/backfill/replication_with_column_pruning/insert.sql & wait @@ -69,9 +61,9 @@ main() { set -euo pipefail echo "--- Basic test" test_basic - # echo "--- Replication with Column pruning" - # test_replication_with_column_pruning - # echo "Backfill tests complete" + echo "--- Replication with Column pruning" + test_replication_with_column_pruning + echo "Backfill tests complete" } main \ No newline at end of file diff --git a/ci/scripts/sql/backfill/replication_with_column_pruning/insert.sql b/ci/scripts/sql/backfill/replication_with_column_pruning/insert.sql new file mode 100644 index 0000000000000..dab6f8693e49c --- /dev/null +++ b/ci/scripts/sql/backfill/replication_with_column_pruning/insert.sql @@ -0,0 +1,2 @@ +insert into t1 select generate_series + 1, generate_series + 2, generate_series + 3 from generate_series(1, 1000000); +flush; diff --git a/ci/scripts/sql/backfill/replication_with_column_pruning/insert_recurse.sql b/ci/scripts/sql/backfill/replication_with_column_pruning/insert_recurse.sql deleted file mode 100644 index f0120d670147f..0000000000000 --- a/ci/scripts/sql/backfill/replication_with_column_pruning/insert_recurse.sql +++ /dev/null @@ -1,2 +0,0 @@ -insert into t1 select x + 1, y + 2, z + 3 data from t1; -flush; diff --git a/ci/scripts/sql/backfill/replication_with_column_pruning/insert_seed.sql b/ci/scripts/sql/backfill/replication_with_column_pruning/insert_seed.sql deleted file mode 100644 index 262c19fb6a17b..0000000000000 --- a/ci/scripts/sql/backfill/replication_with_column_pruning/insert_seed.sql +++ /dev/null @@ -1,2 +0,0 @@ -insert into t1 values (1, 2, 3); -flush; \ No newline at end of file diff --git a/src/stream/src/executor/backfill/utils.rs b/src/stream/src/executor/backfill/utils.rs index 6ee1de640cd9d..156371e21f6fb 100644 --- a/src/stream/src/executor/backfill/utils.rs +++ b/src/stream/src/executor/backfill/utils.rs @@ -533,7 +533,7 @@ pub(crate) async fn persist_state_per_vnode