From ae74f6ac3c2871ffad971269d602be258626d2ee Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Tue, 5 Mar 2024 18:09:16 +0800 Subject: [PATCH 1/5] fix(dynfilter): left table with singleton dist panic bug (#15406) Signed-off-by: Richard Chien --- e2e_test/streaming/bug_fixes/issue_15302.slt | 38 ++++++++++++++++++++ src/stream/src/from_proto/dynamic_filter.rs | 17 +++------ 2 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 e2e_test/streaming/bug_fixes/issue_15302.slt diff --git a/e2e_test/streaming/bug_fixes/issue_15302.slt b/e2e_test/streaming/bug_fixes/issue_15302.slt new file mode 100644 index 0000000000000..6d0bd01716cc6 --- /dev/null +++ b/e2e_test/streaming/bug_fixes/issue_15302.slt @@ -0,0 +1,38 @@ +# https://github.com/risingwavelabs/risingwave/issues/15302 + +statement ok +set RW_IMPLICIT_FLUSH = true; + +statement ok +create materialized view test_last_ingestion_time as ( +select 'table_a' as source, TO_TIMESTAMP('2024-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') as last_ingestion_time +union all +select 'table_b' as source, TO_TIMESTAMP('2024-01-01 00:00:01', 'YYYY-MM-DD HH24:MI:SS') as last_ingestion_time +); + +statement ok +create materialized view test_records as ( +select 1 as id, TO_TIMESTAMP('2024-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') as record_timestamp +union all +select 2 as id, TO_TIMESTAMP('2024-01-01 00:00:01', 'YYYY-MM-DD HH24:MI:SS') as record_timestamp +union all +select 3 as id, TO_TIMESTAMP('2024-01-01 00:00:02', 'YYYY-MM-DD HH24:MI:SS') as record_timestamp +); + +statement ok +create materialized view test_window as ( +with time_window as ( + select max(last_ingestion_time) as window_end + from test_last_ingestion_time +) +select + id + from test_records, time_window + where record_timestamp >= window_end +); + +query i +select * from test_window; +---- +2 +3 diff --git a/src/stream/src/from_proto/dynamic_filter.rs b/src/stream/src/from_proto/dynamic_filter.rs index babb2680a9575..d85164c46feac 100644 --- a/src/stream/src/from_proto/dynamic_filter.rs +++ b/src/stream/src/from_proto/dynamic_filter.rs @@ -36,11 +36,7 @@ impl ExecutorBuilder for DynamicFilterExecutorBuilder { let [source_l, source_r]: [_; 2] = params.input.try_into().unwrap(); let key_l = node.get_left_key() as usize; - let vnodes = Arc::new( - params - .vnode_bitmap - .expect("vnodes not set for dynamic filter"), - ); + let vnodes = params.vnode_bitmap.map(Arc::new); let prost_condition = node.get_condition()?; let comparator = prost_condition.get_function_type()?; @@ -63,12 +59,9 @@ impl ExecutorBuilder for DynamicFilterExecutorBuilder { let cleaned_by_watermark = left_table.get_cleaned_by_watermark(); if cleaned_by_watermark { - let state_table_l = WatermarkCacheStateTable::from_table_catalog( - node.get_left_table()?, - store, - Some(vnodes), - ) - .await; + let state_table_l = + WatermarkCacheStateTable::from_table_catalog(node.get_left_table()?, store, vnodes) + .await; Ok(Box::new(DynamicFilterExecutor::new( params.actor_context, @@ -86,7 +79,7 @@ impl ExecutorBuilder for DynamicFilterExecutorBuilder { ))) } else { let state_table_l = - StateTable::from_table_catalog(node.get_left_table()?, store, Some(vnodes)).await; + StateTable::from_table_catalog(node.get_left_table()?, store, vnodes).await; Ok(Box::new(DynamicFilterExecutor::new( params.actor_context, From df7e3bd9fcfbe5c89bd6839f78bb9a2c4697d824 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Tue, 5 Mar 2024 20:25:14 +0800 Subject: [PATCH 2/5] increase timeout for e2e tests --- ci/workflows/pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/workflows/pull-request.yml b/ci/workflows/pull-request.yml index fa40c312530f0..7f567e374ee13 100644 --- a/ci/workflows/pull-request.yml +++ b/ci/workflows/pull-request.yml @@ -96,7 +96,7 @@ steps: config: ci/docker-compose.yml mount-buildkite-agent: true - ./ci/plugins/upload-failure-logs - timeout_in_minutes: 18 + timeout_in_minutes: 19 retry: *auto-retry - label: "end-to-end test (parallel)" @@ -537,7 +537,7 @@ steps: # - test-collector#v1.0.0: # files: "*-junit.xml" # format: "junit" - timeout_in_minutes: 25 + timeout_in_minutes: 26 cancel_on_build_failing: true retry: *auto-retry From 80b301214aabd63bc2a38cd750ca8c7c93f536c2 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Wed, 6 Mar 2024 10:42:53 +0800 Subject: [PATCH 3/5] inc timeout --- ci/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/workflows/pull-request.yml b/ci/workflows/pull-request.yml index 7f567e374ee13..884977a8eac6f 100644 --- a/ci/workflows/pull-request.yml +++ b/ci/workflows/pull-request.yml @@ -537,7 +537,7 @@ steps: # - test-collector#v1.0.0: # files: "*-junit.xml" # format: "junit" - timeout_in_minutes: 26 + timeout_in_minutes: 30 cancel_on_build_failing: true retry: *auto-retry From deab09ea5d8c2e5f97585326884bc7c830a726e9 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Wed, 6 Mar 2024 13:51:19 +0800 Subject: [PATCH 4/5] test --- ci/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/workflows/pull-request.yml b/ci/workflows/pull-request.yml index 884977a8eac6f..e8414d889e5a1 100644 --- a/ci/workflows/pull-request.yml +++ b/ci/workflows/pull-request.yml @@ -537,7 +537,7 @@ steps: # - test-collector#v1.0.0: # files: "*-junit.xml" # format: "junit" - timeout_in_minutes: 30 + timeout_in_minutes: 60 cancel_on_build_failing: true retry: *auto-retry From 015cd240a8c636fa908fe7d9ba2ac67d26a5e4fe Mon Sep 17 00:00:00 2001 From: stonepage <40830455+st1page@users.noreply.github.com> Date: Thu, 7 Mar 2024 15:36:12 +0800 Subject: [PATCH 5/5] Update ci/workflows/pull-request.yml --- ci/workflows/pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/workflows/pull-request.yml b/ci/workflows/pull-request.yml index e8414d889e5a1..485dd6f917dcc 100644 --- a/ci/workflows/pull-request.yml +++ b/ci/workflows/pull-request.yml @@ -537,7 +537,7 @@ steps: # - test-collector#v1.0.0: # files: "*-junit.xml" # format: "junit" - timeout_in_minutes: 60 + timeout_in_minutes: 25 cancel_on_build_failing: true retry: *auto-retry