insert SQL执行报错Unknow error

【详述】通过proxySql代理端口执行某个insert语句,偶然发生返回报错Unknown error,查询ProxySQL日志为FE节点返回的error, 该insertFE error日志信息:

[StmtExecutor.execute():521] execute Exception, sql insert into t_arc_event(event_id, game_id, type, sdate, edate, targets, comments, is_delete) values (3888,200013, 3, ‘2023-01-24’, ‘2023-01-31’, null, ‘对战平台’, 1)
java.lang.NullPointerException: null
at com.starrocks.sql.analyzer.AST2SQL$SQLBuilder.visitSetStatement(AST2SQL.java:85) ~[starrocks-fe.jar:?]
at com.starrocks.sql.analyzer.AST2SQL$SQLBuilder.visitSetStatement(AST2SQL.java:71) ~[starrocks-fe.jar:?]
at com.starrocks.analysis.SetStmt.accept(SetStmt.java:87) ~[starrocks-fe.jar:?]
at com.starrocks.sql.ast.AstVisitor.visit(AstVisitor.java:129) ~[starrocks-fe.jar:?]
at com.starrocks.sql.ast.AstVisitor.visit(AstVisitor.java:125) ~[starrocks-fe.jar:?]
at com.starrocks.sql.analyzer.AST2SQL.toString(AST2SQL.java:68) ~[starrocks-fe.jar:?]
at com.starrocks.qe.LeaderOpExecutor.forward(LeaderOpExecutor.java:143) ~[starrocks-fe.jar:?]
at com.starrocks.qe.LeaderOpExecutor.execute(LeaderOpExecutor.java:80) ~[starrocks-fe.jar:?]
at com.starrocks.qe.StmtExecutor.forwardToLeader(StmtExecutor.java:621) ~[starrocks-fe.jar:?]
at com.starrocks.qe.StmtExecutor.execute(StmtExecutor.java:398) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:322) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.dispatch(ConnectProcessor.java:437) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:683) ~[starrocks-fe.jar:?]
at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:55) ~[starrocks-fe.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_211]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_211]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]

【背景】建表语句:
CREATE TABLE t_arc_event (
event_id int(11) NULL COMMENT “”,
game_id int(11) NULL COMMENT “”,
type int(11) NULL COMMENT “”,
sdate varchar(20) NULL COMMENT “”,
edate varchar(20) NULL COMMENT “”,
targets varchar(200) NULL COMMENT “”,
comments varchar(200) NULL COMMENT “”,
is_delete tinyint(4) NOT NULL DEFAULT “0” COMMENT “软删除标识”
) ENGINE=OLAP
UNIQUE KEY(event_id)
COMMENT “t_arc_event”
DISTRIBUTED BY HASH(event_id) BUCKETS 1
PROPERTIES (
“replication_num” = “3”,
“in_memory” = “false”,
“storage_format” = “DEFAULT”,
“enable_persistent_index” = “false”
);

SQL 执行语句: insert into t_arc_event(event_id, game_id, type, sdate, edate, targets, comments, is_delete) values (3888,200013, 3, ‘2023-01-24’, ‘2023-01-31’, null, ‘对战平台’, 1)

【业务影响】
【StarRocks版本】 2.4.2 3994421
【集群规模】5fe(2 follower+2observer)+5be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
【联系方式】为了在解决问题过程中能及时联系到您获取一些日志信息,请补充下您的联系方式,例如:社区群4-小李或者邮箱,谢谢
【附件】

  • fe.log/beINFO/相应截图
  • 慢查询:
    • Profile信息
    • 并行度:show variables like ‘%parallel_fragment_exec_instance_num%’;
      image
    • pipeline是否开启:show variables like ‘%pipeline%’;
    • be节点cpu和内存使用率截图
      image
  • 查询报错:
  • be crash
    • be.out

您好,根据您提供的样例没有复现该问题,请问在您的集群上该问题是否可以复现呢,或者查下当时的fe状态是否有切主等异常操作

没有切主异常操作,我们这边也是偶尔复现,根据日志报错的SQL也是可以执行的

再次出现,SQL可正常执行,程序报错null空指针??
2023-02-02 10:31:48,306 WARN (starrocks-mysql-nio-pool-4203|4881) [StmtExecutor.execute():521] execute Exception, sql insert into t_arc_event(event_id,game_id,type,sdate,edate,targets,comments,is_delete) values ( 3894,54,3,‘2023-01-26’,‘2023-02-02’,‘1000160’,‘1111’,0)
java.lang.NullPointerException: null
at com.starrocks.sql.analyzer.AST2SQL$SQLBuilder.visitSetStatement(AST2SQL.java:85) ~[starrocks-fe.jar:?]
at com.starrocks.sql.analyzer.AST2SQL$SQLBuilder.visitSetStatement(AST2SQL.java:71) ~[starrocks-fe.jar:?]
at com.starrocks.analysis.SetStmt.accept(SetStmt.java:87) ~[starrocks-fe.jar:?]
at com.starrocks.sql.ast.AstVisitor.visit(AstVisitor.java:129) ~[starrocks-fe.jar:?]
at com.starrocks.sql.ast.AstVisitor.visit(AstVisitor.java:125) ~[starrocks-fe.jar:?]
at com.starrocks.sql.analyzer.AST2SQL.toString(AST2SQL.java:68) ~[starrocks-fe.jar:?]
at com.starrocks.qe.LeaderOpExecutor.forward(LeaderOpExecutor.java:143) ~[starrocks-fe.jar:?]
at com.starrocks.qe.LeaderOpExecutor.execute(LeaderOpExecutor.java:80) ~[starrocks-fe.jar:?]
at com.starrocks.qe.StmtExecutor.forwardToLeader(StmtExecutor.java:621) ~[starrocks-fe.jar:?]
at com.starrocks.qe.StmtExecutor.execute(StmtExecutor.java:398) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:322) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.dispatch(ConnectProcessor.java:437) ~[starrocks-fe.jar:?]
at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:683) ~[starrocks-fe.jar:?]
at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:55) ~[starrocks-fe.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_211]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_211]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_211]

请将报错前后几分钟的详细fe.log日志压缩下发在附件里,我们进一步排查下

fe_202302021031.log (49.9 KB)

请问是节点切换造成的吗?我们直连leader节点的FE地址确实没出现过,但通过负载均衡或者连接其它FE的节点会出现null 异常

我们的开发,正在跟进这个问题,当前还没有结论

有使用过什么特殊的variable吗?在insert语句之前,或者系统中特殊设置的用户变量?
如果没有的话,可以添加我的微信(13126994001),排查一下具体问题

没有,就是使用hikariCp连接池去连接, JdbcTemplate使用


url: jdbc:mysql://ip:port/bi_client?characterEncoding=utf8&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
sql执行:jdbcTemplate.update()