【Insert】SQL Error [1064] [42000]: Bad page: checksum mismatch (actual=2048048996 vs expect=4090300818)

根据用户反馈执行一段Insert into xxxx select xxx from xxx SQL会抛出异常:

SQL Error [1064] [42000]: Bad page: checksum mismatch (actual=2048048996 vs expect=4090300818)

Error 1064: Bad page: checksum mismatch (actual=2048048996 vs expect=4090300818), filename=/u/hdd10/doris.HDD/be-5b072885-42c2-4ce2-b7e8-5f3e257fba25/data/431/350564786/1109785269/02000000a88ebbba4544a278344c7a3056f4fd94e7134eb7_0.dat

解题思路:
1.找到所在报错的be节点

grep -rn “checksum mismatch” be.INFO

2.查看tablet

show tablet 350564786;

3.根据相关be节点IP与show backends出来的IP、BackendId进行对应

4.执行命令,重置tablet副本为bad,自动修复。

ADMIN SET REPLICA STATUS PROPERTIES(“tablet_id” = “350564786”, “backend_id” = “206433251”, “status” = “bad”);

引发的原因极有可能是副本数据分片损坏。