starrocks缓存开启之后查询结果异常

为了更快的定位您的问题,请提供以下信息,谢谢
【详述】问题详细描述
使用starrocks版本:Server version: 5.1.0 StarRocks version 3.0.5,在开启缓存/*+ SET_VAR ( enable_query_cache =true ) */ 查询出来的结果不正确,多了两条数据。并且每次执行开启缓存的结果都是不变的(数据固定的),去掉缓存查询结果正确 多次查询结果也都一致(数据固定)。操作如下图:



【背景】做过哪些操作?
突然出现的,没有做过什么操作,测试同学反馈过来的。
【业务影响】
查询结果不准确,去掉缓存结果正确但性能差了一些
【StarRocks版本】
Server version: 5.1.0 StarRocks version 3.0.5
【集群规模】3fe(1 follower+2observer)+4be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
【联系方式】为了在解决问题过程中能及时联系到您获取一些日志信息,请补充下您的联系方式,例如:邮箱: cfbin@qq.com
【附件】

获取下开启和不开启cache情况下的explain costs + sql和profile

explain select project_id,indicator ,device_id, sum(value) as value from ( select project_id, device_id, indicator , sum(value) as value, count() as nums, Count(dist
inct device_id) as devNums from ( select project_id, device_id, indicator, num ,concat(substring(day, 1, 7), ‘-01 00:00:00’) as month, sumsValue as value fr
om xxx c where types=‘home’ and project_id=‘154840656’ and indicator in (‘ele_usage’) and ((day >= '2023-09-01 00:00:
limit 300;

explain select /*+ SET_VAR ( enable_query_cache =true ) */ project_id,indicator ,device_id, sum(value) as value from ( select project_id, device_id, indicator , sum(value) as value, count() as nums, Count(distinct device_id) as devNums from ( select project_id, device_id, indicator, num ,concat(substring(day, 1, 7), ‘-01 00:00:00’) as month, sumsValue as value from xxx c where types=‘home’ and project_id=‘154840656’ and indicator in (‘ele_usage’) and ((day >= ‘2023-09-01 00:00:00’ and day <= ‘2023-09-30 23:59:59’)) )a group by project_id, device_id, indicator )b group by project_id,indicator ,device_id order by value desc limit 300

profiles:
profile.txt (136.1 KB)