doris icon indicating copy to clipboard operation
doris copied to clipboard

[Bug] multitable Routine load task from kafka cannot load rows

Open dudufan opened this issue 3 years ago • 4 comments

Search before asking

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

Version

doris 2.0.1 noavx2

What's Wrong?

consumer receive 2 rows,but cannot load rows to table. Also continuously kafka consume timeout. when I adjust be multi_table_batch_plan_threshold=5, the multi-table routine load also cannot works. After a while, I find the problem has not occured.

CREATE TABLE `doris_metric` (
                                `metricName` varchar(64) NOT NULL COMMENT '指标名',
                                `eventTime` datetime NOT NULL COMMENT '事件发生时间或采集时间',
                                `createTime` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                `value` double NOT NULL COMMENT '指标的值',
                                `ip` varchar(64) NULL COMMENT 'IP地址',
                                `group` VARCHAR(10) NULL,
                                `be` VARCHAR(255) NULL,
                                `type` VARCHAR(255) NULL,
                                `method` VARCHAR(255) NULL,
                                `job` VARCHAR(255) NULL,
                                `quantile` VARCHAR(255) NULL,
                                `backend` VARCHAR(255) NULL,
                                `name` VARCHAR(255) NULL,
                                `user` VARCHAR(255) NULL,
                                `db` VARCHAR(255) NULL,
                                `path` VARCHAR(255) NULL,
                                `status` VARCHAR(255) NULL,
                                `device` VARCHAR(255) NULL,
                                `mode` VARCHAR(255) NULL
) ENGINE=OLAP
    DUPLICATE KEY(`metricName`)
COMMENT 'OLAP'
PARTITION BY RANGE(`eventTime`)
(PARTITION p20230930 VALUES [('0000-01-01 00:00:00'), ('2023-09-30 00:00:00')))
DISTRIBUTED BY HASH(`metricName`) BUCKETS 16
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"is_being_synced" = "false",
"storage_format" = "V2",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false"
);

CREATE ROUTINE LOAD demo.load_test6
 PROPERTIES(
 "desired_concurrent_number"="1",
 "max_batch_interval"="20",
 "max_batch_rows"="300000",
 "max_batch_size"="209715200",
 "strict_mode" = "false",
 "format" = "json"
 )
 FROM KAFKA(
 "kafka_broker_list"="10.0.1.2:9092",
 "kafka_topic"="doris1",
 "property.group.id"="df-consumer1",
 "property.client.id"="my_client_id",
 "kafka_default_offsets"="OFFSET_BEGINNING");

messages in topic doris1 :
doris_metric1|{"instance":"10.0.209.74:8030","metricName":"up","eventTime":"2023-09-21 09:42:14","job":"doris","value":"1","timestamp":"2023-09-21T01:42:14Z","group":"fe"}

whole log related to the load:

# receive 2 rows
I0926 10:55:10.152308  4442 data_consumer_group.cpp:131] consumer group done: 2c43cba8ffe16e9f-a3558debb610c3b3. consume time(ms)=20157, received rows=2, received bytes=342, eos: 0, left_time: -157, left_rows: 299998, left_bytes: 209714858, blocking get time(us): 20157749, blocking put time(us): 10, id=e80e97b56d244672-91b57dfcbf9b0740, job_id=41004, txn_id=10026, label=load_test6-41004-e80e97b56d244672-91b57dfcbf9b0740-10026, elapse(s)=20
I0926 10:55:10.152442  4442 data_consumer.cpp:400] kafka consumer cancelled. a743e9b852bc0845-1cb8dfd1ce4901a5
# table doris_metric1
I0926 10:55:10.152770  4442 multi_table_pipe.cpp:151] request plans for 1 tables: [ doris_metric1 ]
W0926 10:55:10.153139  4442 thrift_rpc_helper.cpp:76] retrying call frontend service after 1000 ms, address=TNetworkAddress(hostname=10.0.209.74, port=9020), reason=No more data to read.
I0926 10:55:11.244310  4442 multi_table_pipe.cpp:205] 1 tables plan complete, planned table cnt=1, returned plan cnt=1
I0926 10:55:11.244345  4442 multi_table_pipe.cpp:218] fragment_instance_id=TUniqueId(hi=-1725274801760352654, lo=-7947307442925533375) table=doris_metric1
I0926 10:55:11.244452  4442 fragment_mgr.cpp:689] query_id: e80e97b56d244672-91b57dfcbf9b0740 coord_addr TNetworkAddress(hostname=10.0.209.74, port=9020) total fragment num on current host: 0
I0926 10:55:11.244498  4442 fragment_mgr.cpp:758] Register query/load memory tracker, query/load id: e80e97b56d244672-91b57dfcbf9b0740 limit: 2.00 GB
I0926 10:55:11.244539  4442 plan_fragment_executor.cpp:115] PlanFragmentExecutor::prepare|query_id=TUniqueId(hi=-1725274801760352654, lo=-7947307442925533376)|instance_id=TUniqueId(hi=-1725274801760352654, lo=-7947307442925533375)|backend_num=0|pthread_id=139785320834816


I0926 10:55:11.249385  4381 fragment_mgr.cpp:528] PlanFragmentExecutor::_exec_actual|query_id=e80e97b56d244672-91b57dfcbf9b0740|instance_id=e80e97b56d244672-91b57dfcbf9b0741|pthread_id=139785972696832
I0926 10:55:11.249452  4381 plan_fragment_executor.cpp:251] PlanFragmentExecutor::open|query_id=TUniqueId(hi=-1725274801760352654, lo=-7947307442925533376)|instance_id=TUniqueId(hi=-1725274801760352654, lo=-7947307442925533375)|mem_limit=2.00 GB
I0926 10:55:11.251302  5134 tablets_channel.cpp:103] open tablets channel: (load_id=e80e97b56d244672-91b57dfcbf9b0740, index_id=34252), tablets num: 1903, timeout(s): 259200

What You Expected?

consume rows normally and write it to table

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

dudufan avatar Sep 26 '23 03:09 dudufan

same question, task can not finish, causes routine_load_thread_pool queue full

vvXuXu avatar Sep 27 '23 06:09 vvXuXu

You can set exec_mem_limit and try again.

liugddx avatar Sep 27 '23 09:09 liugddx

i have the same problem

tuoluzhe8521 avatar Oct 10 '23 03:10 tuoluzhe8521

We're closing this issue because it hasn't been updated in a while. If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!

github-actions[bot] avatar Sep 13 '25 00:09 github-actions[bot]