记录从3.0.4集群升级到3.1.4遇到的问题
测试环境是单机的,3.0.8 升级到 3.1.4,1fe + 1be
生产环境是集群的,3.0.4 升级到 3.1.4,3fe + 4be
以下部分异常在测试环境升级没有出现,或者没有被发现。但是在生产环境出现了
升级服务基本正常
-
在线升级过程中导致了部分flink任务失败重试,并且最终flink任务失败告警,但是重启可以解决
-
有一个同事的flink任务依赖的是这个
<dependency> <groupId>org.apache.doris</groupId> <artifactId>flink-doris-connector-1.19</artifactId> <version>24.0.0</version> <!-- <scope>provided</scope>--> </dependency>在测试环境没有出现问题,但是在生产遇到了问题,异常如下:
Caused by: org.apache.doris.shaded.com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "is_nullable" (class org.apache.doris.flink.rest.models.Field), not marked as ignorable (6 known properties: "aggregation_type", "type", "name", "precision", "comment", "scale"])
at [Source: (String)"{"keysType":"UNIQUE_KEYS","properties":[{"name":"player_info_id","aggregation_type":"","comment":"","is_nullable":"No","type":"BIGINT"},{"name":"player_info_username","aggregation_type":"NONE","comment":"","is_nullable":"Yes","type":"VARCHAR"},{"name":"player_info_real_name","aggregation_type":"NONE","comment":"真实姓名","is_nullable":"Yes","type":"VARCHAR"},{"name":"player_info_mobile","aggregation_type":"NONE","comment":"手机号","is_nullable":"Yes","type":"VARCHAR"},{"name":"player_info_mobile_area","[truncated 7963 chars]; line: 1, column: 116] (through reference chain: org.apache.doris.flink.rest.models.Schema["properties"]->java.util.ArrayList[0]->org.apache.doris.flink.rest.models.Field["is_nullable"])
AI说是doris返回给flink的元数据不能被识别。建议是升级连接器版本。
于是升级到25.0.0的版本。flink可以基于ckp正常重启恢复。
-
对外提供的接口异常,低版本是正常的,高版本异常。代码类似于下面的
create or replace view aaa_v (curr 'comment_xxxx', name 'cxx', age 'xxxx', addr 'xxxx' ) as select curr, name, age, addr from aa.xxxx union all select 'BASE', name, age, 'US' from aa.xxxx异常:Unknown column ''BASE'' in 'aaa_v'
导致了部分报表在查询的时候报错,测试环境这个报表用得少,一个星期也没人发现。上了生产就发现问题了。
解决方案说是sql写法不规范,没有给常量字段起别名。起个别名就好了
select 'BASE' as curr, name, age, 'US' as addr from aa.xxxx -
升级之前同事自定义写了一个global的时间转换函数,但是升级之后,该函数丢失了,导致生产报表查询的时候,找不到函数。
仅是记录这次升级带来的意料之外的问题。
在升级之前,其实心里是默认对业务完全没有影响的。但是还是出现一些了奇奇怪怪的问题,在测试环境没有发现,但是生产环境发现了。导致紧急修复又紧张了一个小时。以及陆续发现的生产报表异常,还是很心慌的。所以专门发帖记录一下