为了更快的定位您的问题,请提供以下信息,谢谢
【详述】创建物化视图刷新报错
- 创建物化视图
CREATE MATERIALIZED VIEWdim_event_logs_mv_test
(message_ds
,log_timestamp
,role_id
,server
,log_id
,json_msg
)
COMMENT “玩家行为日志表”
PARTITION BY (message_ds
)
DISTRIBUTED BY RANDOM
REFRESH ASYNC EVERY(INTERVAL 10 MINUTE)
PROPERTIES (
“replicated_storage” = “true”,
“replication_num” = “3”,
“storage_medium” = “HDD”
)
AS SELECTt
.message_ds
, CAST((t
.msg
->‘log_timestamp’) AS BIGINT) ASlog_timestamp
,t
.msg
->‘role_id’ ASrole_id
,t
.msg
->‘server’ ASserver
,t
.msg
->‘log_id’ ASlog_id
, json_string(t
.msg
) ASjson_msg
FROM (SELECTraw
.message_ds
, parse_json(substring(raw
.message
, instr(raw
.message
, ‘{’))) ASmsg
FROMbigdata_db
.raw
)t
;
账号权限:
MySQL [(none)]> show grants for ‘bigdata_user’@‘7.49.9.%’;
±--------------------------±----------------±---------------------------------------------------------------------------------------------------------------------------------+
| UserIdentity | Catalog | Grants |
±--------------------------±----------------±---------------------------------------------------------------------------------------------------------------------------------+
| ‘bigdata_user’@‘7.49.9.%’ | NULL | GRANT ‘user_admin’, ‘bigdata_role’ TO ‘bigdata_user’@‘7.49.9.%’ |
| ‘bigdata_user’@‘7.49.9.%’ | default_catalog | GRANT DELETE, DROP, INSERT, SELECT, ALTER, EXPORT, UPDATE ON ALL TABLES IN DATABASE bigdata_db TO USER ‘bigdata_user’@‘7.49.9.%’ |
| ‘bigdata_user’@‘7.49.9.%’ | default_catalog | GRANT SELECT, ALTER, DROP ON ALL VIEWS IN DATABASE bigdata_db TO USER ‘bigdata_user’@‘7.49.9.%’ |
| ‘bigdata_user’@‘7.49.9.%’ | default_catalog | GRANT ALTER, REFRESH, DROP, SELECT ON ALL MATERIALIZED VIEWS IN DATABASE bigdata_db TO USER ‘bigdata_user’@‘7.49.9.%’ |
±--------------------------±----------------±---------------------------------------------------------------------------------------------------------------------------------+
4 rows in set (0.001 sec)
role权限:
MySQL [(none)]> show grants for role bigdata_role;
±-------------±----------------±-------------------------------------------------------------------------------------------------------------------------+
| UserIdentity | Catalog | Grants |
±-------------±----------------±-------------------------------------------------------------------------------------------------------------------------+
| bigdata_role | default_catalog | GRANT DELETE, DROP, INSERT, SELECT, ALTER, EXPORT, UPDATE ON ALL TABLES IN DATABASE bigdata_db TO ROLE ‘bigdata_role’ |
| bigdata_role | default_catalog | GRANT SELECT ON TABLE bigdata_db.raw TO ROLE ‘bigdata_role’ |
| bigdata_role | default_catalog | GRANT CREATE TABLE, CREATE VIEW, CREATE FUNCTION, CREATE MATERIALIZED VIEW ON DATABASE bigdata_db TO ROLE ‘bigdata_role’ |
| bigdata_role | default_catalog | GRANT SELECT, ALTER, DROP ON ALL VIEWS IN DATABASE bigdata_db TO ROLE ‘bigdata_role’ |
| bigdata_role | default_catalog | GRANT USAGE ON CATALOG default_catalog TO ROLE ‘bigdata_role’ |
| bigdata_role | default_catalog | GRANT ALTER, REFRESH, DROP, SELECT ON ALL MATERIALIZED VIEWS IN DATABASE bigdata_db TO ROLE ‘bigdata_role’ |
±-------------±----------------±-------------------------------------------------------------------------------------------------------------------------+
后发现对账号授权root角色权限都报错,是不是有是bug导致,还是哪里设置不对
【背景】创建物化视图,并刷新报错,授权后一样报错
【业务影响】无法刷新物化视图
【是否存算分离】否
【StarRocks版本】3.2.8
【集群规模】例如:3fe + 3be
【机器信息】CPU虚拟核/内存/网卡,例如:32C/64G
【附件】
- fe.log/beINFO/相应截图
- 慢查询:
- Profile信息
- 并行度:show variables like ‘%parallel_fragment_exec_instance_num%’;
- pipeline是否开启:show variables like ‘%pipeline%’;
- be节点cpu和内存使用率截图
- 查询报错:
- query_dump,怎么获取query_dump文件
- be crash
- be.out
- 外表查询报错
- be.out和fe.warn.log