doris-debug-query
Use for Apache Doris slow/hanging/timeout queries. Covers FE planner (Nereids timeout), BE Profile bottlenecks, and Exchange WaitForData / brpc E1008 on port 8060. Session vars: enable_profile, query_timeout, nereids_timeout_second.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-04
- Stars
- ★ 50
- Forks
- 15
01 前言 Front Matter
- name
- doris-debug-query
- version
- 0.2.0
- category
- query
- description
- Use for Apache Doris slow/hanging/timeout queries. Covers FE planner (Nereids timeout), BE Profile bottlenecks, and Exchange WaitForData / brpc E1008 on port 8060. Session vars: enable_profile, query_timeout, nereids_timeout_second.
02 资源文件 3
03 SKILL.md 正文
Query Troubleshooting
Causes
| ID | Cause | Evidence |
|---|---|---|
| A | Client timeout too small | query_timeout vs Profile wall |
| B | Planner | Nereids cost too much time / nereids_timeout_second |
| C | BE compute (scan/join/spill) | Profile active ExecTime |
| D | Exchange / brpc | WaitForData ≈ timeout; failed to send brpc when exchange; [E1008] on :8060 |
10 min
SET enable_profile = true;
-- reproduce
./scripts/doris-debug log-grep fe/log be/log --query-id "$QID" --pack planner
./scripts/doris-debug log-grep be/log --query-id "$QID" --pack exchange
./scripts/doris-debug audit-topk fe/log/fe.audit.log -k 20 --min-ms 5000
Planner mitigation (session only): SET disable_join_reorder=true; for fat ETL joins; fix stats with ANALYZE.
Cause C — BE compute (scan/join/spill)
When Profile shows high active ExecTime (not Wait*), route to doris-profile-reader for deep Profile analysis:
Skill routing: If
doris-profile-readeris available, invoke it with the query's Profile to identify which operator (scan/join/agg/spill) dominates. Key indicators to pass:
ActiveTimeper operatorRowsRead/ScanBytesfor scan operatorsSpillDataSizeif disk spill occurredJoinType+JoinRowsfor join operators
Without profile-reader, check directly:
# Get the Profile text
curl -s "http://$FE:8030/api/query_profile?query_id=$QID"
Key Profile counters for Cause C:
| Counter | Meaning | Threshold |
|---|---|---|
ScannerGetBlockTime |
Time reading from storage | > 50% of ExecTime → IO bound |
SpillDataSize |
Data spilled to disk | > 0 → memory pressure, check enable_spill |
JoinProbeTime |
Hash join probe wall time | > 30% → check join order / type |
RowsRead / ScanBytes |
Scan volume | > 1B rows → check partition pruning |
Profile interpretation: prefer active time over Wait*.
Cause D — Exchange / brpc
Code facts (apache/doris):
- Error text in
be/src/exec/operator/exchange_sink_buffer.h. GET /api/reset_rpc_channel/{endpoints}clearsbrpc_internal_client_cacheonly (reset_rpc_channel_action.cpp).enable_brpc_connection_check(default false) →FragmentMgr::_check_brpc_availablehand_shake; consecutive failures erase internal cache.
curl -s "http://$BE:8040/api/reset_rpc_channel/all"
# be.conf — restart for static DEFINE_Bool
enable_brpc_connection_check = true
brpc_connection_check_timeout_ms = 10000
Do not trust ICMP alone. Check priority_networks.
Source
SessionVariable.java—QUERY_TIMEOUT,NEREIDS_TIMEOUT_SECOND- Profile WaitForData — exchange source operator
exchange_sink_buffer.h,reset_rpc_channel_action.cpp,fragment_mgr.cpp
04 同仓库更多 Skills
doris-pr-description
Write, rewrite, or check the title and description of an Apache Doris pull request against the Doris PR standard. Takes the facts from the handoff file that development left when there is one, and collects them from the diff, commits, linked issue, and existing tests otherwise; classifies the PR type, fills that type's required fields, drafts the issue a Feature needs, validates the draft with a bundled checker, and creates or updates the PR on GitHub only after the user confirms. Use whenever the user wants to open, create, submit, or update a Doris PR; write, fix, or improve a PR title or description; prepare a branch for review; rewrite an existing PR's description for comparison; or check whether a description meets the standard. Also use for short requests in any language, such as "open a PR", "write the PR description", or "is this PR description good enough?", even when the standard is not mentioned.
develop-with-evidence
暂无简介
doris-repo-review
Review an Apache Doris PR from a local clone with the same multi-agent, shared-ledger convergence workflow as the CI Code Review Runner. Use when the user supplies a PR to `/doris-repo-review`, asks to review a Doris PR locally, or asks for the CI-style review flow. Safely align only the current worktree to the exact PR head, refuse to disturb tracked local changes, write equivalent English and Chinese review documents with verified path-line anchors, and never build, test, or edit source. Treat a review as pipeline-equivalent only when an explicitly selected qualified reviewer uses a supported effort (xhigh or max, plus ultra for Codex), preferring GPT-6 Astra on Codex and Fable 5.1 on Claude Code. After a converged APPROVE result, automatically post one machine-readable PASS comment bound to the reviewed commit.
doris-profile-reader
Interpret Apache Doris query runtime profiles, especially profile bottleneck triage, misleading wait counters, per-operator metric priority, scan, join-order/runtime-filter analysis, and evidence-bounded performance explanations. Use when given a Doris profile, query id, profile URL/text, or a request to explain Doris query performance.
doris-debug-tablet
Use for Doris tablet/replica health, version skew, clone backlog, disk balance, and tablet repair. Commands: SHOW PROC tablet_health, SHOW TABLET, ADMIN REPAIR.
doris-debug-resource-isolation
Use for Doris Workload Group / resource tag queue starvation, CPU/memory isolation leaks, and workload policy debugging. Commands: SHOW WORKLOAD GROUPS, EXPLAIN resource.