doris-debug-compaction
Use for Doris -235 / too many versions and compaction lag. Error raised in RowsetBuilder::check_tablet_version_count when version_count > max_tablet_version_num (default 2000) or meta serialize size limit.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 50
- Forks
- 15
01 前言 Front Matter
- name
- doris-debug-compaction
- version
- 0.2.0
- category
- compaction
- description
- Use for Doris -235 / too many versions and compaction lag. Error raised in RowsetBuilder::check_tablet_version_count when version_count > max_tablet_version_num (default 2000) or meta serialize size limit.
02 资源文件 5
- 参考文档references/ANALYZERS.md11.8 KB
- 参考文档references/BRIEFINGS.md2.6 KB
- 参考文档references/case-001-too-many-versions.md1.3 KB
- 参考文档references/case-002-schema-change-base-score.md3.4 KB
- 参考文档references/SCORING.md2.0 KB
03 SKILL.md 正文
Compaction / Versions
Code
be/src/storage/rowset_builder.cpp:
version_count > max_version_config→Status::Error<TOO_MANY_VERSION>(...)- Suggests reduce load frequency or raise
max_tablet_version_num/time_series_max_tablet_version_numinbe.conf - Near limit triggers cumulative compaction submit
Defaults (config.cpp): max_tablet_version_num=2000, time_series_max_tablet_version_num=20000.
Causes
| ID | Cause | Evidence | Fix direction |
|---|---|---|---|
| A | Ingest rate > compaction throughput | version_count rising; compaction score growing | Reduce ingest frequency or increase compaction threads |
| B | Disk IO bottleneck | iostat shows disk util > 90% |
Move WAL to separate disk; add compaction disks |
| C | max_tablet_version_num too low for workload | -235 on normal ingest rates | Raise limit (temporary), then fix root cause |
| D | Single-tablet hotspot | One tablet has 10× versions of peers | Partition / bucket key skew |
Actions
- Confirm with
./scripts/doris-debug log-grep be/log --pack versions - Check compaction throughput:
./scripts/doris-debug be-metrics --be http://$BE:8040 --grep compaction - Check disk IO:
iostat -x 1 - Slow ingest / enlarge group commit batches
- Raising
max_tablet_version_numis a temporary valve — fix ingest vs compaction balance
./scripts/doris-debug be-metrics --be http://$BE:8040 --grep compaction
Compaction knobs
# be.conf
max_tablet_version_num = 2000 # hard cap, raise only as stopgap
time_series_max_tablet_version_num = 20000 # separate cap for time-series tables
max_cumulative_compaction_threads = -1 # -1 = auto based on CPU cores
compaction_task_num_per_disk = 4 # per-disk concurrent compaction tasks
compaction_tablet_size_threshold = 107374182400 # 100GB — above this, skip base compaction
Source
be/src/storage/rowset_builder.cpp—-235errorbe/src/common/config.cpp— all compaction config defaultsbe/src/olap/cumulative_compaction_policy.cpp— score calculation
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 PR 代码审查
doris-repo-review
从本地 clone 审查 Apache Doris PR,使用与 CI Code Review Runner 相同的多智能体、共享账本收敛工作流。当用户提供一个 PR 给 `/doris-repo-review`、要求在本地审查 Doris PR,或要求 CI 风格的审查流程时使用。安全地仅将当前 worktree 对齐到确切的 PR head,拒绝干扰已跟踪的本地更改,编写对等的英文和中文审查文档并附带经过验证的路径行锚点,绝不构建、测试或编辑源码。只有在明确选择合格审查者并使用受支持的 effort(xhigh 或 max,Codex 另支持 ultra)时,才将审查视为等同流水线;Codex 上优先 GPT-6 Astra,Claude Code 上优先 Fable 5.1。在收敛出 APPROVE 结果后,自动发布一条绑定到被审查 commit 的机器可读 PASS 评论。
Doris 查询 Profile 性能分析
doris-profile-reader
解读 Apache Doris 查询运行时 profile,尤其包括 profile 瓶颈分诊、误导性等待计数器、每算子指标优先级、扫描、join 顺序/运行时过滤分析,以及基于证据的性能解释。当给定 Doris profile、query id、profile URL/文本,或要求解释 Doris 查询性能时使用。
Doris Tablet 故障诊断
doris-debug-tablet
用于 Doris tablet/副本健康、版本倾斜、克隆积压、磁盘均衡以及 tablet 修复。命令:SHOW PROC tablet_health、SHOW TABLET、ADMIN REPAIR。
Doris 资源隔离调试
doris-debug-resource-isolation
用于 Doris Workload Group / 资源标签队列饥饿、CPU/内存隔离泄漏以及工作负载策略调试。命令:SHOW WORKLOAD GROUPS、EXPLAIN resource。