Hi all, I had a question about async materialized ...
# questions-and-troubleshooting
i
Hi all, I had a question about async materialized views. We have tables in an Iceberg catalog that we're using to create these materialized views. The MVs are created using the following settings:
Copy code
CREATE MATERIALIZED VIEW `big_commerce_placed_order_mv` (`activity_time`, `actor_id`, `owner_id`, `activity_id`, `activity_stream_type_id`, `order_id`, `currency`, `discount`, `products`)
COMMENT "MATERIALIZED_VIEW"
DISTRIBUTED BY HASH(`owner_id`, `activity_id`)
ORDER BY (owner_id,activity_time)
REFRESH MANUAL
PROPERTIES (
"replicated_storage" = "true",
"replication_num" = "1",
"query_rewrite_consistency" = "LOOSE",
"session.insert_timeout" = "60000",
"session.enable_lake_tablet_internal_parallel" = "true",
"session.use_compute_nodes" = "8",
"datacache.enable" = "true",
"enable_async_write_back" = "false",
"storage_volume" = "s3_express_volume",
"warehouse" = "default_warehouse"
) AS 
< query here>
Then we manually refresh the MV using
REFRESH MATERIALIZED VIEW big_commerce_placed_order_mv;
. I got the task_name for the MV creation through:
Copy code
select * from information_schema.tasks order by create_time desc limit 5\G;
and then viewing the task runs:
Copy code
select * from information_schema.task_runs where task_name='mv-3796659' order by create_time\G;
We're seeing a failed state for the refresh tasks with the error message being
Fe abort the task
. However, when we
select count(*) from big_commerce_placed_order_mv;
the row count we get matches the row count when we query directly from the Iceberg table. Looking at the frontend logs didn't seem to yield much information either. We're wondering if there's anywhere else we should look to see why the state is failed rather than succeeded. Is this an erroneous end state? Because it seems the task succeeded even though it says failed. Thanks!
r
The data gets loaded to the materialized view the first time you created it, before triggering the refresh manually. https://docs.starrocks.io/docs/using_starrocks/async_mv/Materialized_view/#basic-concepts
j
From your description,I think you may need to enable profile(SET enable_profile = true;) to get a refresh. and another way is to upgrade your StarRocks Cluster.
i
The query:
Copy code
select * from information_schema.task_runs where task_name='mv-3796659' order by create_time\G;
returns two task runs, one of which is the refresh task and the other is the MV creation. So MV creation spawns a task to load the data the first time, but that task also seems to indicate a failure. We're planning on upgrading to 4.0 but there are some bugs that a teammate opened an issue for that needs to be fixed before we can