apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.71k stars 3.28k forks source link

[Bug] 2.02 streamload 异常 #27593

Open learner1212 opened 11 months ago

learner1212 commented 11 months ago

Search before asking

Version

2.0.2

What's Wrong?

升级到2.0.2后, 将数据导入创建了物化视图的表, 当导入数据未完全覆盖所创建物化视图时, 导入失败。

表结构 : CREATE TABLE test ( a tinyint(4) NULL DEFAULT "0" , b int(11) DEFAULT "0" , c int(11) DEFAULT "0" , t DATETIMEV2 COMMENT "时间", d bigint(20) SUM NULL DEFAULT "0", e bigint(20) SUM NULL DEFAULT "0" ) AGGREGATE KEY(a, b, c, t) PARTITION BY RANGE(t) () DISTRIBUTED BY HASH(a) BUCKETS AUTO PROPERTIES ( "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "DAY", "dynamic_partition.start" = "-3", "dynamic_partition.end" = "3", "dynamic_partition.prefix" = "p", "dynamic_partition.time_zone" = "Asia/Shanghai", "dynamic_partition.create_history_partition" = "true", "dynamic_partition.history_partition_num" = "3", "dynamic_partition.replication_num" = "2", "light_schema_change" = "true" );

创建物化视图: CREATE MATERIALIZED VIEW mv_test AS SELECT a,b,t,SUM(d) FROM test GROUP BY 1,2,3

导入列 a,c,t,d,e, 发生异常 :

{ "TxnId": 4160958, "Label": "7b68ce49-2ad6-41d2-8706-a0b18cd4d897", "Comment": "", "TwoPhaseCommit": "false", "Status": "Fail", "Message": "[ANALYSIS_ERROR]errCode = 2, detailMessage = unknown reference column, column=mv_b, reference=b\n0. StackTrace::tryCapture() @ 0x000000000ba70197 in /opt/apache-doris/be/lib/doris_be\n1. doris::get_stack_trace[abi:cxx11]() @ 0x000000000ba6e72d in /opt/apache-doris/be/lib/doris_be\n2. doris::Status doris::Status::Error(int, std::basic_string_view<char, std::char_traits >) @ 0x000000000af07e2b in /opt/apache-doris/be/lib/doris_be\n3. doris::Status::create(doris::TStatus const&) @ 0x000000000b747e3e in /opt/apache-doris/be/lib/doris_be\n4. doris::StreamLoadAction::_process_put(doris::HttpRequest, std::shared_ptr) @ 0x000000000bec85d5 in /opt/apache-doris/be/lib/doris_be\n5. doris::StreamLoadAction::_on_header(doris::HttpRequest, std::shared_ptr) @ 0x000000000bec60aa in /opt/apache-doris/be/lib/doris_be\n6. doris::StreamLoadAction::on_header(doris::HttpRequest) @ 0x000000000bec51f2 in /opt/apache-doris/be/lib/doris_be\n7. doris::EvHttpServer::on_header(evhttp_request) @ 0x000000000bee35d1 in /opt/apache-doris/be/lib/doris_be\n8. ? @ 0x00000000131f3d8a in /opt/apache-doris/be/lib/doris_be\n9. bufferevent_runreadcb @ 0x00000000131d6421 in /opt/apache-doris/be/lib/doris_be\n10. ? @ 0x00000000131f82c3 in /opt/apache-doris/be/lib/doris_be\n11. ? @ 0x00000000131df229 in /opt/apache-doris/be/lib/doris_be\n12. ? @ 0x00000000131df8a7 in /opt/apache-doris/be/lib/doris_be\n13. ? @ 0x00000000131e1ed8 in /opt/apache-doris/be/lib/doris_be\n14. ? @ 0x000000000bee3aa7 in /opt/apache-doris/be/lib/doris_be\n15. doris::ThreadPool::dispatch_thread() @ 0x000000000baacdaf in /opt/apache-doris/be/lib/doris_be\n16. doris::Thread::supervise_thread(void*) @ 0x000000000baa2d3c in /opt/apache-doris/be/lib/doris_be\n17. start_thread @ 0x0000000000007dc5 in /usr/lib64/libpthread-2.17.so\n18. __clone @ 0x000000

What You Expected?

希望bug能得到修复

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

learner1212 commented 11 months ago

QQ图片20231127101244 补充图片

LemonLiTree commented 11 months ago

I tested it on 2.0.3 and there was no problem. Please upgrade after the version is released.

learner1212 commented 11 months ago

I tested it on 2.0.3 and there was no problem. Please upgrade after the version is released.

2.0.2.1会有问题吗? 2.0.3看起来有点遥远

LemonLiTree commented 11 months ago

this week will release