Closed neverchanje closed 2 years ago
Cc @BugenZhao . It seems like when creating ad_ctr_5min
, barrier manager received some impossible finished epoch. I will try to reproduce it and fix it.
After some more investigation, the FinishCreateMviewNotifier
notified twice in rearraged_chain
. This is quite weird and seems impossible.
Will check deeper. 🤔
ad_ctr_5min
plan as follows:
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------------
StreamMaterialize { columns: [ad_id, ctr, window, ad_id#1(hidden), window_end(hidden)], pk_columns: [ad_id#1, window, ad_id, window_end] }
StreamProject { exprs: [$3, ($4::Decimal / $1), $2, $0, $5] }
StreamHashJoin { type: Inner, predicate: $0 = $3 AND $2 = $5 }
StreamTableScan { table: ad_impressions_5min, columns: [ad_id, impressions_count, window_end], pk_indices: [0, 2] }
StreamTableScan { table: ad_clicks_5min, columns: [ad_id, clicks_count, window_end], pk_indices: [0, 2] }
(5 rows)
After further investigation, the chain executor is built twice in this mview with same actor id.
2022-05-24T09:19:09.020321Z INFO risingwave_stream::task::stream_manager: create executor: 137438953472, actor: 32, fragment: 11, node: “MergeExecutor”
2022-05-24T09:19:09.020358Z INFO risingwave_stream::task::stream_manager: create executor: 137438953509, actor: 32, fragment: 11, node: “BatchPlanNode”
2022-05-24T09:19:09.021187Z INFO risingwave_stream::task::stream_manager: create executor: 137438953510, actor: 32, fragment: 11, node: “ChainExecutor”
2022-05-24T09:19:09.021228Z INFO risingwave_stream::task::stream_manager: create executor: 137438953472, actor: 32, fragment: 11, node: “MergeExecutor”
2022-05-24T09:19:09.021256Z INFO risingwave_stream::task::stream_manager: create executor: 137438953507, actor: 32, fragment: 11, node: “BatchPlanNode”
2022-05-24T09:19:09.022018Z INFO risingwave_stream::task::stream_manager: create executor: 137438953508, actor: 32, fragment: 11, node: “ChainExecutor”
2022-05-24T09:19:09.022055Z INFO risingwave_stream::task::stream_manager: create executor: 137438953516, actor: 32, fragment: 11, node: “StreamHashJoin { type: Inner, predicate: $0 = $3 AND $2 = $5 }”
2022-05-24T09:19:09.022127Z INFO risingwave_stream::task::stream_manager: create executor: 137438953518, actor: 32, fragment: 11, node: “StreamProject { exprs: [$3, ($4::Decimal / $1), $2, $0, $5] }”
2022-05-24T09:19:09.022169Z INFO risingwave_stream::task::stream_manager: create executor: 137438953519, actor: 32, fragment: 11, node: “StreamMaterialize { columns: [ad_id, ctr, window, ad_id#1(hidden), window_end(hidden)], pk_columns: [ad_id#1, window, ad_id, window_end] }”
The fragmenter seems work not correctly on StreamHashJoin
, it should be split into three fragments, rather than the follow:
Describe the bug
I created 3 materialized views and the creation on mv1, mv2 was fine, but it always fell into panic when I created mv3 as join of mv1 and mv2.
To Reproduce
First, we need to use https://github.com/singularity-data/risingwave-demo/tree/main/workload-generator to generate the streams.
Then we are going to build several materialized views:
ad_ctr_5min
will joinad_impressions_5min
andad_clicks_5min
. It will definitely fail onad_ctr_5min
due to the panic above.If I run the join on top of
ad_impressions_5min
andad_clicks_5min
in batch mode the results will show successfully:Expected behavior A clear and concise description of what you expected to happen.
NO PANIC.
Additional context Add any other context about the problem here.