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.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-04
- Stars
- ★ 50
- Forks
- 15
01 前言 Front Matter
- name
- doris-debug-tablet
- version
- 0.2.0
- category
- tablet
- description
- Use for Doris tablet/replica health, version skew, clone backlog, disk balance, and tablet repair. Commands: SHOW PROC tablet_health, SHOW TABLET, ADMIN REPAIR.
02 资源文件 3
- 脚本scripts/flesch_kincaid.rb1.3 KB
- 脚本scripts/top1000.txt5.8 KB
- 脚本scripts/vocabulary_profiler.rb6.7 KB
03 SKILL.md 正文
Tablet & Replica
Quick scan
SHOW PROC '/cluster_health/tablet_health';
SHOW PROC '/statistic';
SHOW PROC '/tasks';
Causes
| ID | Cause | Evidence | Source anchor |
|---|---|---|---|
| A | Replica missing / unhealthy | SHOW PROC '/cluster_health/tablet_health' Health≠TOTAL |
TabletHealth.java |
| B | Version skew | tablet version lag > 3 behind quorum | TabletInvertedIndex.cpp |
| C | Clone backlog | SHOW PROC '/tasks' CLONE queue depth > 50 |
CloneTask.cpp, BE clone_worker_count |
| D | Disk skew | SHOW PROC '/statistic' one disk > 85% while others < 50% |
DiskBalancer / balance config |
| E | Single tablet too large | tablet size > compaction_tablet_size_threshold |
config.cpp + compaction |
10 min triage
-- 1. Global health snapshot
SHOW PROC '/cluster_health/tablet_health';
-- 2. Per-table replica drilldown
ADMIN SHOW REPLICA STATUS FROM db.table WHERE ReplicaStatus != 'OK';
-- 3. Task queue depth
SHOW PROC '/tasks';
# BE-side tablet count & version lag
./scripts/doris-debug be-metrics --be http://$BE:8040 --grep "tablet|version|clone"
./scripts/doris-debug log-grep be/log --pack versions
# Check specific tablet distribution
curl -s "http://$FE:8030/api/tablets_distribution?db=db_name&table=tbl_name"
Cause A — Replica missing
-- Identify unhealthy replicas
ADMIN SHOW REPLICA STATUS FROM db.table WHERE ReplicaStatus != 'OK';
-- Repair with low priority (production safe)
ADMIN REPAIR TABLE db.table PRIORITY = 'LOW';
-- For urgent single-tablet repair
ADMIN REPAIR TABLE db.table PARTITION (p202401) PRIORITY = 'HIGH';
Check BE heartbeat_service_mgr.cpp — heartbeats from a BE with missing tablets won't self-heal if compaction or clone threads are exhausted.
Cause C — Clone backlog
Clone concurrency: clone_worker_count (default 3 in config.cpp). A high Clone backlog often means:
- Tablet migration triggered by
balance_load_disk_safe_threshold/storage_high_watermark_usage_percent - Clone threads can't keep up with the repair plan
# be.conf — raise clone workers cautiously
clone_worker_count = 6
Cause D — Disk skew
SHOW PROC '/statistic'; -- per-disk usage
SHOW PROC '/backends'; -- per-BE disk UsedPct
# fe.conf
balance_load_disk_safe_threshold = 0.5
storage_high_watermark_usage_percent = 80
Manual rebalance: ADMIN SET FRONTEND CONFIG ("disable_balance" = "true"); then selective ADMIN REBALANCE DISK.
Source
fe/.../master/TabletHealth.java— cluster_health procfe/.../clone/TabletSchedCtx.javabe/src/agent/task_worker_pool.cpp— clone worker poolbe/src/common/config.cpp—clone_worker_count,storage_root_pathbe/src/olap/tablet_manager.cpp— tablet version tracking
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-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.
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.