doris-2.1.10, insert卡住, 耗时很长.

Viewed 35
mysql> select @@version_comment;
+--------------------------------------------+
| @@version_comment                          |
+--------------------------------------------+
| Doris version doris-2.1.10-rc01-33df5ba180 |
+--------------------------------------------+
1 row in set (0.03 sec)
mysql> show backends;
+-----------+---------------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+
| BackendId | Host          | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime       | LastHeartbeat       | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag                      | ErrMsg | Version                      | Status                                                                                                                        | HeartbeatFailureCounter | NodeRole |
+-----------+---------------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+
| 10068     | 192.168.30.54 | 9050          | 9060   | 8040     | 8060     | -1                 | 2025-10-08 07:35:20 | 2025-10-09 10:10:59 | true  | false                | 42680     | 619.714 GB       | 152.680 KB        | 5.130 TB      | 5.771 TB      | 11.12 % | 11.12 %        | 0.000              | {"location" : "default"} |        | doris-2.1.10-rc01-33df5ba180 | {"lastSuccessReportTabletsTime":"2025-10-09 10:10:56","lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false} | 0                       | mix      |
| 10216     | 192.168.30.64 | 9050          | 9060   | 8040     | 8060     | -1                 | 2025-10-05 09:03:19 | 2025-10-09 10:10:59 | true  | false                | 42675     | 617.586 GB       | 152.732 KB        | 5.138 TB      | 5.771 TB      | 10.96 % | 10.96 %        | 0.000              | {"location" : "default"} |        | doris-2.1.10-rc01-33df5ba180 | {"lastSuccessReportTabletsTime":"2025-10-09 10:10:42","lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false} | 0                       | mix      |
| 10229     | 192.168.30.74 | 9050          | 9060   | 8040     | 8060     | -1                 | 2025-09-29 23:09:23 | 2025-10-09 10:10:59 | true  | false                | 42684     | 642.768 GB       | 152.740 KB        | 5.113 TB      | 5.771 TB      | 11.41 % | 11.41 %        | 0.000              | {"location" : "default"} |        | doris-2.1.10-rc01-33df5ba180 | {"lastSuccessReportTabletsTime":"2025-10-09 10:10:26","lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false} | 0                       | mix      |
+-----------+---------------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+------------------------------+-------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+
3 rows in set (0.04 sec)

mysql> show frontends;
+-----------------------------------------+---------------+-------------+----------+-----------+---------+--------------------+----------+----------+------------+------+-------+-------------------+---------------------+---------------------+----------+--------+------------------------------+------------------+
| Name                                    | Host          | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role     | IsMaster | ClusterId  | Join | Alive | ReplayedJournalId | LastStartTime       | LastHeartbeat       | IsHelper | ErrMsg | Version                      | CurrentConnected |
+-----------------------------------------+---------------+-------------+----------+-----------+---------+--------------------+----------+----------+------------+------+-------+-------------------+---------------------+---------------------+----------+--------+------------------------------+------------------+
| fe_adb3897a_0f2b_4392_b6e1_5e09157022f4 | 192.168.30.53 | 9010        | 8030     | 9030      | 9020    | -1                 | FOLLOWER | false    | 1117024301 | true | true  | 16872674          | 2025-09-30 18:44:25 | 2025-10-09 10:14:29 | true     |        | doris-2.1.10-rc01-33df5ba180 | Yes              |
| fe_f4ca79b8_cd2d_4752_919d_c70a608ae508 | 192.168.30.63 | 9010        | 8030     | 9030      | 9020    | -1                 | FOLLOWER | false    | 1117024301 | true | true  | 16872674          | 2025-09-18 08:33:29 | 2025-10-09 10:14:29 | true     |        | doris-2.1.10-rc01-33df5ba180 | No               |
| fe_21a11d56_a810_4d35_a126_3a464c0ee4bb | 192.168.30.73 | 9010        | 8030     | 9030      | 9020    | -1                 | FOLLOWER | true     | 1117024301 | true | true  | 16872675          | 2025-08-09 19:44:02 | 2025-10-09 10:14:29 | true     |        | doris-2.1.10-rc01-33df5ba180 | No               |
+-----------------------------------------+---------------+-------------+----------+-----------+---------+--------------------+----------+----------+------------+------+-------+-------------------+---------------------+---------------------+----------+--------+------------------------------+------------------+
3 rows in set (0.51 sec)

CREATE TABLE `rm_vehicle_alarm_blacklist` (
  `arm_type` varchar(128) NOT NULL COMMENT "报警类型"
) ENGINE=OLAP
UNIQUE KEY(`arm_type`)
COMMENT '报警表黑名单表'
DISTRIBUTED BY HASH(`arm_type`) BUCKETS AUTO
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"min_load_replica_num" = "-1",
"is_being_synced" = "false",
"storage_medium" = "hdd",
"storage_format" = "V2",
"inverted_index_storage_format" = "V1",
"enable_unique_key_merge_on_write" = "true",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"binlog.enable" = "false",
"binlog.ttl_seconds" = "86400",
"binlog.max_bytes" = "9223372036854775807",
"binlog.max_history_nums" = "9223372036854775807",
"enable_single_replica_compaction" = "false",
"group_commit_interval_ms" = "10000",
"group_commit_data_bytes" = "134217728",
"enable_mow_light_delete" = "false"
);


-- 只有1条数据
mysql> select * from rm_vehicle_alarm_blacklist;
+----------+
| arm_type |
+----------+
| 1        |
+----------+
1 row in set (0.05 sec)

-- 执行insert时卡住直到超时
mysql> insert into rm_vehicle_alarm_blacklist(arm_type) values('1');


# 然后使用stream load又是正常的
[xxx@localhost tmp]$ cat test.arm.json 
{"arm_type":"2"}

# 53
[xx@localhost tmp]$ curl --location-trusted \
-u xx:xx \
-H "Expect:100-continue" \
-H "format:json" \
-H "strip_outer_array:false" \
-H "read_json_by_line:true" \
-T test.arm.json \
-X PUT \
http://192.168.30.53:8030/api/xx/rm_vehicle_alarm_blacklist/_stream_load
{
    "TxnId": 4717536,
    "Label": "8e19c3cd-1da7-4c7d-ae32-c92ee9e7f1e4",
    "Comment": "",
    "TwoPhaseCommit": "false",
    "Status": "Success",
    "Message": "OK",
    "NumberTotalRows": 1,
    "NumberLoadedRows": 1,
    "NumberFilteredRows": 0,
    "NumberUnselectedRows": 0,
    "LoadBytes": 17,
    "LoadTimeMs": 301,
    "BeginTxnTimeMs": 6,
    "StreamLoadPutTimeMs": 7,
    "ReadDataTimeMs": 0,
    "WriteDataTimeMs": 65,
    "ReceiveDataTimeMs": 20,
    "CommitAndPublishTimeMs": 220
}
[xx@localhost tmp]$ 
[xx@localhost tmp]$
# 63
[xx@localhost tmp]$ curl --location-trusted \
-u xx:xx \
-H "Expect:100-continue" \
-H "format:json" \
-H "strip_outer_array:false" \
-H "read_json_by_line:true" \
-T test.arm.json \
-X PUT \
http://192.168.30.63:8030/api/xx/rm_vehicle_alarm_blacklist/_stream_load
{
    "TxnId": 4717541,
    "Label": "c1c1e545-e460-449b-b431-68cdf13c3068",
    "Comment": "",
    "TwoPhaseCommit": "false",
    "Status": "Success",
    "Message": "OK",
    "NumberTotalRows": 1,
    "NumberLoadedRows": 1,
    "NumberFilteredRows": 0,
    "NumberUnselectedRows": 0,
    "LoadBytes": 17,
    "LoadTimeMs": 48,
    "BeginTxnTimeMs": 0,
    "StreamLoadPutTimeMs": 2,
    "ReadDataTimeMs": 0,
    "WriteDataTimeMs": 21,
    "ReceiveDataTimeMs": 3,
    "CommitAndPublishTimeMs": 23
}
[xx@localhost tmp]$
# 73
[xx@localhost tmp]$ curl --location-trusted \
-u xx:xx \
-H "Expect:100-continue" \
-H "format:json" \
-H "strip_outer_array:false" \
-H "read_json_by_line:true" \
-T test.arm.json \
-X PUT \
http://192.168.30.73:8030/api/xx/rm_vehicle_alarm_blacklist/_stream_load
{
    "TxnId": 4717542,
    "Label": "f7eed4ca-345f-49b7-bdec-d51457429426",
    "Comment": "",
    "TwoPhaseCommit": "false",
    "Status": "Success",
    "Message": "OK",
    "NumberTotalRows": 1,
    "NumberLoadedRows": 1,
    "NumberFilteredRows": 0,
    "NumberUnselectedRows": 0,
    "LoadBytes": 17,
    "LoadTimeMs": 147,
    "BeginTxnTimeMs": 0,
    "StreamLoadPutTimeMs": 2,
    "ReadDataTimeMs": 0,
    "WriteDataTimeMs": 100,
    "ReceiveDataTimeMs": 3,
    "CommitAndPublishTimeMs": 41
}

执行insert卡住时的3台fe的jstack信息.

2 Answers

好的,我们先分析一下

老师,您方便提供下fe master的日志吗?可以加我主页微信