doris icon indicating copy to clipboard operation
doris copied to clipboard

Doris每次查询数据不一致

Open hnwkz opened this issue 1 year ago • 11 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

doris2.0.3 rc06

What's Wrong?

doris2.0.3 release版本,3FE节点,3BE节点,使用count语句查询同一个表,每次查询的结果不一致,查询的数据也不一致,怀疑是3个副本的数据量不一致。结果如图: Snipaste_2024-01-10_13-52-07 Snipaste_2024-01-10_13-52-19 Snipaste_2024-01-10_13-52-31

Snipaste_2024-01-10_13-54-28 Snipaste_2024-01-10_13-54-52 Snipaste_2024-01-10_13-55-17

建表语句如下: CREATE TABLE dim_event_column ( event_name varchar(100) NULL COMMENT '事件名', event_column varchar(100) NULL COMMENT '事件字段名' ) ENGINE=OLAP UNIQUE KEY(event_name, event_column) COMMENT 'OLAP' DISTRIBUTED BY HASH(event_name, event_column) BUCKETS AUTO PROPERTIES ( "replication_allocation" = "tag.location.default: 3", "is_being_synced" = "false", "storage_format" = "V2", "estimate_partition_size" = "1G", "light_schema_change" = "true", "disable_auto_compaction" = "false", "enable_single_replica_compaction" = "false" );

即使设置了set use_fix_replica = 0、1、2这种,但是无法判断哪个副本的数据是正确的,不能在每次执行查询的时候,需要去排查哪个副本的数据正确, 然后指定查哪个副本;

通过select count(*) from xxx tablet (2664055),查询,数据也是不一样的;

What You Expected?

查询结果一致,对于数据库来说,这种bug是灾难性的,希望能快速解决。

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

hnwkz avatar Jan 10 '24 06:01 hnwkz

我也遇到过这个问题

hw872715125 avatar Jan 10 '24 06:01 hw872715125

same here . what a disaster bug , which makes us confused for a long time LOL

Evan-IT avatar Jan 10 '24 06:01 Evan-IT

@hnwkz Hi, Could you add me on WeChat? wechatId : lsy3993

lsy3993 avatar Jan 10 '24 07:01 lsy3993

Same problem,please take it seriously

paything avatar Jan 11 '24 07:01 paything

我还遇到过 insert into 的sql ,返回的affect rows 大于 0 ,但是表里就是没数据

hwanginsitein avatar Jan 12 '24 13:01 hwanginsitein

same problem in 2.0.3

zengxiangqi1031 avatar Jan 30 '24 03:01 zengxiangqi1031

up

zengxiangqi1031 avatar Jan 30 '24 03:01 zengxiangqi1031

No subsequent steps ?

ddsr-ops avatar Mar 07 '24 03:03 ddsr-ops

从表结构来看全部是一张只有KEY列的Unique表,目前2.0.8 有个PR,针对这个问题有修复 PR: https://github.com/apache/doris/pull/32896

yuanyuan8983 avatar Apr 29 '24 07:04 yuanyuan8983

same problem in 2.1.2

paul1989889 avatar May 27 '24 06:05 paul1989889

same problem in 2.1.3

781015928 avatar May 31 '24 08:05 781015928

建议通过sequence列来避免这个问题,👉文档 image

echo-hhj avatar Aug 28 '24 04:08 echo-hhj

same problem in 2.1.5

XinSuiNian avatar Sep 24 '24 08:09 XinSuiNian