Skip to content

Commit

Permalink
fix and pass foreground mv cancellation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Sep 27, 2023
1 parent bdab80e commit 05d425b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ci/scripts/run-backfill-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ test_foreground_ddl_cancel() {
cancel_stream_jobs
sqllogictest -d dev -h localhost -p 4566 "$TEST_DIR/background_ddl/foreground/validate_after_cancel.slt"

run_sql "CREATE MATERIALIZED VIEW m1 as select * FROM t;"
sqllogictest -d dev -h localhost -p 4566 "$TEST_DIR/background_ddl/foreground/create_mv_after_cancel.slt"
sqllogictest -d dev -h localhost -p 4566 "$TEST_DIR/background_ddl/foreground/drop.slt"

cargo make kill
Expand Down Expand Up @@ -187,9 +187,9 @@ main() {
set -euo pipefail
# test_snapshot_and_upstream_read
# test_background_ddl_recovery
test_background_ddl_cancel
# test_background_ddl_cancel
# test_foreground_ddl_no_recover
# test_foreground_ddl_cancel
test_foreground_ddl_cancel
}

main
2 changes: 2 additions & 0 deletions e2e_test/background_ddl/foreground/create_mv_after_cancel.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
statement ok
CREATE MATERIALIZED VIEW m1 AS VALUES(1);
3 changes: 3 additions & 0 deletions e2e_test/background_ddl/foreground/drop.slt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
statement ok
DROP MATERIALIZED VIEW m1;

statement ok
DROP TABLE t;
2 changes: 0 additions & 2 deletions src/meta/src/barrier/progress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,6 @@ impl CreateMviewProgressTracker {
return Some(command);
}

let ddl_epoch = command.context.curr_epoch.value();

let (creating_mv_id, upstream_mv_count, upstream_total_key_count, definition) =
if let Command::CreateStreamingJob {
table_fragments,
Expand Down

0 comments on commit 05d425b

Please sign in to comment.