agentleFS
apacheapache/doris-skills/skills/doris-debug/tablet/SKILL.md

doris-debug-tablet

Skill50 starsChanged 13 days agoApache-2.0View on GitHub

Use for Doris tablet/replica health, version skew, clone backlog, disk balance, and tablet repair. Commands: SHOW PROC tablet_health, SHOW TABLET, ADMIN REPAIR.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check BE heartbeat_service_mgr.cpp — heartbeats from a BE with missing tablets won't self-heal if compaction or clone threads are exhausted.

    line 65

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tablet & Replica

Quick scan

SHOW PROC '/cluster_health/tablet_health';
SHOW PROC '/statistic';
SHOW PROC '/tasks';

Causes

IDCauseEvidenceSource anchor
AReplica missing / unhealthySHOW PROC '/cluster_health/tablet_health' Health≠TOTALTabletHealth.java
BVersion skewtablet version lag > 3 behind quorumTabletInvertedIndex.cpp
CClone backlogSHOW PROC '/tasks' CLONE queue depth > 50CloneTask.cpp, BE clone_worker_count
DDisk skewSHOW PROC '/statistic' one disk > 85% while others < 50%DiskBalancer / balance config
ESingle tablet too largetablet size > compaction_tablet_size_thresholdconfig.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:

  1. Tablet migration triggered by balance_load_disk_safe_threshold / storage_high_watermark_usage_percent
  2. 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 proc
  • fe/.../clone/TabletSchedCtx.java
  • be/src/agent/task_worker_pool.cpp — clone worker pool
  • be/src/common/config.cpp — clone_worker_count, storage_root_path
  • be/src/olap/tablet_manager.cpp — tablet version tracking

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.